1. Apr 20, 2021
  2. Apr 19, 2021
  3. Apr 17, 2021
  4. Apr 16, 2021
    • Fabian Schuiki's avatar
      Fix signedness of xor const prop with zero (#2179) · e9b2946c
      Fabian Schuiki authored
      Constant propagation of the Xor op folds `xor(a, SInt(0))` to
      `asUInt(a)`. For comparison, Or folds to `asUInt(pad(a, W))`. This can
      be a problem in the following case:
      
          circuit Foo :
            module Foo :
              input a: UInt<3>
              output b: UInt<4>
              b <= asUInt(xor(asSInt(a), SInt<4>(0)))
      
      This would emit the assignment as `b = a` instead of the sign-extended
      `b = {{1{a[2]}},a}`.
      
      This requires adjusting the `pad(e, t)` function use in const prop,
      which currently just inserts a `Pad` prim op with the requested output
      type. However, the function advertises that it pads *to the width* of
      the type `t`. Some of the folds rely on this and request the padding of
      a SInt<N> to the width of a UInt<M>. But the current implementation then
      then actually returns a `Pad` op with type UInt<M>, instead of the
      SInt<M> that was requested.
      e9b2946c
    • Jack Koenig's avatar
      Add Workflow to automatically update .mergify.yml (#2180) · fc86112b
      Jack Koenig authored
      Also make minor updates to CI workflow
      fc86112b
  5. Apr 14, 2021
    • Jared Barocsi's avatar
      Add indent parameter to Serializer.serialize() (#2177) · 20890bbd
      Jared Barocsi authored
      
      
      Using Utils.indent() gives deprecation warnings to use Serializer instead. However,
      the Serializer class itself doesn't provide a means to manually indent a FirrtlNode
      string a certain number of times.
      
      The indent variable, previously hardcoded to 0, is now exposed as a second parameter
      for the modified serialize function, and the old serialize function just calls the
      modified serialize with indents = 0 for binary compatibility
      
      Co-authored-by: default avatarMegan Wachs <megan@sifive.com>
      20890bbd
  6. Apr 12, 2021
  7. Apr 07, 2021
  8. Apr 06, 2021
  9. Apr 04, 2021
  10. Apr 02, 2021
  11. Mar 31, 2021
  12. Mar 30, 2021
  13. Mar 27, 2021
  14. Mar 26, 2021
  15. Mar 23, 2021
  16. Mar 20, 2021
    • Jack Koenig's avatar
      Legalize neg: -x becomes 0 - x (#2128) · 49b82324
      Jack Koenig authored
      This fixes an error with negating a negative SInt literal and a
      [debatable] lint warning in Verilator when negating any value.
      
      This behavior matches that of Chisel (which directly emits the 0 - x
      already).
      49b82324
  17. Mar 19, 2021
  18. Mar 17, 2021
    • Jack Koenig's avatar
      Fix issue where inlined cvt could cause crash (#2124) · 94d1bee4
      Jack Koenig authored
      Due to inlining of Boolean expressions, the following circuit is handled
      directly by the VerilogEmitter:
      
      input a: UInt<4>
      input b: SInt<1>
      output o: UInt<5>
      o <= dshl(a, asUInt(cvt(b)))
      
      Priot to this change, this could crash due to mishandling of cvt in the
      logic to inject parentheses based on Verilog precedence rules.
      
      This is a corner case, but similar bugs would drop up if we open up the
      VerilogEmitter to more expression inlining.
      94d1bee4
  19. Mar 14, 2021
  20. Mar 11, 2021