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

Fix bug in address map construction

* internal master-slave connections do not appear in get_address_map
* so their segments were not mapped, resulting in errors, e.g., for DMA
* fix: when address map does not contain interfaces, it will try to
  deduce range and offset from properties of the segment instead of
  failing
parent 86b53707
......@@ -237,9 +237,16 @@ namespace eval platform {
set sintf [get_bd_intf_pins -quiet -of_objects $seg]
if {[catch {dict get $map $intf}]} {
if {[catch {dict get $map $sintf}]} {
error "neither $intf nor $sintf were found in address map for $seg: $::errorInfo"
puts " neither $intf nor $sintf were found in address map for $seg: $::errorInfo"
puts " assuming internal connection, setting values as found in segment:"
set range [get_property RANGE $seg]
puts " range: $range"
set offset [get_property OFFSET $seg]
puts " offset: $offset"
set me [dict create "range" $range "offset" $offset "space" $space seg "$seg"]
} else {
set me [dict get $map $sintf]
}
set me [dict get $map $sintf]
} else {
set me [dict get $map $intf]
}
......
......@@ -40,6 +40,7 @@ namespace eval platform {
}
proc get_address_map {{pe_base ""}} {
set max32 [expr "1 << 32"]
set max64 [expr "1 << 64"]
if {$pe_base == ""} { set pe_base [get_pe_base_address] }
set peam [::arch::get_address_map $pe_base]
......@@ -114,7 +115,7 @@ namespace eval platform {
puts "Unused Interrupts: 1, 2, 3 are tied to 0"
connect_bd_net [get_bd_pin -of_object $irq_unused -filter {NAME == "dout"}] [get_bd_pin -of_objects $irq_concat_ss -filter {NAME == "In1"}]
for {set i 0} {$i < 4} {incr i} {
set port [create_bd_pin -dir I -type intr "irq_$i"]
set port [create_bd_pin -from 127 -to 0 -dir I -type intr "intr_$i"]
connect_bd_net $port [get_bd_pin $irq_concat_ss/[format "In%d" [expr "$i + 2"]]]
}
......
Markdown is supported
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