Commit fa558857 authored by Jens Korinth's avatar Jens Korinth
Browse files

Bugfix automatic AXI connections

  * intermediate hierarchical ports do not inherit CONFIG values or
    other properties from their sources
  * e.g., CONFIG.DATA_WIDTH is not set on master ports, preventing
    detection of the interface width
  * implemented new common method: tapasco::get_aximm_property
  * will travel down to original master(s) and report the value of the
    given property from there; will raise an error if multiple,
    differing values are found
  * used in axi4mm Architecture
parent 41149f26
......@@ -132,8 +132,22 @@ namespace eval arch {
set masters [tapasco::get_aximm_interfaces $example]
set ic_m [expr "$ic_m + [llength $masters] * $no_inst"]
set masters_32b [get_bd_intf_pins -of_objects $example -filter { MODE == "Master" && VLNV == "xilinx.com:interface:aximm_rtl:1.0" && CONFIG.DATA_WIDTH == 32 }]
set masters_64b [get_bd_intf_pins -of_objects $example -filter { MODE == "Master" && VLNV == "xilinx.com:interface:aximm_rtl:1.0" && CONFIG.DATA_WIDTH == 64 }]
set masters_32b {}
set masters_64b {}
set masters_oth {}
foreach m $masters {
set dw [tapasco::get_aximm_property CONFIG.DATA_WIDTH $m]
if {$dw == 64} {
lappend masters_64b $m
} else {
if {$dw == 32} {
lappend masters_32b $m
} else {
lappend masters_oth $m
}
}
}
set m32 [expr "$m32 + [llength $masters_32b] * $no_inst"]
set m64 [expr "$m64 + [llength $masters_64b] * $no_inst"]
}
......
......@@ -488,6 +488,31 @@ namespace eval tapasco {
return [get_bd_intf_pins -of_objects $cell -filter "VLNV =~ xilinx.com:interface:aximm_rtl:* && MODE == $mode"]
}
# Returns the given property of a given AXI MM interface.
# Will raise an error, if none or conflicting values are found.
# @param name of property
# @param intf interface pin to get property for
# @return value of property
proc get_aximm_property {property intf} {
set dw [get_property $property $intf]
if {$dw == {}} {
set nets [get_bd_intf_nets -hierarchical -boundary_type lower -of_objects $intf]
set srcs [get_bd_intf_pins -of_objects $nets -filter "$property != {}"]
if {[llength $srcs] == 0} {
error "could not find a connected interface pin where $property is set"
} else {
set dws {}
foreach s $srcs { lappend dws [get_property $property $s] }
if {[llength $dws] > 1} {
error "found conflicting values for $property @ $intf: $dws"
}
return [lindex $dws 0]
}
} else {
return $dw
}
}
# Returns a key-value list of frequencies in the design.
proc get_frequencies {} {
return [list "host" [get_host_frequency] "design" [get_design_frequency] "memory" [get_mem_frequency]]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment