Skip to content
Snippets Groups Projects
Commit 5e940096 authored by Thomas B. Preußer's avatar Thomas B. Preußer
Browse files

Linting.

parent d75e1fd2
Branches accl
No related tags found
No related merge requests found
...@@ -386,7 +386,7 @@ class CreateStitchedIP(Transformation): ...@@ -386,7 +386,7 @@ class CreateStitchedIP(Transformation):
% (prjname, vivado_stitch_proj_dir, self.fpgapart) % (prjname, vivado_stitch_proj_dir, self.fpgapart)
) )
# no warnings on long module names # no warnings on long module names
tcl.append("set_msg_config -id {[BD 41-1753]} -suppress"); tcl.append("set_msg_config -id {[BD 41-1753]} -suppress")
# add all the generated IP dirs to ip_repo_paths # add all the generated IP dirs to ip_repo_paths
ip_dirs_str = " ".join(ip_dirs) ip_dirs_str = " ".join(ip_dirs)
tcl.append("set_property ip_repo_paths [%s] [current_project]" % ip_dirs_str) tcl.append("set_property ip_repo_paths [%s] [current_project]" % ip_dirs_str)
...@@ -399,7 +399,9 @@ class CreateStitchedIP(Transformation): ...@@ -399,7 +399,9 @@ class CreateStitchedIP(Transformation):
fclk_mhz = 1 / (self.clk_ns * 0.001) fclk_mhz = 1 / (self.clk_ns * 0.001)
fclk_hz = fclk_mhz * 1000000 fclk_hz = fclk_mhz * 1000000
model.set_metadata_prop("clk_ns", str(self.clk_ns)) model.set_metadata_prop("clk_ns", str(self.clk_ns))
tcl.append("set_property CONFIG.FREQ_HZ %d [get_bd_ports /ap_clk]" % round(fclk_hz)) tcl.append(
"set_property CONFIG.FREQ_HZ %d [get_bd_ports /ap_clk]" % round(fclk_hz)
)
tcl.append("validate_bd_design") tcl.append("validate_bd_design")
tcl.append("save_bd_design") tcl.append("save_bd_design")
# create wrapper hdl (for rtlsim later on) # create wrapper hdl (for rtlsim later on)
...@@ -452,7 +454,7 @@ class CreateStitchedIP(Transformation): ...@@ -452,7 +454,7 @@ class CreateStitchedIP(Transformation):
% (vivado_stitch_proj_dir, block_vendor, block_library, block_name) % (vivado_stitch_proj_dir, block_vendor, block_library, block_name)
) )
# Allow user to customize clock in deployment of stitched IP # Allow user to customize clock in deployment of stitched IP
tcl.append("set_property ipi_drc {ignore_freq_hz true} [ipx::current_core]"); tcl.append("set_property ipi_drc {ignore_freq_hz true} [ipx::current_core]")
# in some cases, the IP packager seems to infer an aperture of 64K or 4G, # in some cases, the IP packager seems to infer an aperture of 64K or 4G,
# preventing address assignment of the DDR_LOW and/or DDR_HIGH segments # preventing address assignment of the DDR_LOW and/or DDR_HIGH segments
# the following is a hotfix to remove this aperture during IODMA packaging # the following is a hotfix to remove this aperture during IODMA packaging
...@@ -550,7 +552,8 @@ class CreateStitchedIP(Transformation): ...@@ -550,7 +552,8 @@ class CreateStitchedIP(Transformation):
##### #####
# Core Cleanup Operations # Core Cleanup Operations
tcl.append(""" tcl.append(
"""
set core [ipx::current_core] set core [ipx::current_core]
# Add rudimentary driver # Add rudimentary driver
...@@ -567,25 +570,26 @@ foreach xci [ipx::get_files -of $impl_files {*.xci}] { ...@@ -567,25 +570,26 @@ foreach xci [ipx::get_files -of $impl_files {*.xci}] {
# Construct a single flat memory map for each AXI-lite interface port # Construct a single flat memory map for each AXI-lite interface port
foreach port [get_bd_intf_ports -filter {CONFIG.PROTOCOL==AXI4LITE}] { foreach port [get_bd_intf_ports -filter {CONFIG.PROTOCOL==AXI4LITE}] {
set pin $port set pin $port
set awidth "" set awidth ""
while { $awidth == "" } { while { $awidth == "" } {
set pins [get_bd_intf_pins -of [get_bd_intf_nets -boundary_type lower -of $pin]] set pins [get_bd_intf_pins -of [get_bd_intf_nets -boundary_type lower -of $pin]]
set kill [lsearch $pins $pin] set kill [lsearch $pins $pin]
if { $kill >= 0 } { set pins [lreplace $pins $kill $kill] } if { $kill >= 0 } { set pins [lreplace $pins $kill $kill] }
if { [llength $pins] != 1 } { break } if { [llength $pins] != 1 } { break }
set pin [lindex $pins 0] set pin [lindex $pins 0]
set awidth [get_property CONFIG.ADDR_WIDTH $pin] set awidth [get_property CONFIG.ADDR_WIDTH $pin]
} }
if { $awidth == "" } { if { $awidth == "" } {
puts "CRITICAL WARNING: Unable to construct address map for $port." puts "CRITICAL WARNING: Unable to construct address map for $port."
} { } {
set range [expr 2**$awidth] set range [expr 2**$awidth]
puts "INFO: Building address map for $port 0+:$range" puts "INFO: Building address map for $port: 0+:$range"
set name [get_property NAME $port] set name [get_property NAME $port]
set_property range $range [ipx::add_address_block Reg0 [ipx::add_memory_map $name $core]] set addr_block [ipx::add_address_block Reg0 [ipx::add_memory_map $name $core]]
set_property slave_memory_map_ref $name [ipx::get_bus_interfaces $name -of $core] set_property range $range $addr_block
} set_property slave_memory_map_ref $name [ipx::get_bus_interfaces $name -of $core]
}
} }
# Finalize and Save # Finalize and Save
...@@ -599,27 +603,28 @@ set ofile [open ip/component.xml w] ...@@ -599,27 +603,28 @@ set ofile [open ip/component.xml w]
set buf [list] set buf [list]
set kill 0 set kill 0
while { [eof $ifile] != 1 } { while { [eof $ifile] != 1 } {
gets $ifile line gets $ifile line
if { [string match {*<spirit:fileSet>*} $line] == 1 } { if { [string match {*<spirit:fileSet>*} $line] == 1 } {
foreach l $buf { puts $ofile $l } foreach l $buf { puts $ofile $l }
set buf [list $line] set buf [list $line]
} elseif { [llength $buf] > 0 } { } elseif { [llength $buf] > 0 } {
lappend buf $line lappend buf $line
if { [string match {*</spirit:fileSet>*} $line] == 1 } { if { [string match {*</spirit:fileSet>*} $line] == 1 } {
if { $kill == 0 } { foreach l $buf { puts $ofile $l } } if { $kill == 0 } { foreach l $buf { puts $ofile $l } }
set buf [list] set buf [list]
set kill 0 set kill 0
} elseif { [string match {*<xilinx:subCoreRef>*} $line] == 1 } { } elseif { [string match {*<xilinx:subCoreRef>*} $line] == 1 } {
set kill 1 set kill 1
} }
} else { } else {
puts $ofile $line puts $ofile $line
} }
} }
close $ifile close $ifile
close $ofile close $ofile
"""); """
)
# export list of used Verilog files (for rtlsim later on) # export list of used Verilog files (for rtlsim later on)
tcl.append( tcl.append(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment