2019-01-16 19:43:38 +01:00
|
|
|
puts "FUZ([pwd]): Creating project"
|
2017-11-11 04:55:59 +01:00
|
|
|
create_project -force -part $::env(XRAY_PART) design design
|
|
|
|
|
|
2019-01-16 19:43:38 +01:00
|
|
|
puts "FUZ([pwd]): Reading verilog"
|
2018-12-12 01:05:08 +01:00
|
|
|
read_verilog $::env(FUZDIR)/top.v
|
|
|
|
|
read_verilog $::env(FUZDIR)/picorv32.v
|
2019-01-16 19:43:38 +01:00
|
|
|
|
|
|
|
|
puts "FUZ([pwd]): Synth design"
|
2017-11-11 04:55:59 +01:00
|
|
|
synth_design -top top
|
|
|
|
|
|
|
|
|
|
set_property -dict "PACKAGE_PIN $::env(XRAY_PIN_00) IOSTANDARD LVCMOS33" [get_ports clk]
|
|
|
|
|
set_property -dict "PACKAGE_PIN $::env(XRAY_PIN_01) IOSTANDARD LVCMOS33" [get_ports din]
|
|
|
|
|
set_property -dict "PACKAGE_PIN $::env(XRAY_PIN_02) IOSTANDARD LVCMOS33" [get_ports dout]
|
|
|
|
|
set_property -dict "PACKAGE_PIN $::env(XRAY_PIN_03) IOSTANDARD LVCMOS33" [get_ports stb]
|
|
|
|
|
|
|
|
|
|
create_pblock roi
|
|
|
|
|
add_cells_to_pblock [get_pblocks roi] [get_cells roi]
|
|
|
|
|
resize_pblock [get_pblocks roi] -add "$::env(XRAY_ROI)"
|
|
|
|
|
|
|
|
|
|
set_property CFGBVS VCCO [current_design]
|
|
|
|
|
set_property CONFIG_VOLTAGE 3.3 [current_design]
|
|
|
|
|
set_property BITSTREAM.GENERAL.PERFRAMECRC YES [current_design]
|
|
|
|
|
|
|
|
|
|
set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets clk_IBUF]
|
2017-12-21 20:56:15 +01:00
|
|
|
set_param tcl.collectionResultDisplayLimit 0
|
2017-11-11 04:55:59 +01:00
|
|
|
|
2018-11-14 04:11:04 +01:00
|
|
|
source "$::env(XRAY_DIR)/utils/utils.tcl"
|
2017-11-11 07:37:02 +01:00
|
|
|
randplace_pblock 100 roi
|
|
|
|
|
|
2019-01-16 19:43:38 +01:00
|
|
|
puts "FUZ([pwd]): Placing design"
|
2017-11-11 04:55:59 +01:00
|
|
|
place_design
|
2019-01-16 19:43:38 +01:00
|
|
|
puts "FUZ([pwd]): Routing design"
|
2017-11-11 04:55:59 +01:00
|
|
|
route_design
|
|
|
|
|
|
|
|
|
|
write_checkpoint -force design.dcp
|
|
|
|
|
|
|
|
|
|
proc write_txtdata {filename} {
|
2019-01-16 19:43:38 +01:00
|
|
|
puts "FUZ([pwd]): Writing $filename."
|
2018-12-06 01:52:20 +01:00
|
|
|
set fp [open $filename w]
|
|
|
|
|
set all_pips [lsort -unique [get_pips -of_objects [get_nets -hierarchical]]]
|
2018-12-12 02:56:02 +01:00
|
|
|
# FIXME: getting IOB. Don't think this works correctly
|
|
|
|
|
set tiles [get_tiles [regsub -all {CLBL[LM]} [get_tiles -of_objects [get_sites -of_objects [get_pblocks roi]]] INT]]
|
|
|
|
|
set ntiles [llength $tiles]
|
|
|
|
|
set tilei 0
|
|
|
|
|
foreach tile $tiles {
|
|
|
|
|
incr tilei
|
2019-01-16 19:43:38 +01:00
|
|
|
if {($tilei % 10) == 0 } {
|
|
|
|
|
puts "FUZ([pwd]): Dumping pips from tile $tile ($tilei / $ntiles)"
|
|
|
|
|
}
|
2018-12-06 01:52:20 +01:00
|
|
|
foreach pip [filter $all_pips "TILE == $tile"] {
|
|
|
|
|
set src_wire [get_wires -uphill -of_objects $pip]
|
|
|
|
|
set dst_wire [get_wires -downhill -of_objects $pip]
|
|
|
|
|
set num_pips [llength [get_nodes -uphill -of_objects [get_nodes -of_objects $dst_wire]]]
|
|
|
|
|
set dir_prop [get_property IS_DIRECTIONAL $pip]
|
|
|
|
|
puts $fp "$tile $pip $src_wire $dst_wire $num_pips $dir_prop"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
close $fp
|
2017-11-11 04:55:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
write_bitstream -force design.bit
|
|
|
|
|
write_txtdata design.txt
|