g TRANSLATE
ngdbuild -nt timestamp -uc example_top.ucf -p %device-%package%speedgrade ../synth/rev_1/example_top.edf example_top.ngd >> ise_flow_results.txt
if( ! -e example_top.ngd ) then 
  echo Failed in TRANSLATE
  exit
endif

echo Running MAP
map -intstyle ise -p %device-%package%speedgrade -w -ol high -xe n -register_duplication off -ir off -pr off -lc off -power off -o example_top_map.ncd example_top.ngd example_top.pcf >> ise_flow_results.txt
if( ! -e example_top_map.ncd ) then 
  echo Failed in MAP
  exit
endif

echo Running PAR
par -w -intstyle ise -ol high -xe n example_top_map.ncd example_top.ncd example_top.pcf >> ise_flow_results.txt
if( ! -e example_top.ncd ) then 
  echo Failed in PAR
  exit
endif


echo Running TRACE 
trce -intstyle ise -v 3 -fastpaths -xml example_top example_top.ncd -o example_top.twr example_top.pcf >> ise_flow_results.txt
echo Running BITGEN
bitgen -intstyle ise example_top.ncd >> ise_flow_results.txt

if( ! -e example_top.bit ) then 
  echo Failed in BITGEN 
  exit
endif

echo IMPLEMENTATION SUCCESSFUL
