Add BootROM | Fix ResetWrangler for DDR | Add scripts
This commit is contained in:
45
fpga/scripts/run_impl_bitstream.tcl
Normal file
45
fpga/scripts/run_impl_bitstream.tcl
Normal file
@@ -0,0 +1,45 @@
|
||||
#### Command line arguments to this script
|
||||
# argv[0] = absolute path to post_synth checkpoint file
|
||||
# argv[1] = part
|
||||
# argv[2] = output directory
|
||||
|
||||
set synth_checkpoint_file [lindex $argv 0]
|
||||
set part [lindex $argv 1]
|
||||
set output_dir [lindex $argv 2]
|
||||
|
||||
# Set the project part to the part passed into this script
|
||||
set_part ${part}
|
||||
|
||||
# Create output directory if it doesn't exist
|
||||
file mkdir ${output_dir}
|
||||
file mkdir ${output_dir}/reports
|
||||
file mkdir ${output_dir}/outputs
|
||||
|
||||
# Load synthesis checkpoint
|
||||
open_checkpoint ${synth_checkpoint_file}
|
||||
|
||||
# Run implementation and save reports as needed
|
||||
opt_design
|
||||
place_design
|
||||
phys_opt_design
|
||||
write_checkpoint -force ${output_dir}/outputs/post_place
|
||||
report_timing_summary -file ${output_dir}/reports/post_place_timing_summary.rpt
|
||||
report_drc -file ${output_dir}/reports/post_place_drc.rpt
|
||||
|
||||
route_design
|
||||
write_checkpoint -force ${output_dir}/outputs/post_route
|
||||
report_timing_summary -file ${output_dir}/reports/post_route_timing_summary.rpt
|
||||
report_timing -sort_by group -max_paths 100 -path_type summary -file ${output_dir}/reports/post_route_timing.rpt
|
||||
report_clock_utilization -file ${output_dir}/reports/post_route_clock_utilization.rpt
|
||||
report_utilization -file ${output_dir}/reports/post_route_utilization.rpt
|
||||
report_drc -file ${output_dir}/reports/post_route_drc.rpt
|
||||
report_cdc -details -file ${output_dir}/reports/post_route_cdc.rpt
|
||||
report_clock_interaction -file ${output_dir}/reports/post_route_clock_interaction.rpt
|
||||
report_bus_skew -file ${output_dir}/reports/post_route_bus_skew.rpt
|
||||
report_design_analysis -logic_level_distribution -of_timing_paths [get_timing_paths -max_paths 1000 -slack_lesser_than 0] -file ${output_dir}/reports/post_route_timing_violations.rpt
|
||||
|
||||
write_verilog -force ${output_dir}/outputs/post_route.v
|
||||
write_xdc -no_fixed_only -force ${output_dir}/outputs/post_route.xdc
|
||||
|
||||
write_bitstream -force ${output_dir}/outputs/top.bit
|
||||
write_debug_probes -force ${output_dir}/outputs/debug_nets.ltx
|
||||
75
fpga/scripts/write_mmi.tcl
Normal file
75
fpga/scripts/write_mmi.tcl
Normal file
@@ -0,0 +1,75 @@
|
||||
proc write_mmi {filepath inst} {
|
||||
current_instance
|
||||
current_instance $inst
|
||||
set chn [open $filepath w]
|
||||
puts $chn "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
|
||||
puts $chn "<MemInfo Version=\"1\" Minor=\"0\">"
|
||||
puts $chn "\t<Processor Endianness=\"Little\" InstPath=\"${inst}\">"
|
||||
set brams [dict create]
|
||||
foreach cell [get_cells -hierarchical -filter { PRIMITIVE_GROUP =~ BLOCKRAM }] {
|
||||
set name [get_property RTL_RAM_NAME $cell]
|
||||
dict update brams $name name {
|
||||
dict lappend name cells $cell
|
||||
dict set name size [get_property RTL_RAM_BITS $cell]
|
||||
}
|
||||
}
|
||||
proc compare {a b} {
|
||||
set a_addr [get_property bram_addr_begin $a]
|
||||
set b_addr [get_property bram_addr_begin $b]
|
||||
if {$a_addr > $b_addr} {
|
||||
return 1
|
||||
} elseif {$a_addr < $b_addr} {
|
||||
return -1
|
||||
}
|
||||
set a_slice [get_property bram_slice_begin $a]
|
||||
set b_slice [get_property bram_slice_begin $b]
|
||||
if {$a_slice > $b_slice} {
|
||||
return 1
|
||||
} elseif {$a_slice < $b_slice} {
|
||||
return -1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
dict for {name desc} $brams {
|
||||
dict with desc {
|
||||
puts $chn "\t\t<AddressSpace Name=\"${name}\" Begin=\"0\" End=\"[expr $size >> 3]\">"
|
||||
puts $chn "\t\t\t<BusBlock>"
|
||||
foreach cell [lsort -command compare $cells] {
|
||||
set type [switch [get_property REF_NAME $cell] \
|
||||
RAMB36E2 {expr {"RAMB32"}} \
|
||||
RAMB36E1 {expr {"RAMB32"}}]
|
||||
set loc [lindex [split [get_property LOC $cell] "_"] 1]
|
||||
set lsb [get_property bram_slice_begin $cell]
|
||||
set msb [get_property bram_slice_end $cell]
|
||||
set addr_bgn [get_property bram_addr_begin $cell]
|
||||
set addr_end [get_property bram_addr_end $cell]
|
||||
puts $chn "\t\t\t\t<BitLane MemType=\"${type}\" Placement=\"${loc}\">"
|
||||
puts $chn "\t\t\t\t\t<DataWidth MSB=\"${msb}\" LSB=\"${lsb}\"/>"
|
||||
puts $chn "\t\t\t\t\t<AddressRange Begin=\"${addr_bgn}\" End=\"${addr_end}\"/>"
|
||||
puts $chn "\t\t\t\t\t<Parity ON=\"false\" NumBits=\"0\"/>"
|
||||
puts $chn "\t\t\t\t</BitLane>"
|
||||
}
|
||||
puts $chn "\t\t\t</BusBlock>"
|
||||
puts $chn "\t\t</AddressSpace>"
|
||||
}
|
||||
}
|
||||
puts $chn "\t</Processor>"
|
||||
puts $chn "\t<Config>"
|
||||
puts $chn "\t\t<Option Name=\"Part\" Val=\"[get_property PART [current_project]]\"/>"
|
||||
puts $chn "\t</Config>"
|
||||
puts $chn "</MemInfo>"
|
||||
close $chn
|
||||
current_instance
|
||||
|
||||
}
|
||||
|
||||
if {$argc != 3} {
|
||||
puts $argc
|
||||
puts {Error: Invalid number of arguments}
|
||||
puts {Usage: write_mmi.tcl checkpoint mmi_file instance}
|
||||
}
|
||||
|
||||
lassign $argv checkpoint mmi_file instance
|
||||
|
||||
open_checkpoint $checkpoint
|
||||
write_mmi $mmi_file $instance
|
||||
Reference in New Issue
Block a user