Advertisement
Guest User

elec6231 area report

a guest
Feb 2nd, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.11 KB | None | 0 0
  1. #Run with : ./run_area_report.sh [module_names]
  2.  
  3. for file in "$@"
  4. do
  5.   module_name=$file
  6.  
  7.   if [ "$module_name" = "ahb_rom" ]
  8.   then
  9.     ##For the rom we need to compile and link for code.vmem
  10.     echo "Copying code.vmem..."
  11.     cd software
  12.     ./compile_and_link
  13.     cd ../
  14.     cp ./software/code.vmem ./behavioural/
  15.   fi
  16.  
  17.   ## Create standalone instantiation of module for synthesis
  18.   echo "module synth_$module_name ();" > ./behavioural/synth_$module_name\.sv
  19.   echo "$module_name synth_inst ();" >> ./behavioural/synth_$module_name\.sv
  20.   echo "endmodule" >> ./behavioural/synth_$module_name\.sv
  21.  
  22.   mkdir $module_name\_area_report
  23.   cd $module_name\_area_report
  24.  
  25.   # Setup env vars, PDK locations etc
  26.   cp ../synthesis/.synopsys_dc.setup .
  27.   . ../umc_directories.sh
  28.   # Run synthesis and area report
  29.   dc_shell -f ../area_report.tcl -x "set module_name $module_name"
  30.  
  31.   cd ../
  32.   ## Cleanup
  33.   rm ./behavioural/synth_$module_name\.sv
  34.   rm ./behavioural/code.vmem
  35. done
  36.  
  37. # Parse reports
  38. python3 ./extract_areas.py $@ > areas.rpt
  39.  
  40. # CLeanup
  41. for file in "$@"
  42. do
  43.   rm -r ./$file\_area_report
  44. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement