Skip to content

Commit

Permalink
add argument for simulation frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
goekce committed Nov 14, 2024
1 parent bd39421 commit 41ea95f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/vexriscv/demo/Murax.scala
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ object MuraxWithRamInit{

object MuraxWithRamInitWithNativeJtag{
def main(args: Array[String]) {
SpinalVerilog(Murax(MuraxConfig.default.copy(withNativeJtag = true, onChipRamSize = 4 kB, onChipRamHexFile = "src/main/ressource/hex/muraxDemo.hex")))
val coreFrequency = if (args.nonEmpty) HertzNumber(BigDecimal(args(0))) else MuraxConfig.default.coreFrequency
val (scaledValue, unit) = coreFrequency.decompose
println(s"coreFrequency = $scaledValue $unit")
SpinalVerilog(Murax(MuraxConfig.default.copy(coreFrequency=coreFrequency, withNativeJtag = true, onChipRamSize = 4 kB, onChipRamHexFile = "src/main/ressource/hex/muraxDemo.hex")))
}
}

Expand Down

0 comments on commit 41ea95f

Please sign in to comment.