Search code examples
chisel

Fixed point number representation in FIRRTL


I'm trying the understand the way fixed-point numbers are represented in FIRRTL. The Spec example mentions Fixed<10> to have a 1-bit width, is this expected?

Specification for the FIRRTL Language Version 0.2.0
Fixed <3><<2>> ; 3-bit width , 2 bits after binary point
Fixed <10>     ; 1-bit width , inferred binary point
Fixed <<-4>>   ; Inferred width , binary point of -4
Fixed.         ; Inferred width and binary point

Solution

  • Fixed<10> should be 10 bits wide. That looks to me to be a typo in the spec. I will test it and make a PR. Thanks