Skip to content

Commit

Permalink
Config: set minimal hartid width to 6
Browse files Browse the repository at this point in the history
This can help users who only build one core but
then manually instantiate more than two cores in
the SoC.
  • Loading branch information
Tang-Haojin committed May 10, 2024
1 parent c686adc commit f4b08c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/scala/top/ArgParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ object ArgParser {
}
case MaxHartIdBits =>
require(log2Up(value.toInt) <= 10, "MaxHartIdBits should not be larger than 10.")
log2Up(value.toInt)
log2Up(value.toInt) max 6
}), tail)
case "--with-dramsim3" :: tail =>
nextOption(config.alter((site, here, up) => {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/top/Configs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class BaseConfig(n: Int) extends Config((site, here, up) => {
case ExportDebug => DebugAttachParams(protocols = Set(JTAG))
case DebugModuleKey => Some(XSDebugModuleParams(site(XLen)))
case JtagDTMKey => JtagDTMKey
case MaxHartIdBits => log2Up(n)
case MaxHartIdBits => log2Up(n) max 6
case EnableJtag => true.B
})

Expand Down

0 comments on commit f4b08c2

Please sign in to comment.