Skip to content

Commit

Permalink
Bsp export now support BigInt
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Jan 31, 2024
1 parent f44052b commit 4069afc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion hardware/scala/saxon/Misc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ object BspGenerator {
// val gName = camelToUpperCase(g.getName())

def rec(prefix : String, value : Any): Unit = value match {
case value : Int => headerWriter.println(s"#define ${prefix} $value")
case value: Int => headerWriter.println(s"#define ${prefix} $value")
case value: BigInt => headerWriter.println(f"#define ${prefix} 0x${value}%x")
case value : FixedFrequency => headerWriter.println(s"#define ${prefix} ${value.getValue.toBigDecimal.toBigInt.toString(10)}")
case value : Boolean => headerWriter.println(s"#define ${prefix} ${if(value) 1 else 0}")
case value : SpinalEnumElement[_] => headerWriter.println(s"#define ${prefix} $value")
Expand Down

0 comments on commit 4069afc

Please sign in to comment.