if {[catch {

# define run engine funtion
source [file join {C:/lscc/radiant/2025.1} scripts tcl flow run_engine.tcl]
# define global variables
global para
set para(gui_mode) "1"
set para(prj_dir) "C:/Users/Mourad Zakhama/Downloads/Lab-Files/Radiant Lab/LAB_01"
if {![file exists {C:/Users/Mourad Zakhama/Downloads/Lab-Files/Radiant Lab/LAB_01/impl_1}]} {
  file mkdir {C:/Users/Mourad Zakhama/Downloads/Lab-Files/Radiant Lab/LAB_01/impl_1}
}
cd {C:/Users/Mourad Zakhama/Downloads/Lab-Files/Radiant Lab/LAB_01/impl_1}
# synthesize IPs
# synthesize VMs
# propgate constraints
file delete -force -- LAB01_impl_1_cpe.ldc
::radiant::runengine::run_engine_newmsg cpe -syn lse -f "LAB01_impl_1.cprj" "PLL01.cprj" -a "LFCPNX"  -o LAB01_impl_1_cpe.ldc
# synthesize top design
file delete -force -- LAB01_impl_1.vm LAB01_impl_1.ldc
::radiant::runengine::run_engine_newmsg synthesis -f "C:/Users/Mourad Zakhama/Downloads/Lab-Files/Radiant Lab/LAB_01/impl_1/LAB01_impl_1_lattice.synproj" -logfile "LAB01_impl_1_lattice.srp"
::radiant::runengine::run_postsyn [list -a LFCPNX -p LFCPNX-50 -t CBG256 -sp 9_High-Performance_1.0V -oc Commercial -top -w -o LAB01_impl_1_syn.udb LAB01_impl_1.vm] [list LAB01_impl_1.ldc]

} out]} {
   ::radiant::runengine::runtime_log $out
   exit 1
}
