vhdl-modules.tcl 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114
  1. #*****************************************************************************************
  2. # Vivado (TM) v2018.3 (64-bit)
  3. #
  4. # vhdl-modules.tcl: Tcl script for re-creating project 'vhdl-modules'
  5. #
  6. # IP Build 2404404 on Fri Dec 7 01:43:56 MST 2018
  7. #
  8. # This file contains the Vivado Tcl commands for re-creating the project to the state*
  9. # when this script was generated. In order to re-create the project, please source this
  10. # file in the Vivado Tcl Shell.
  11. #
  12. # * Note that the runs in the created project will be configured the same way as the
  13. # original project, however they will not be launched automatically. To regenerate the
  14. # run results please launch the synthesis/implementation runs as needed.
  15. #
  16. #*****************************************************************************************
  17. # Set the reference directory for source file relative paths (by default the value is script directory path)
  18. set origin_dir [file dirname [info script]]
  19. # Use origin directory path location variable, if specified in the tcl shell
  20. if { [info exists ::origin_dir_loc] } {
  21. set origin_dir $::origin_dir_loc
  22. }
  23. # Set the project name
  24. set _xil_proj_name_ "vhdl-modules"
  25. # Use project name variable, if specified in the tcl shell
  26. if { [info exists ::user_project_name] } {
  27. set _xil_proj_name_ $::user_project_name
  28. }
  29. variable script_file
  30. set script_file "vhdl-modules.tcl"
  31. # Help information for this script
  32. proc print_help {} {
  33. variable script_file
  34. puts "\nDescription:"
  35. puts "Recreate a Vivado project from this script. The created project will be"
  36. puts "functionally equivalent to the original project for which this script was"
  37. puts "generated. The script contains commands for creating a project, filesets,"
  38. puts "runs, adding/importing sources and setting properties on various objects.\n"
  39. puts "Syntax:"
  40. puts "$script_file"
  41. puts "$script_file -tclargs \[--origin_dir <path>\]"
  42. puts "$script_file -tclargs \[--project_name <name>\]"
  43. puts "$script_file -tclargs \[--help\]\n"
  44. puts "Usage:"
  45. puts "Name Description"
  46. puts "-------------------------------------------------------------------------"
  47. puts "\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
  48. puts " origin_dir path value is \".\", otherwise, the value"
  49. puts " that was set with the \"-paths_relative_to\" switch"
  50. puts " when this script was generated.\n"
  51. puts "\[--project_name <name>\] Create project with the specified name. Default"
  52. puts " name is the name of the project from where this"
  53. puts " script was generated.\n"
  54. puts "\[--help\] Print help information for this script"
  55. puts "-------------------------------------------------------------------------\n"
  56. exit 0
  57. }
  58. if { $::argc > 0 } {
  59. for {set i 0} {$i < $::argc} {incr i} {
  60. set option [string trim [lindex $::argv $i]]
  61. switch -regexp -- $option {
  62. "--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
  63. "--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
  64. "--help" { print_help }
  65. default {
  66. if { [regexp {^-} $option] } {
  67. puts "ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
  68. return 1
  69. }
  70. }
  71. }
  72. }
  73. }
  74. # Set the directory path for the original project from where this script was exported
  75. set orig_proj_dir "[file normalize "$origin_dir/vivado_project"]"
  76. # Create project
  77. create_project ${_xil_proj_name_} $origin_dir/vivado_project -part xc7a100tcsg324-1 -quiet -force
  78. # Set the directory path for the new project
  79. set proj_dir [get_property directory [current_project]]
  80. # Set project properties
  81. set obj [current_project]
  82. set_property -name "default_lib" -value "xil_defaultlib" -objects $obj
  83. set_property -name "enable_vhdl_2008" -value "1" -objects $obj
  84. set_property -name "ip_cache_permissions" -value "read write" -objects $obj
  85. set_property -name "ip_output_repo" -value "$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
  86. set_property -name "mem.enable_memory_map_generation" -value "1" -objects $obj
  87. set_property -name "part" -value "xc7a100tcsg324-1" -objects $obj
  88. set_property -name "sim.central_dir" -value "$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
  89. set_property -name "sim.ip.auto_export_scripts" -value "1" -objects $obj
  90. set_property -name "simulator_language" -value "Mixed" -objects $obj
  91. set_property -name "target_language" -value "VHDL" -objects $obj
  92. set_property -name "webtalk.activehdl_export_sim" -value "2" -objects $obj
  93. set_property -name "webtalk.ies_export_sim" -value "2" -objects $obj
  94. set_property -name "webtalk.modelsim_export_sim" -value "2" -objects $obj
  95. set_property -name "webtalk.questa_export_sim" -value "2" -objects $obj
  96. set_property -name "webtalk.riviera_export_sim" -value "2" -objects $obj
  97. set_property -name "webtalk.vcs_export_sim" -value "2" -objects $obj
  98. set_property -name "webtalk.xcelium_export_sim" -value "1" -objects $obj
  99. set_property -name "webtalk.xsim_export_sim" -value "2" -objects $obj
  100. set_property -name "webtalk.xsim_launch_sim" -value "3" -objects $obj
  101. set_property -name "xpm_libraries" -value "XPM_CDC XPM_MEMORY" -objects $obj
  102. # Create 'sources_1' fileset (if not found)
  103. if {[string equal [get_filesets -quiet sources_1] ""]} {
  104. create_fileset -srcset sources_1
  105. }
  106. # Set IP repository paths
  107. set obj [get_filesets sources_1]
  108. set_property "ip_repo_paths" "[file normalize "$origin_dir/src/ip_repo"]" $obj
  109. # Rebuild user ip_repo's index before adding any source files
  110. update_ip_catalog -rebuild
  111. # Set 'sources_1' fileset object
  112. set obj [get_filesets sources_1]
  113. set files [list \
  114. [file normalize "${origin_dir}/src/hdl/Block_proc.vhd"] \
  115. [file normalize "${origin_dir}/src/hdl/Loop_Border_proc.vhd"] \
  116. [file normalize "${origin_dir}/src/hdl/Loop_Border_proc_borderbuf.vhd"] \
  117. [file normalize "${origin_dir}/src/hdl/Loop_HConvH_proc6.vhd"] \
  118. [file normalize "${origin_dir}/src/hdl/Loop_VConvH_proc.vhd"] \
  119. [file normalize "${origin_dir}/src/hdl/Loop_VConvH_proc_linebuf_0.vhd"] \
  120. [file normalize "${origin_dir}/src/hdl/globals.vhd"] \
  121. [file normalize "${origin_dir}/src/hdl/checksum.vhd"] \
  122. [file normalize "${origin_dir}/src/hdl/conv2d.vhd"] \
  123. [file normalize "${origin_dir}/src/hdl/conv2d_5x5_224p.vhd"] \
  124. [file normalize "${origin_dir}/src/hdl/dummyModule.vhd"] \
  125. [file normalize "${origin_dir}/src/hdl/fifo_w32_d2_A.vhd"] \
  126. [file normalize "${origin_dir}/src/hdl/fifo_w32_d3_A.vhd"] \
  127. [file normalize "${origin_dir}/src/hdl/filter11x11_strm.vhd"] \
  128. [file normalize "${origin_dir}/src/hdl/filter11x11_strm_ent.vhd"] \
  129. [file normalize "${origin_dir}/src/hdl/kernel_5x5.vhd"] \
  130. [file normalize "${origin_dir}/src/hdl/multiplex.vhd"] \
  131. [file normalize "${origin_dir}/src/hdl/ram.vhd"] \
  132. [file normalize "${origin_dir}/src/hdl/shiftIn.vhd"] \
  133. [file normalize "${origin_dir}/src/hdl/start_for_Block_proc_U0.vhd"] \
  134. [file normalize "${origin_dir}/src/hdl/start_for_Loop_Border_proc_U0.vhd"] \
  135. [file normalize "${origin_dir}/src/hdl/start_for_Loop_VConvH_proc_U0.vhd"] \
  136. [file normalize "${origin_dir}/src/hdl/packaging.vhd"] \
  137. [file normalize "${origin_dir}/src/testbench/tb_module_behav.wcfg"] \
  138. ]
  139. add_files -norecurse -fileset $obj $files
  140. # Set 'sources_1' fileset file properties for remote files
  141. set file "$origin_dir/src/hdl/Block_proc.vhd"
  142. set file [file normalize $file]
  143. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  144. set_property -name "file_type" -value "VHDL" -objects $file_obj
  145. set file "$origin_dir/src/hdl/Loop_Border_proc.vhd"
  146. set file [file normalize $file]
  147. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  148. set_property -name "file_type" -value "VHDL" -objects $file_obj
  149. set file "$origin_dir/src/hdl/Loop_Border_proc_borderbuf.vhd"
  150. set file [file normalize $file]
  151. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  152. set_property -name "file_type" -value "VHDL" -objects $file_obj
  153. set file "$origin_dir/src/hdl/Loop_HConvH_proc6.vhd"
  154. set file [file normalize $file]
  155. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  156. set_property -name "file_type" -value "VHDL" -objects $file_obj
  157. set file "$origin_dir/src/hdl/Loop_VConvH_proc.vhd"
  158. set file [file normalize $file]
  159. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  160. set_property -name "file_type" -value "VHDL" -objects $file_obj
  161. set file "$origin_dir/src/hdl/Loop_VConvH_proc_linebuf_0.vhd"
  162. set file [file normalize $file]
  163. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  164. set_property -name "file_type" -value "VHDL" -objects $file_obj
  165. set file "$origin_dir/src/hdl/globals.vhd"
  166. set file [file normalize $file]
  167. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  168. set_property -name "file_type" -value "VHDL" -objects $file_obj
  169. set file "$origin_dir/src/hdl/checksum.vhd"
  170. set file [file normalize $file]
  171. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  172. set_property -name "file_type" -value "VHDL" -objects $file_obj
  173. set file "$origin_dir/src/hdl/conv2d.vhd"
  174. set file [file normalize $file]
  175. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  176. set_property -name "file_type" -value "VHDL" -objects $file_obj
  177. set file "$origin_dir/src/hdl/conv2d_5x5_224p.vhd"
  178. set file [file normalize $file]
  179. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  180. set_property -name "file_type" -value "VHDL" -objects $file_obj
  181. set file "$origin_dir/src/hdl/dummyModule.vhd"
  182. set file [file normalize $file]
  183. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  184. set_property -name "file_type" -value "VHDL" -objects $file_obj
  185. set file "$origin_dir/src/hdl/fifo_w32_d2_A.vhd"
  186. set file [file normalize $file]
  187. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  188. set_property -name "file_type" -value "VHDL" -objects $file_obj
  189. set file "$origin_dir/src/hdl/fifo_w32_d3_A.vhd"
  190. set file [file normalize $file]
  191. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  192. set_property -name "file_type" -value "VHDL" -objects $file_obj
  193. set file "$origin_dir/src/hdl/filter11x11_strm.vhd"
  194. set file [file normalize $file]
  195. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  196. set_property -name "file_type" -value "VHDL" -objects $file_obj
  197. set file "$origin_dir/src/hdl/filter11x11_strm_ent.vhd"
  198. set file [file normalize $file]
  199. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  200. set_property -name "file_type" -value "VHDL" -objects $file_obj
  201. set file "$origin_dir/src/hdl/kernel_5x5.vhd"
  202. set file [file normalize $file]
  203. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  204. set_property -name "file_type" -value "VHDL" -objects $file_obj
  205. set file "$origin_dir/src/hdl/multiplex.vhd"
  206. set file [file normalize $file]
  207. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  208. set_property -name "file_type" -value "VHDL" -objects $file_obj
  209. set file "$origin_dir/src/hdl/ram.vhd"
  210. set file [file normalize $file]
  211. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  212. set_property -name "file_type" -value "VHDL" -objects $file_obj
  213. set file "$origin_dir/src/hdl/shiftIn.vhd"
  214. set file [file normalize $file]
  215. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  216. set_property -name "file_type" -value "VHDL" -objects $file_obj
  217. set file "$origin_dir/src/hdl/start_for_Block_proc_U0.vhd"
  218. set file [file normalize $file]
  219. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  220. set_property -name "file_type" -value "VHDL" -objects $file_obj
  221. set file "$origin_dir/src/hdl/start_for_Loop_Border_proc_U0.vhd"
  222. set file [file normalize $file]
  223. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  224. set_property -name "file_type" -value "VHDL" -objects $file_obj
  225. set file "$origin_dir/src/hdl/start_for_Loop_VConvH_proc_U0.vhd"
  226. set file [file normalize $file]
  227. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  228. set_property -name "file_type" -value "VHDL" -objects $file_obj
  229. set file "$origin_dir/src/hdl/packaging.vhd"
  230. set file [file normalize $file]
  231. set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
  232. set_property -name "file_type" -value "VHDL" -objects $file_obj
  233. # Set 'sources_1' fileset file properties for local files
  234. # None
  235. # Set 'sources_1' fileset properties
  236. set obj [get_filesets sources_1]
  237. set_property -name "top" -value "design_1_wrapper" -objects $obj
  238. set_property -name "top_auto_set" -value "0" -objects $obj
  239. # Create 'constrs_1' fileset (if not found)
  240. if {[string equal [get_filesets -quiet constrs_1] ""]} {
  241. create_fileset -constrset constrs_1
  242. }
  243. # Set 'constrs_1' fileset object
  244. set obj [get_filesets constrs_1]
  245. # Add/Import constrs file and set constrs file properties
  246. set file "[file normalize ${origin_dir}/vivado_project/vhdl-modules.srcs/constrs_1/imports/constraints/nexys_4_ddr.xdc]"
  247. set file_added [add_files -norecurse -fileset $obj [list $file]]
  248. set file "$origin_dir/vivado_project/vhdl-modules.srcs/constrs_1/imports/constraints/nexys_4_ddr.xdc"
  249. set file [file normalize $file]
  250. set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
  251. set_property -name "file_type" -value "XDC" -objects $file_obj
  252. # Set 'constrs_1' fileset properties
  253. set obj [get_filesets constrs_1]
  254. set_property -name "target_part" -value "xc7a100tcsg324-1" -objects $obj
  255. # Create 'sim_1' fileset (if not found)
  256. if {[string equal [get_filesets -quiet sim_1] ""]} {
  257. create_fileset -simset sim_1
  258. }
  259. # Set 'sim_1' fileset object
  260. set obj [get_filesets sim_1]
  261. set files [list \
  262. [file normalize "${origin_dir}/src/hdl/tb.vhd"] \
  263. [file normalize "${origin_dir}/src/testbench/packaging_tb.vhd"] \
  264. ]
  265. add_files -norecurse -fileset $obj $files
  266. # Set 'sim_1' fileset file properties for remote files
  267. set file "$origin_dir/src/hdl/tb.vhd"
  268. set file [file normalize $file]
  269. set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
  270. set_property -name "file_type" -value "VHDL" -objects $file_obj
  271. set file "$origin_dir/src/testbench/packaging_tb.vhd"
  272. set file [file normalize $file]
  273. set file_obj [get_files -of_objects [get_filesets sim_1] [list "*$file"]]
  274. set_property -name "file_type" -value "VHDL" -objects $file_obj
  275. # Set 'sim_1' fileset file properties for local files
  276. # None
  277. # Set 'sim_1' fileset properties
  278. set obj [get_filesets sim_1]
  279. set_property -name "top" -value "tb_module" -objects $obj
  280. set_property -name "top_auto_set" -value "0" -objects $obj
  281. set_property -name "top_lib" -value "xil_defaultlib" -objects $obj
  282. # Set 'utils_1' fileset object
  283. set obj [get_filesets utils_1]
  284. # Empty (no sources present)
  285. # Set 'utils_1' fileset properties
  286. set obj [get_filesets utils_1]
  287. # Adding sources referenced in BDs, if not already added
  288. if { [get_files Block_proc.vhd] == "" } {
  289. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/Block_proc.vhd
  290. }
  291. if { [get_files Loop_Border_proc.vhd] == "" } {
  292. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/Loop_Border_proc.vhd
  293. }
  294. if { [get_files Loop_Border_proc_borderbuf.vhd] == "" } {
  295. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/Loop_Border_proc_borderbuf.vhd
  296. }
  297. if { [get_files Loop_HConvH_proc6.vhd] == "" } {
  298. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/Loop_HConvH_proc6.vhd
  299. }
  300. if { [get_files Loop_VConvH_proc.vhd] == "" } {
  301. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/Loop_VConvH_proc.vhd
  302. }
  303. if { [get_files Loop_VConvH_proc_linebuf_0.vhd] == "" } {
  304. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/Loop_VConvH_proc_linebuf_0.vhd
  305. }
  306. if { [get_files globals.vhd] == "" } {
  307. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/globals.vhd
  308. }
  309. if { [get_files checksum.vhd] == "" } {
  310. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/checksum.vhd
  311. }
  312. if { [get_files conv2d.vhd] == "" } {
  313. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/conv2d.vhd
  314. }
  315. if { [get_files conv2d_5x5_224p.vhd] == "" } {
  316. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/conv2d_5x5_224p.vhd
  317. }
  318. if { [get_files dummyModule.vhd] == "" } {
  319. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/dummyModule.vhd
  320. }
  321. if { [get_files fifo_w32_d2_A.vhd] == "" } {
  322. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/fifo_w32_d2_A.vhd
  323. }
  324. if { [get_files fifo_w32_d3_A.vhd] == "" } {
  325. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/fifo_w32_d3_A.vhd
  326. }
  327. if { [get_files filter11x11_strm.vhd] == "" } {
  328. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/filter11x11_strm.vhd
  329. }
  330. if { [get_files filter11x11_strm_ent.vhd] == "" } {
  331. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/filter11x11_strm_ent.vhd
  332. }
  333. if { [get_files kernel_5x5.vhd] == "" } {
  334. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/kernel_5x5.vhd
  335. }
  336. if { [get_files multiplex.vhd] == "" } {
  337. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/multiplex.vhd
  338. }
  339. if { [get_files ram.vhd] == "" } {
  340. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/ram.vhd
  341. }
  342. if { [get_files shiftIn.vhd] == "" } {
  343. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/shiftIn.vhd
  344. }
  345. if { [get_files start_for_Block_proc_U0.vhd] == "" } {
  346. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/start_for_Block_proc_U0.vhd
  347. }
  348. if { [get_files start_for_Loop_Border_proc_U0.vhd] == "" } {
  349. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/start_for_Loop_Border_proc_U0.vhd
  350. }
  351. if { [get_files start_for_Loop_VConvH_proc_U0.vhd] == "" } {
  352. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/start_for_Loop_VConvH_proc_U0.vhd
  353. }
  354. if { [get_files packaging.vhd] == "" } {
  355. import_files -quiet -fileset sources_1 C:/Users/johan/mlfpga/repos/vhdl-modules/src/hdl/packaging.vhd
  356. }
  357. # Proc to create BD design_1
  358. proc cr_bd_design_1 { parentCell } {
  359. # The design that will be created by this Tcl proc contains the following
  360. # module references:
  361. # packaging
  362. # CHANGE DESIGN NAME HERE
  363. set design_name design_1
  364. common::send_msg_id "BD_TCL-003" "INFO" "Currently there is no design <$design_name> in project, so creating one..."
  365. create_bd_design $design_name
  366. set bCheckIPsPassed 1
  367. ##################################################################
  368. # CHECK IPs
  369. ##################################################################
  370. set bCheckIPs 1
  371. if { $bCheckIPs == 1 } {
  372. set list_check_ips "\
  373. xilinx.com:ip:c_counter_binary:12.0\
  374. xilinx.com:user:ethernet_transceiver2:1.0\
  375. xilinx.com:ip:fifo_generator:13.2\
  376. xilinx.com:ip:c_addsub:12.0\
  377. xilinx.com:user:segment:1.0\
  378. xilinx.com:ip:xlconcat:2.1\
  379. xilinx.com:ip:xlconstant:1.1\
  380. xilinx.com:ip:xlslice:1.0\
  381. "
  382. set list_ips_missing ""
  383. common::send_msg_id "BD_TCL-006" "INFO" "Checking if the following IPs exist in the project's IP catalog: $list_check_ips ."
  384. foreach ip_vlnv $list_check_ips {
  385. set ip_obj [get_ipdefs -all $ip_vlnv]
  386. if { $ip_obj eq "" } {
  387. lappend list_ips_missing $ip_vlnv
  388. }
  389. }
  390. if { $list_ips_missing ne "" } {
  391. catch {common::send_msg_id "BD_TCL-115" "ERROR" "The following IPs are not found in the IP Catalog:\n $list_ips_missing\n\nResolution: Please add the repository containing the IP(s) to the project." }
  392. set bCheckIPsPassed 0
  393. }
  394. }
  395. ##################################################################
  396. # CHECK Modules
  397. ##################################################################
  398. set bCheckModules 1
  399. if { $bCheckModules == 1 } {
  400. set list_check_mods "\
  401. packaging\
  402. "
  403. set list_mods_missing ""
  404. common::send_msg_id "BD_TCL-006" "INFO" "Checking if the following modules exist in the project's sources: $list_check_mods ."
  405. foreach mod_vlnv $list_check_mods {
  406. if { [can_resolve_reference $mod_vlnv] == 0 } {
  407. lappend list_mods_missing $mod_vlnv
  408. }
  409. }
  410. if { $list_mods_missing ne "" } {
  411. catch {common::send_msg_id "BD_TCL-115" "ERROR" "The following module(s) are not found in the project: $list_mods_missing" }
  412. common::send_msg_id "BD_TCL-008" "INFO" "Please add source files for the missing module(s) above."
  413. set bCheckIPsPassed 0
  414. }
  415. }
  416. if { $bCheckIPsPassed != 1 } {
  417. common::send_msg_id "BD_TCL-1003" "WARNING" "Will not continue with creation of design due to the error(s) above."
  418. return 3
  419. }
  420. variable script_folder
  421. if { $parentCell eq "" } {
  422. set parentCell [get_bd_cells /]
  423. }
  424. # Get object for parentCell
  425. set parentObj [get_bd_cells $parentCell]
  426. if { $parentObj == "" } {
  427. catch {common::send_msg_id "BD_TCL-100" "ERROR" "Unable to find parent cell <$parentCell>!"}
  428. return
  429. }
  430. # Make sure parentObj is hier blk
  431. set parentType [get_property TYPE $parentObj]
  432. if { $parentType ne "hier" } {
  433. catch {common::send_msg_id "BD_TCL-101" "ERROR" "Parent <$parentObj> has TYPE = <$parentType>. Expected to be <hier>."}
  434. return
  435. }
  436. # Save current instance; Restore later
  437. set oldCurInst [current_bd_instance .]
  438. # Set parent object as current
  439. current_bd_instance $parentObj
  440. # Create interface ports
  441. # Create ports
  442. set anodes_0 [ create_bd_port -dir O -from 0 -to 7 anodes_0 ]
  443. set cathodes_0 [ create_bd_port -dir O -from 0 -to 7 cathodes_0 ]
  444. set clk_100MHz [ create_bd_port -dir I -type clk clk_100MHz ]
  445. set_property -dict [ list \
  446. CONFIG.FREQ_HZ {100000000} \
  447. ] $clk_100MHz
  448. set eth_crsdv_0 [ create_bd_port -dir IO eth_crsdv_0 ]
  449. set eth_mdc_0 [ create_bd_port -dir O eth_mdc_0 ]
  450. set eth_mdio_0 [ create_bd_port -dir IO eth_mdio_0 ]
  451. set eth_refclk_0 [ create_bd_port -dir O eth_refclk_0 ]
  452. set eth_rstn_0 [ create_bd_port -dir IO -type rst eth_rstn_0 ]
  453. set eth_rxd_0 [ create_bd_port -dir IO -from 1 -to 0 eth_rxd_0 ]
  454. set eth_rxerr_0 [ create_bd_port -dir IO eth_rxerr_0 ]
  455. set eth_txd_0 [ create_bd_port -dir IO -from 1 -to 0 eth_txd_0 ]
  456. set eth_txen_0 [ create_bd_port -dir IO eth_txen_0 ]
  457. set led16_b_0 [ create_bd_port -dir O led16_b_0 ]
  458. set led16_g_0 [ create_bd_port -dir O led16_g_0 ]
  459. set led16_r_0 [ create_bd_port -dir O led16_r_0 ]
  460. set led17_b_0 [ create_bd_port -dir O led17_b_0 ]
  461. set led17_g_0 [ create_bd_port -dir O led17_g_0 ]
  462. set led17_r_0 [ create_bd_port -dir O led17_r_0 ]
  463. set led_0 [ create_bd_port -dir O -from 15 -to 0 led_0 ]
  464. set reset_rtl_0 [ create_bd_port -dir I -type rst reset_rtl_0 ]
  465. set_property -dict [ list \
  466. CONFIG.POLARITY {ACTIVE_LOW} \
  467. ] $reset_rtl_0
  468. set sw_0 [ create_bd_port -dir I -from 4 -to 0 sw_0 ]
  469. # Create instance: c_counter_binary_0, and set properties
  470. set c_counter_binary_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:c_counter_binary:12.0 c_counter_binary_0 ]
  471. set_property -dict [ list \
  472. CONFIG.CE {true} \
  473. CONFIG.Fb_Latency {2} \
  474. CONFIG.Fb_Latency_Configuration {Automatic} \
  475. CONFIG.Final_Count_Value {270F} \
  476. CONFIG.Latency_Configuration {Automatic} \
  477. CONFIG.Restrict_Count {true} \
  478. CONFIG.SCLR {true} \
  479. CONFIG.SSET {false} \
  480. ] $c_counter_binary_0
  481. # Create instance: c_counter_binary_1, and set properties
  482. set c_counter_binary_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:c_counter_binary:12.0 c_counter_binary_1 ]
  483. set_property -dict [ list \
  484. CONFIG.CE {true} \
  485. CONFIG.Fb_Latency {2} \
  486. CONFIG.Fb_Latency_Configuration {Automatic} \
  487. CONFIG.Final_Count_Value {270F} \
  488. CONFIG.Latency_Configuration {Automatic} \
  489. CONFIG.Restrict_Count {true} \
  490. CONFIG.SCLR {true} \
  491. CONFIG.SSET {false} \
  492. ] $c_counter_binary_1
  493. # Create instance: ethernet_transceiver2_0, and set properties
  494. set ethernet_transceiver2_0 [ create_bd_cell -type ip -vlnv xilinx.com:user:ethernet_transceiver2:1.0 ethernet_transceiver2_0 ]
  495. # Create instance: fifo_input, and set properties
  496. set fifo_input [ create_bd_cell -type ip -vlnv xilinx.com:ip:fifo_generator:13.2 fifo_input ]
  497. set_property -dict [ list \
  498. CONFIG.Almost_Empty_Flag {false} \
  499. CONFIG.Data_Count {false} \
  500. CONFIG.Data_Count_Width {6} \
  501. CONFIG.Empty_Threshold_Assert_Value {2} \
  502. CONFIG.Empty_Threshold_Assert_Value_rach {1022} \
  503. CONFIG.Empty_Threshold_Assert_Value_wach {1022} \
  504. CONFIG.Empty_Threshold_Assert_Value_wrch {1022} \
  505. CONFIG.Empty_Threshold_Negate_Value {3} \
  506. CONFIG.Enable_Safety_Circuit {false} \
  507. CONFIG.FIFO_Implementation_rach {Common_Clock_Distributed_RAM} \
  508. CONFIG.FIFO_Implementation_wach {Common_Clock_Distributed_RAM} \
  509. CONFIG.FIFO_Implementation_wrch {Common_Clock_Distributed_RAM} \
  510. CONFIG.Fifo_Implementation {Common_Clock_Distributed_RAM} \
  511. CONFIG.Full_Flags_Reset_Value {0} \
  512. CONFIG.Full_Threshold_Assert_Value {62} \
  513. CONFIG.Full_Threshold_Assert_Value_rach {1023} \
  514. CONFIG.Full_Threshold_Assert_Value_wach {1023} \
  515. CONFIG.Full_Threshold_Assert_Value_wrch {1023} \
  516. CONFIG.Full_Threshold_Negate_Value {61} \
  517. CONFIG.INTERFACE_TYPE {Native} \
  518. CONFIG.Input_Data_Width {32} \
  519. CONFIG.Input_Depth {64} \
  520. CONFIG.Output_Data_Width {32} \
  521. CONFIG.Output_Depth {64} \
  522. CONFIG.Overflow_Flag {true} \
  523. CONFIG.Performance_Options {Standard_FIFO} \
  524. CONFIG.Programmable_Empty_Type {No_Programmable_Empty_Threshold} \
  525. CONFIG.Programmable_Full_Type {No_Programmable_Full_Threshold} \
  526. CONFIG.Read_Data_Count {false} \
  527. CONFIG.Read_Data_Count_Width {6} \
  528. CONFIG.Reset_Pin {true} \
  529. CONFIG.Reset_Type {Synchronous_Reset} \
  530. CONFIG.Underflow_Flag {false} \
  531. CONFIG.Use_Dout_Reset {true} \
  532. CONFIG.Use_Embedded_Registers {false} \
  533. CONFIG.Use_Extra_Logic {false} \
  534. CONFIG.Valid_Flag {false} \
  535. CONFIG.Write_Data_Count {false} \
  536. CONFIG.Write_Data_Count_Width {6} \
  537. ] $fifo_input
  538. # Create instance: fifo_output, and set properties
  539. set fifo_output [ create_bd_cell -type ip -vlnv xilinx.com:ip:fifo_generator:13.2 fifo_output ]
  540. set_property -dict [ list \
  541. CONFIG.Almost_Empty_Flag {false} \
  542. CONFIG.Almost_Full_Flag {false} \
  543. CONFIG.Data_Count {false} \
  544. CONFIG.Data_Count_Width {9} \
  545. CONFIG.Empty_Threshold_Assert_Value {2} \
  546. CONFIG.Empty_Threshold_Assert_Value_rach {1022} \
  547. CONFIG.Empty_Threshold_Assert_Value_wach {1022} \
  548. CONFIG.Empty_Threshold_Assert_Value_wrch {1022} \
  549. CONFIG.Empty_Threshold_Negate_Value {3} \
  550. CONFIG.Enable_Safety_Circuit {false} \
  551. CONFIG.FIFO_Implementation_rach {Common_Clock_Distributed_RAM} \
  552. CONFIG.FIFO_Implementation_wach {Common_Clock_Distributed_RAM} \
  553. CONFIG.FIFO_Implementation_wrch {Common_Clock_Distributed_RAM} \
  554. CONFIG.Fifo_Implementation {Independent_Clocks_Distributed_RAM} \
  555. CONFIG.Full_Flags_Reset_Value {1} \
  556. CONFIG.Full_Threshold_Assert_Value {509} \
  557. CONFIG.Full_Threshold_Assert_Value_rach {1023} \
  558. CONFIG.Full_Threshold_Assert_Value_wach {1023} \
  559. CONFIG.Full_Threshold_Assert_Value_wrch {1023} \
  560. CONFIG.Full_Threshold_Negate_Value {508} \
  561. CONFIG.INTERFACE_TYPE {Native} \
  562. CONFIG.Input_Data_Width {32} \
  563. CONFIG.Input_Depth {512} \
  564. CONFIG.Output_Data_Width {32} \
  565. CONFIG.Output_Depth {512} \
  566. CONFIG.Overflow_Flag {true} \
  567. CONFIG.Performance_Options {Standard_FIFO} \
  568. CONFIG.Programmable_Empty_Type {No_Programmable_Empty_Threshold} \
  569. CONFIG.Programmable_Full_Type {No_Programmable_Full_Threshold} \
  570. CONFIG.Read_Data_Count {true} \
  571. CONFIG.Read_Data_Count_Width {9} \
  572. CONFIG.Reset_Pin {true} \
  573. CONFIG.Reset_Type {Asynchronous_Reset} \
  574. CONFIG.Underflow_Flag {false} \
  575. CONFIG.Use_Dout_Reset {true} \
  576. CONFIG.Use_Embedded_Registers {false} \
  577. CONFIG.Use_Extra_Logic {false} \
  578. CONFIG.Valid_Flag {false} \
  579. CONFIG.Write_Data_Count {false} \
  580. CONFIG.Write_Data_Count_Width {9} \
  581. ] $fifo_output
  582. # Create instance: negate_0, and set properties
  583. set negate_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:c_addsub:12.0 negate_0 ]
  584. set_property -dict [ list \
  585. CONFIG.A_Type {Unsigned} \
  586. CONFIG.A_Width {1} \
  587. CONFIG.Add_Mode {Add} \
  588. CONFIG.B_Constant {true} \
  589. CONFIG.B_Type {Unsigned} \
  590. CONFIG.B_Value {1} \
  591. CONFIG.B_Width {1} \
  592. CONFIG.CE {false} \
  593. CONFIG.Latency {1} \
  594. CONFIG.Latency_Configuration {Automatic} \
  595. CONFIG.Out_Width {1} \
  596. ] $negate_0
  597. # Create instance: packaging_0, and set properties
  598. set block_name packaging
  599. set block_cell_name packaging_0
  600. if { [catch {set packaging_0 [create_bd_cell -type module -reference $block_name $block_cell_name] } errmsg] } {
  601. catch {common::send_msg_id "BD_TCL-105" "ERROR" "Unable to add referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
  602. return 1
  603. } elseif { $packaging_0 eq "" } {
  604. catch {common::send_msg_id "BD_TCL-106" "ERROR" "Unable to referenced block <$block_name>. Please add the files for ${block_name}'s definition into the project."}
  605. return 1
  606. }
  607. # Create instance: segment_0, and set properties
  608. set segment_0 [ create_bd_cell -type ip -vlnv xilinx.com:user:segment:1.0 segment_0 ]
  609. # Create instance: xlconcat_4, and set properties
  610. set xlconcat_4 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconcat:2.1 xlconcat_4 ]
  611. set_property -dict [ list \
  612. CONFIG.IN0_WIDTH {4} \
  613. CONFIG.IN1_WIDTH {4} \
  614. CONFIG.IN2_WIDTH {8} \
  615. CONFIG.IN3_WIDTH {2} \
  616. CONFIG.IN4_WIDTH {5} \
  617. CONFIG.NUM_PORTS {3} \
  618. ] $xlconcat_4
  619. # Create instance: xlconcat_5, and set properties
  620. set xlconcat_5 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconcat:2.1 xlconcat_5 ]
  621. set_property -dict [ list \
  622. CONFIG.IN0_WIDTH {9} \
  623. CONFIG.IN1_WIDTH {7} \
  624. CONFIG.IN2_WIDTH {8} \
  625. CONFIG.IN3_WIDTH {2} \
  626. CONFIG.IN4_WIDTH {5} \
  627. CONFIG.NUM_PORTS {2} \
  628. ] $xlconcat_5
  629. # Create instance: xlconstant_0, and set properties
  630. set xlconstant_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 xlconstant_0 ]
  631. set_property -dict [ list \
  632. CONFIG.CONST_VAL {0} \
  633. CONFIG.CONST_WIDTH {16} \
  634. ] $xlconstant_0
  635. # Create instance: xlconstant_1, and set properties
  636. set xlconstant_1 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 xlconstant_1 ]
  637. set_property -dict [ list \
  638. CONFIG.CONST_VAL {0} \
  639. CONFIG.CONST_WIDTH {7} \
  640. ] $xlconstant_1
  641. # Create instance: xlslice_0, and set properties
  642. set xlslice_0 [ create_bd_cell -type ip -vlnv xilinx.com:ip:xlslice:1.0 xlslice_0 ]
  643. set_property -dict [ list \
  644. CONFIG.DIN_FROM {7} \
  645. CONFIG.DIN_TO {0} \
  646. CONFIG.DIN_WIDTH {16} \
  647. CONFIG.DOUT_WIDTH {8} \
  648. ] $xlslice_0
  649. # Create interface connections
  650. connect_bd_intf_net -intf_net ethernet_transceiver2_0_fifo_read [get_bd_intf_pins ethernet_transceiver2_0/fifo_read] [get_bd_intf_pins fifo_output/FIFO_READ]
  651. connect_bd_intf_net -intf_net ethernet_transceiver2_0_fifo_write [get_bd_intf_pins ethernet_transceiver2_0/fifo_write] [get_bd_intf_pins fifo_input/FIFO_WRITE]
  652. # Create port connections
  653. connect_bd_net -net Net [get_bd_ports eth_rxd_0] [get_bd_pins ethernet_transceiver2_0/eth_rxd]
  654. connect_bd_net -net Net1 [get_bd_ports eth_txd_0] [get_bd_pins ethernet_transceiver2_0/eth_txd]
  655. connect_bd_net -net Net2 [get_bd_ports eth_crsdv_0] [get_bd_pins ethernet_transceiver2_0/eth_crsdv]
  656. connect_bd_net -net Net3 [get_bd_ports eth_txen_0] [get_bd_pins ethernet_transceiver2_0/eth_txen]
  657. connect_bd_net -net Net4 [get_bd_ports eth_rxerr_0] [get_bd_pins ethernet_transceiver2_0/eth_rxerr]
  658. connect_bd_net -net Net5 [get_bd_ports eth_mdio_0] [get_bd_pins ethernet_transceiver2_0/eth_mdio]
  659. connect_bd_net -net Net6 [get_bd_ports eth_rstn_0] [get_bd_pins ethernet_transceiver2_0/eth_rstn]
  660. connect_bd_net -net c_counter_binary_0_Q [get_bd_pins c_counter_binary_0/Q] [get_bd_pins segment_0/num2]
  661. connect_bd_net -net c_counter_binary_1_Q [get_bd_pins c_counter_binary_1/Q] [get_bd_pins segment_0/num1]
  662. connect_bd_net -net clk_wiz_clk_out1 [get_bd_ports clk_100MHz] [get_bd_pins c_counter_binary_0/CLK] [get_bd_pins c_counter_binary_1/CLK] [get_bd_pins ethernet_transceiver2_0/clk100mhz] [get_bd_pins fifo_input/clk] [get_bd_pins fifo_output/wr_clk] [get_bd_pins negate_0/CLK] [get_bd_pins packaging_0/clk] [get_bd_pins segment_0/clk]
  663. connect_bd_net -net ethernet_transceiver2_0_eth_mdc [get_bd_ports eth_mdc_0] [get_bd_pins ethernet_transceiver2_0/eth_mdc]
  664. connect_bd_net -net ethernet_transceiver2_0_eth_refclk [get_bd_ports eth_refclk_0] [get_bd_pins ethernet_transceiver2_0/eth_refclk] [get_bd_pins fifo_output/rd_clk]
  665. connect_bd_net -net ethernet_transceiver2_0_led16_b [get_bd_ports led16_b_0] [get_bd_pins ethernet_transceiver2_0/led16_b]
  666. connect_bd_net -net ethernet_transceiver2_0_led16_g [get_bd_ports led16_g_0] [get_bd_pins ethernet_transceiver2_0/led16_g]
  667. connect_bd_net -net ethernet_transceiver2_0_led16_r [get_bd_ports led16_r_0] [get_bd_pins ethernet_transceiver2_0/led16_r]
  668. connect_bd_net -net ethernet_transceiver2_0_led17_b [get_bd_ports led17_b_0] [get_bd_pins ethernet_transceiver2_0/led17_b]
  669. connect_bd_net -net ethernet_transceiver2_0_led17_g [get_bd_ports led17_g_0] [get_bd_pins ethernet_transceiver2_0/led17_g]
  670. connect_bd_net -net ethernet_transceiver2_0_led17_r [get_bd_ports led17_r_0] [get_bd_pins ethernet_transceiver2_0/led17_r]
  671. connect_bd_net -net fifo_input_dout [get_bd_pins fifo_input/dout] [get_bd_pins packaging_0/inputStream]
  672. connect_bd_net -net fifo_input_empty [get_bd_pins fifo_input/empty] [get_bd_pins packaging_0/inputEmpty]
  673. connect_bd_net -net fifo_input_overflow [get_bd_pins c_counter_binary_1/CE] [get_bd_pins fifo_input/overflow]
  674. connect_bd_net -net fifo_output_full [get_bd_pins fifo_output/full] [get_bd_pins packaging_0/outputFull]
  675. connect_bd_net -net fifo_output_overflow [get_bd_pins c_counter_binary_0/CE] [get_bd_pins fifo_output/overflow]
  676. connect_bd_net -net fifo_output_rd_data_count [get_bd_pins fifo_output/rd_data_count] [get_bd_pins xlconcat_5/In0]
  677. connect_bd_net -net packaging_0_errorCode [get_bd_pins packaging_0/errorCode] [get_bd_pins xlconcat_4/In0]
  678. connect_bd_net -net packaging_0_inpRdEn [get_bd_pins fifo_input/rd_en] [get_bd_pins packaging_0/inpRdEn]
  679. connect_bd_net -net packaging_0_outData [get_bd_pins fifo_output/din] [get_bd_pins packaging_0/outData]
  680. connect_bd_net -net packaging_0_outWrEn [get_bd_pins fifo_output/wr_en] [get_bd_pins packaging_0/outWrEn]
  681. connect_bd_net -net packaging_0_stateOut [get_bd_pins packaging_0/stateOut] [get_bd_pins xlconcat_4/In1]
  682. connect_bd_net -net rst_clk_wiz_100M_peripheral_aresetn [get_bd_ports reset_rtl_0] [get_bd_pins ethernet_transceiver2_0/btn_reset] [get_bd_pins negate_0/A] [get_bd_pins packaging_0/rst]
  683. connect_bd_net -net segment_0_anodes [get_bd_ports anodes_0] [get_bd_pins segment_0/anodes]
  684. connect_bd_net -net segment_0_cathodes [get_bd_ports cathodes_0] [get_bd_pins segment_0/cathodes]
  685. connect_bd_net -net sw_0_1 [get_bd_ports sw_0] [get_bd_pins ethernet_transceiver2_0/ip]
  686. connect_bd_net -net xlconcat_4_dout [get_bd_ports led_0] [get_bd_pins xlconcat_4/dout]
  687. connect_bd_net -net xlconcat_5_dout [get_bd_pins ethernet_transceiver2_0/fifo_read_length] [get_bd_pins xlconcat_5/dout] [get_bd_pins xlslice_0/Din]
  688. connect_bd_net -net xlconstant_0_dout [get_bd_pins ethernet_transceiver2_0/udp_packet_checksum] [get_bd_pins xlconstant_0/dout]
  689. connect_bd_net -net xlconstant_1_dout [get_bd_pins xlconcat_5/In1] [get_bd_pins xlconstant_1/dout]
  690. connect_bd_net -net xlslice_0_Dout [get_bd_pins xlconcat_4/In2] [get_bd_pins xlslice_0/Dout]
  691. connect_bd_net -net xlslice_1_Dout [get_bd_pins c_counter_binary_0/SCLR] [get_bd_pins c_counter_binary_1/SCLR] [get_bd_pins fifo_input/srst] [get_bd_pins fifo_output/rst] [get_bd_pins negate_0/S]
  692. # Create address segments
  693. # Restore current instance
  694. current_bd_instance $oldCurInst
  695. validate_bd_design
  696. save_bd_design
  697. close_bd_design $design_name
  698. }
  699. # End of cr_bd_design_1()
  700. cr_bd_design_1 ""
  701. set_property REGISTERED_WITH_MANAGER "1" [get_files design_1.bd ]
  702. set_property SYNTH_CHECKPOINT_MODE "Hierarchical" [get_files design_1.bd ]
  703. # Create wrapper file for design_1.bd
  704. make_wrapper -files [get_files design_1.bd] -import -top
  705. # Create 'synth_1' run (if not found)
  706. if {[string equal [get_runs -quiet synth_1] ""]} {
  707. create_run -name synth_1 -part xc7a100tcsg324-1 -flow {Vivado Synthesis 2018} -strategy "Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
  708. } else {
  709. set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
  710. set_property flow "Vivado Synthesis 2018" [get_runs synth_1]
  711. }
  712. set obj [get_runs synth_1]
  713. set_property set_report_strategy_name 1 $obj
  714. set_property report_strategy {Vivado Synthesis Default Reports} $obj
  715. set_property set_report_strategy_name 0 $obj
  716. # Create 'synth_1_synth_report_utilization_0' report (if not found)
  717. if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0] "" ] } {
  718. create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
  719. }
  720. set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
  721. if { $obj != "" } {
  722. set_property -name "display_name" -value "synth_1_synth_report_utilization_0" -objects $obj
  723. }
  724. set obj [get_runs synth_1]
  725. set_property -name "part" -value "xc7a100tcsg324-1" -objects $obj
  726. set_property -name "strategy" -value "Vivado Synthesis Defaults" -objects $obj
  727. # set the current synth run
  728. current_run -synthesis [get_runs synth_1]
  729. # Create 'impl_1' run (if not found)
  730. if {[string equal [get_runs -quiet impl_1] ""]} {
  731. create_run -name impl_1 -part xc7a100tcsg324-1 -flow {Vivado Implementation 2018} -strategy "Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
  732. } else {
  733. set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
  734. set_property flow "Vivado Implementation 2018" [get_runs impl_1]
  735. }
  736. set obj [get_runs impl_1]
  737. set_property set_report_strategy_name 1 $obj
  738. set_property report_strategy {Vivado Implementation Default Reports} $obj
  739. set_property set_report_strategy_name 0 $obj
  740. # Create 'impl_1_init_report_timing_summary_0' report (if not found)
  741. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0] "" ] } {
  742. create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
  743. }
  744. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
  745. if { $obj != "" } {
  746. set_property -name "is_enabled" -value "0" -objects $obj
  747. set_property -name "display_name" -value "impl_1_init_report_timing_summary_0" -objects $obj
  748. }
  749. # Create 'impl_1_opt_report_drc_0' report (if not found)
  750. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0] "" ] } {
  751. create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
  752. }
  753. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
  754. if { $obj != "" } {
  755. set_property -name "display_name" -value "impl_1_opt_report_drc_0" -objects $obj
  756. }
  757. # Create 'impl_1_opt_report_timing_summary_0' report (if not found)
  758. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0] "" ] } {
  759. create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
  760. }
  761. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
  762. if { $obj != "" } {
  763. set_property -name "is_enabled" -value "0" -objects $obj
  764. set_property -name "display_name" -value "impl_1_opt_report_timing_summary_0" -objects $obj
  765. }
  766. # Create 'impl_1_power_opt_report_timing_summary_0' report (if not found)
  767. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0] "" ] } {
  768. create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
  769. }
  770. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
  771. if { $obj != "" } {
  772. set_property -name "is_enabled" -value "0" -objects $obj
  773. set_property -name "display_name" -value "impl_1_power_opt_report_timing_summary_0" -objects $obj
  774. }
  775. # Create 'impl_1_place_report_io_0' report (if not found)
  776. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0] "" ] } {
  777. create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
  778. }
  779. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
  780. if { $obj != "" } {
  781. set_property -name "display_name" -value "impl_1_place_report_io_0" -objects $obj
  782. }
  783. # Create 'impl_1_place_report_utilization_0' report (if not found)
  784. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0] "" ] } {
  785. create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
  786. }
  787. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
  788. if { $obj != "" } {
  789. set_property -name "display_name" -value "impl_1_place_report_utilization_0" -objects $obj
  790. }
  791. # Create 'impl_1_place_report_control_sets_0' report (if not found)
  792. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0] "" ] } {
  793. create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
  794. }
  795. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
  796. if { $obj != "" } {
  797. set_property -name "display_name" -value "impl_1_place_report_control_sets_0" -objects $obj
  798. }
  799. # Create 'impl_1_place_report_incremental_reuse_0' report (if not found)
  800. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0] "" ] } {
  801. create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
  802. }
  803. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
  804. if { $obj != "" } {
  805. set_property -name "is_enabled" -value "0" -objects $obj
  806. set_property -name "display_name" -value "impl_1_place_report_incremental_reuse_0" -objects $obj
  807. }
  808. # Create 'impl_1_place_report_incremental_reuse_1' report (if not found)
  809. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1] "" ] } {
  810. create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
  811. }
  812. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
  813. if { $obj != "" } {
  814. set_property -name "is_enabled" -value "0" -objects $obj
  815. set_property -name "display_name" -value "impl_1_place_report_incremental_reuse_1" -objects $obj
  816. }
  817. # Create 'impl_1_place_report_timing_summary_0' report (if not found)
  818. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0] "" ] } {
  819. create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
  820. }
  821. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
  822. if { $obj != "" } {
  823. set_property -name "is_enabled" -value "0" -objects $obj
  824. set_property -name "display_name" -value "impl_1_place_report_timing_summary_0" -objects $obj
  825. }
  826. # Create 'impl_1_post_place_power_opt_report_timing_summary_0' report (if not found)
  827. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0] "" ] } {
  828. create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
  829. }
  830. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
  831. if { $obj != "" } {
  832. set_property -name "is_enabled" -value "0" -objects $obj
  833. set_property -name "display_name" -value "impl_1_post_place_power_opt_report_timing_summary_0" -objects $obj
  834. }
  835. # Create 'impl_1_phys_opt_report_timing_summary_0' report (if not found)
  836. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0] "" ] } {
  837. create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
  838. }
  839. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
  840. if { $obj != "" } {
  841. set_property -name "is_enabled" -value "0" -objects $obj
  842. set_property -name "display_name" -value "impl_1_phys_opt_report_timing_summary_0" -objects $obj
  843. }
  844. # Create 'impl_1_route_report_drc_0' report (if not found)
  845. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0] "" ] } {
  846. create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
  847. }
  848. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
  849. if { $obj != "" } {
  850. set_property -name "display_name" -value "impl_1_route_report_drc_0" -objects $obj
  851. }
  852. # Create 'impl_1_route_report_methodology_0' report (if not found)
  853. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0] "" ] } {
  854. create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
  855. }
  856. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
  857. if { $obj != "" } {
  858. set_property -name "display_name" -value "impl_1_route_report_methodology_0" -objects $obj
  859. }
  860. # Create 'impl_1_route_report_power_0' report (if not found)
  861. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0] "" ] } {
  862. create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
  863. }
  864. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
  865. if { $obj != "" } {
  866. set_property -name "display_name" -value "impl_1_route_report_power_0" -objects $obj
  867. }
  868. # Create 'impl_1_route_report_route_status_0' report (if not found)
  869. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0] "" ] } {
  870. create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
  871. }
  872. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
  873. if { $obj != "" } {
  874. set_property -name "display_name" -value "impl_1_route_report_route_status_0" -objects $obj
  875. }
  876. # Create 'impl_1_route_report_timing_summary_0' report (if not found)
  877. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0] "" ] } {
  878. create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
  879. }
  880. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
  881. if { $obj != "" } {
  882. set_property -name "display_name" -value "impl_1_route_report_timing_summary_0" -objects $obj
  883. }
  884. # Create 'impl_1_route_report_incremental_reuse_0' report (if not found)
  885. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0] "" ] } {
  886. create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
  887. }
  888. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
  889. if { $obj != "" } {
  890. set_property -name "display_name" -value "impl_1_route_report_incremental_reuse_0" -objects $obj
  891. }
  892. # Create 'impl_1_route_report_clock_utilization_0' report (if not found)
  893. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0] "" ] } {
  894. create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
  895. }
  896. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
  897. if { $obj != "" } {
  898. set_property -name "display_name" -value "impl_1_route_report_clock_utilization_0" -objects $obj
  899. }
  900. # Create 'impl_1_route_report_bus_skew_0' report (if not found)
  901. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0] "" ] } {
  902. create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
  903. }
  904. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
  905. if { $obj != "" } {
  906. set_property -name "display_name" -value "impl_1_route_report_bus_skew_0" -objects $obj
  907. }
  908. # Create 'impl_1_post_route_phys_opt_report_timing_summary_0' report (if not found)
  909. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0] "" ] } {
  910. create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
  911. }
  912. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
  913. if { $obj != "" } {
  914. set_property -name "display_name" -value "impl_1_post_route_phys_opt_report_timing_summary_0" -objects $obj
  915. }
  916. # Create 'impl_1_post_route_phys_opt_report_bus_skew_0' report (if not found)
  917. if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0] "" ] } {
  918. create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
  919. }
  920. set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
  921. if { $obj != "" } {
  922. set_property -name "display_name" -value "impl_1_post_route_phys_opt_report_bus_skew_0" -objects $obj
  923. }
  924. set obj [get_runs impl_1]
  925. set_property -name "part" -value "xc7a100tcsg324-1" -objects $obj
  926. set_property -name "strategy" -value "Vivado Implementation Defaults" -objects $obj
  927. set_property -name "steps.write_bitstream.args.readback_file" -value "0" -objects $obj
  928. set_property -name "steps.write_bitstream.args.verbose" -value "0" -objects $obj
  929. # set the current impl run
  930. current_run -implementation [get_runs impl_1]
  931. # Change current directory to project folder
  932. cd [file dirname [info script]]
  933. puts "INFO: Project created:${_xil_proj_name_}"
  934. # Create 'drc_1' gadget (if not found)
  935. if {[string equal [get_dashboard_gadgets [ list "drc_1" ] ] ""]} {
  936. create_dashboard_gadget -name {drc_1} -type drc
  937. }
  938. set obj [get_dashboard_gadgets [ list "drc_1" ] ]
  939. set_property -name "reports" -value "impl_1#impl_1_route_report_drc_0" -objects $obj
  940. # Create 'methodology_1' gadget (if not found)
  941. if {[string equal [get_dashboard_gadgets [ list "methodology_1" ] ] ""]} {
  942. create_dashboard_gadget -name {methodology_1} -type methodology
  943. }
  944. set obj [get_dashboard_gadgets [ list "methodology_1" ] ]
  945. set_property -name "reports" -value "impl_1#impl_1_route_report_methodology_0" -objects $obj
  946. # Create 'power_1' gadget (if not found)
  947. if {[string equal [get_dashboard_gadgets [ list "power_1" ] ] ""]} {
  948. create_dashboard_gadget -name {power_1} -type power
  949. }
  950. set obj [get_dashboard_gadgets [ list "power_1" ] ]
  951. set_property -name "reports" -value "impl_1#impl_1_route_report_power_0" -objects $obj
  952. # Create 'timing_1' gadget (if not found)
  953. if {[string equal [get_dashboard_gadgets [ list "timing_1" ] ] ""]} {
  954. create_dashboard_gadget -name {timing_1} -type timing
  955. }
  956. set obj [get_dashboard_gadgets [ list "timing_1" ] ]
  957. set_property -name "reports" -value "impl_1#impl_1_route_report_timing_summary_0" -objects $obj
  958. # Create 'utilization_1' gadget (if not found)
  959. if {[string equal [get_dashboard_gadgets [ list "utilization_1" ] ] ""]} {
  960. create_dashboard_gadget -name {utilization_1} -type utilization
  961. }
  962. set obj [get_dashboard_gadgets [ list "utilization_1" ] ]
  963. set_property -name "reports" -value "synth_1#synth_1_synth_report_utilization_0" -objects $obj
  964. set_property -name "run.step" -value "synth_design" -objects $obj
  965. set_property -name "run.type" -value "synthesis" -objects $obj
  966. # Create 'utilization_2' gadget (if not found)
  967. if {[string equal [get_dashboard_gadgets [ list "utilization_2" ] ] ""]} {
  968. create_dashboard_gadget -name {utilization_2} -type utilization
  969. }
  970. set obj [get_dashboard_gadgets [ list "utilization_2" ] ]
  971. set_property -name "reports" -value "impl_1#impl_1_place_report_utilization_0" -objects $obj
  972. move_dashboard_gadget -name {utilization_1} -row 0 -col 0
  973. move_dashboard_gadget -name {power_1} -row 1 -col 0
  974. move_dashboard_gadget -name {drc_1} -row 2 -col 0
  975. move_dashboard_gadget -name {timing_1} -row 0 -col 1
  976. move_dashboard_gadget -name {utilization_2} -row 1 -col 1
  977. move_dashboard_gadget -name {methodology_1} -row 2 -col 1