1. Aug 11, 2021
  2. Jun 23, 2021
    • mergify[bot]'s avatar
      Add --start-from option (backport #2273) (#2274) · 97dbe29e
      mergify[bot] authored
      
      
      * Add --start-from option (#2273)
      
      Add a new option to the FIRRTL compiler, "--start-from = <form>".  If
      used, this will cause the compiler to assume that the input FIRRTL
      circuit is already in the specific form.  It will then skip unnecessary
      passes given this information.
      
      E.g., if a user requests to run "firrtl -X verilog --start-from low"
      then the compiler will only run transforms necessary to get from low
      FIRRTL to Verilog.  Transforms necessary for ingesting FIRRTL IR will be
      run if needed (checks and type/kind/flow resolution).
      
      To implement this, a CurrentFirrtlStateAnnotation is added.  Advanced
      users can use this directly to tell the FIRRTL compiler exactly what
      transforms have already been run, including the ability to ignore checks
      or type/kind/flow resolution if they so desire.
      
      Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@sifive.com>
      (cherry picked from commit c7eaa67d
      
      )
      
      * Waive bincompat issues that don't affect Scala
      
      Co-authored-by: default avatarSchuyler Eldridge <schuyler.eldridge@sifive.com>
      Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      97dbe29e
    • mergify[bot]'s avatar
      Fix VerilogMemDelays use before declaration (backport #2278) (#2280) · 270c9138
      mergify[bot] authored
      * Fix VerilogMemDelays use before declaration (#2278)
      
      The pass injects pipe registers immediately after the declaration of the
      memory. This can be problematic if the clock for the associated memory
      port is defined after the declaration of the memory. For any memory port
      clocks that are driven by non-ports, we now inject a wire before the
      pipe register declarations to be sure there are no
      use-before-declaration issues.
      
      (cherry picked from commit 11128d93
      
      )
      
      # Conflicts:
      #	src/main/scala/firrtl/passes/memlib/VerilogMemDelays.scala
      
      * Fix merge conflicts
      
      Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
      270c9138
  3. Jun 17, 2021
  4. Jun 15, 2021
  5. Jun 04, 2021
  6. May 22, 2021
  7. May 19, 2021
    • mergify[bot]'s avatar
      Improve performance of RenameMap in LowerTypes (backport #2233) (#2234) · 899f1f6e
      mergify[bot] authored
      * Improve performance of RenameMap in LowerTypes (#2233)
      
      LowerTypes creates a lot of mappings for the RenameMap. The built-in
      .distinct of renames becomes a performance program for designs with
      deeply nested Aggregates. Because LowerTypes does not create duplicate
      renames, it can safely eschew the safety of using .distinct via a
      private internal API.
      
      (cherry picked from commit e0844966
      
      )
      
      * Waive bincompat issue that isn't visible from Scala
      
      Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
      899f1f6e
  8. May 15, 2021
  9. May 05, 2021
  10. Apr 27, 2021
  11. Apr 22, 2021
  12. Apr 17, 2021
  13. Apr 16, 2021
    • mergify[bot]'s avatar
      Fix signedness of xor const prop with zero (#2179) (#2185) · 7dfb7a12
      mergify[bot] 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.
      
      (cherry picked from commit e9b2946c
      
      )
      
      Co-authored-by: default avatarFabian Schuiki <fabian@schuiki.ch>
      7dfb7a12
  14. Apr 15, 2021
  15. Apr 14, 2021
    • Jared Barocsi's avatar
      Add indent parameter to Serializer.serialize() (#2177) · 5d02b785
      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>
      (cherry picked from commit 20890bbd)
      5d02b785
  16. Apr 08, 2021
  17. Apr 07, 2021
  18. Mar 30, 2021
  19. Mar 27, 2021
  20. Mar 20, 2021
  21. Mar 19, 2021
  22. Mar 17, 2021
    • mergify[bot]'s avatar
      Fix issue where inlined cvt could cause crash (#2124) (#2125) · 2a48aaec
      mergify[bot] 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.
      
      (cherry picked from commit 94d1bee4
      
      )
      
      Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
      2a48aaec
  23. Mar 14, 2021
  24. Mar 13, 2021
  25. Mar 11, 2021
  26. Mar 10, 2021
  27. Mar 04, 2021
  28. Mar 03, 2021
    • Jack Koenig's avatar
      Fix CI Checks (#2097) (#2098) · d77b4bf6
      Jack Koenig authored
      Bumping Scala minor version but not bumping CI guards on the version
      causes tests to no longer run. Change to using startsWith(...) so that
      minor version bumps won't cause issues in the future.
      
      Also run ScalaFmt
      
      (cherry picked from commit 541a70c9)
      d77b4bf6
  29. Feb 17, 2021
    • mergify[bot]'s avatar
      Add "Must Deduplicate" API (bp #2077) (#2081) · ea9bfd2a
      mergify[bot] authored
      * Add DiGraph factory method and prettyTree
      
      * New factory method enables direct construction of DiGraphs from edges
      * DiGraph.prettyTree enables visualization of tree or multi-tree
        diagraphs
      
      (cherry picked from commit 5ea82302)
      
      * Add MustDeduplicateTransform
      
      This enables marking modules as "must deduplicate". If modules marked as
      such do not deduplicate, the transform will create error reports and
      make suggestions as to why deduplication failed.
      
      (cherry picked from commit 5903e6a3
      
      )
      
      Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
      ea9bfd2a
  30. Feb 10, 2021
  31. Feb 06, 2021