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

Fix for zero masters on PEs

parent dcc6c418
Pipeline #202 passed with stage
in 3 minutes and 6 seconds
......@@ -251,7 +251,7 @@ namespace eval platform {
set me [dict get $map $intf]
}
puts " address map info: $me]"
set range [dict get $me "range"]
set range [expr "max([dict get $me range], 4096)"]
set offset [dict get $me "offset"]
puts " range: $range"
puts " offset: $offset"
......
......@@ -155,6 +155,8 @@ namespace eval ::platform {
}
proc create_subsystem_memory {} {
set mem_slaves [list]
set mem_masters [list]
set arch_masters [::arch::get_masters]
set ps_slaves [list "HP0" "HP1" "ACP"]
puts "Creating memory slave ports for [llength $arch_masters] masters ..."
......@@ -172,7 +174,9 @@ namespace eval ::platform {
incr m_i
}
foreach s $mem_slaves m $mem_masters { connect_bd_intf_net $s $m }
if {[llength $mem_slaves] > 0 && [llength $mem_masters] > 0} {
foreach s $mem_slaves m $mem_masters { connect_bd_intf_net $s $m }
}
}
# Create interrupt controller subsystem:
......
......@@ -110,15 +110,15 @@ class MultiFileWatcher(pollInterval: Int = MultiFileWatcher.POLL_INTERVAL) exten
if (open(p)) _waitingFor.synchronized { _waitingFor -= p }
}
val all_files = files ++ _files.synchronized { _files.toMap }
logger.trace("reading from files: {}", files)
files foreach { case (p, br) =>
logger.trace("reading from files: {}", all_files)
all_files foreach { case (p, br) =>
val lines = readFrom(br)
if (lines.length > 0) {
logger.trace("read {} lines from {}", lines.length, p)
publish(LinesAdded(p, lines))
}
}
lastWasEmpty = files.isEmpty
lastWasEmpty = all_files.isEmpty
}
_watchThread.set(None)
} catch { case e: InterruptedException => _watchThread.set(None) }
......@@ -141,6 +141,6 @@ object MultiFileWatcher {
/** Lines ls have been added to file at src. **/
final case class LinesAdded(src: Path, ls: Traversable[String]) extends Event
}
/** Default polling interval for files: once every 5 seconds. **/
final val POLL_INTERVAL = 5000 // 5sec
/** Default polling interval for files: once every 2 seconds. **/
final val POLL_INTERVAL = 2000 // 2sec
}
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