1. Jul 27, 2020
  2. Jul 25, 2020
    • Schuyler Eldridge's avatar
      Integrate new transforms with firrtl.stage.Forms (#1754) · d4e1a466
      Schuyler Eldridge authored
      
      
      Move new transforms, recently added, into existing or new sets of
      transforms (defined in firrtl.stage.Forms).
      
      One transform is a mandatory low FIRRTL optimization:
      
        - firrtl.transforms.LegalizeAndReductionsTransform
      
      Previously, this was included as a prerequisite of all Verilog
      emitters (minimum, normal, and SystemVerilog).
      
      Two transforms associated with converting and removing the new
      verification statements are moved into a new set of transforms,
      AssertsRemoved:
      
        - firrtl.transforms.formal.ConvertAsserts
        - firrtl.transforms.formal.RemoveVerificationStatements
      
      Previously, these transforms were directly added as prerequisites to
      the minimum Verilog and normal Verilog emitter, but not the
      SystemVerilog emitter.
      
      The designation of inputForm=LowForm for legacy, custom transforms is
      updated to include assertion removal transforms as part of their
      optionalPrerequisites. This has the effect of continuing to cause
      inputForm=LowForm transforms to run as late as possible (right before
      the low FIRRTL, minimum Verilog, Verilog, or SystemVeriog emitter).
      
      Tests are updated to reflect the new order in both CustomTransformSpec
      and LoweringCompilersSpec.
      
      Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
      
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      d4e1a466
    • Albert Chen's avatar
      Fix sign extension issue in Emitter (#1785) · b24b9a01
      Albert Chen authored
      * add sign-extend const-prop test
      
      * Emitter: don't wrap Neg operand in concat
      b24b9a01
  3. Jul 24, 2020
  4. Jul 20, 2020
  5. Jul 18, 2020
    • Kevin Laeufer's avatar
      Faster dedup instance graph (#1732) · 1b9f4ddf
      Kevin Laeufer authored
      
      
      * dedup: add faster InstanceGraph implementation and use it in dedup
      
      The new implementation takes care not to hash the instance
      types contained in DefInstance nodes.
      This should make dedup considerably faster.
      
      * FastInstanceGraph: cache vertices for faster findInstancesInHierarchy
      
      * FastInstanceGraph: remove the parent name field since it isn't actually necessary
      
      * FastInstanceGraph -> InstanceKeyGraph
      
      * InstanceGraph: describe performance problems.
      
      * InstanceKeyGraph: turn moduleMap into a def instead of a val
      
      This will make changing implementation details much easier
      in the future.
      
      * InstanceKeyGraph: return childInstances as Seq instead of Map
      
      This ensures a deterministic iteration order and it
      can easily be turned into a Map for O(1) accesses.
      
      * InstanceKeyGraph: add tests for public methods
      
      * InstanceKeyGraph: group public methods together
      
      * InstanceKeyGraphSpec: fix wording of a comment
      
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      1b9f4ddf
    • Schuyler Eldridge's avatar
      Cross-build unidoc in CI (#1772) · 5f70175d
      Schuyler Eldridge authored
      
      
      Add cross-building of unidoc to test issues if a user later does a
      +publishLocal (like with Chisel CI).
      
      Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
      5f70175d
    • Schuyler Eldridge's avatar
      Merge pull request #1771 from freechipsproject/fuzzer-2.11-fixes · 59607657
      Schuyler Eldridge authored
      Fix Fuzzer for 2.11
      59607657
  6. Jul 17, 2020
    • Schuyler Eldridge's avatar
      Fix Fuzzer for 2.11 · 73fdce37
      Schuyler Eldridge authored
      
      
      This fixes two issues with the Fuzzer when running '+publishLocal':
      
      - Avoid foo(_) pattern due to weaker 2.11 type inference
      - Use seqAsJavaListConverter instead of seqAsJavaList (a 2.12
        addition)
      
      Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
      73fdce37
    • Jack Koenig's avatar
      Propagate source locators to register update always blocks (#1743) · b25cd542
      Jack Koenig authored
      
      
      * [WIP] Propagate source locators to Verilog if-else emission
      
      * Add and fix tests for reg update info propagation
      
      * Add limited source locator propagation in ConstProp
      
      Support propagating source locators on connections or nodes where the
      right-hand side is simply a reference. This case comes up a lot for
      registers without a synchronous reset.
      
      node _T_1 = x @[MyFile.scala 12:10]
      node _T_2 = _T_1
      z <= x
      
      Previousy the source locator would be lost, now the result is:
      
      z <= x @[MyFile.scala 12:10]
      
      * Address review comments
      
      Co-authored-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
      
      Co-authored-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      b25cd542
    • Albert Chen's avatar
      Add Expression Fuzzer (#1741) · c4cc6bc5
      Albert Chen authored
      
      
      Includes:
      * Random generator of FIRRTL Expressions (UInt and SInt types)
      * JQF SBT plugin and CLI
      * Documentation in README.md
      
      Co-authored-by: default avatarJack Koenig <koenig@sifive.com>
      c4cc6bc5
    • Schuyler Eldridge's avatar
      Merge pull request #1753 from freechipsproject/rm-duplicate-tests · da221ea2
      Schuyler Eldridge authored
      Remove overlapping inputForm=LowForm tests
      da221ea2
    • Schuyler Eldridge's avatar
      Simplify CustomTransformSpec · debee429
      Schuyler Eldridge authored
      Refactor the test used in the CustomTransformSpec to assert that
      inputForm=LowForm legacy transforms run right before the emitter (see
      note below!). The new test looks only for a list of (customTransform,
      emitter) in a sliding, size-2 window of the flattened transform order.
      Previously, this was looking for a match before and after the custom
      transform. The old implementation necessitate busywork updates of the
      test when new transforms are added that changed the transform running
      before the custom transform.
      
      Note: this test, as written is intentionally wrong. When verification
      statements were added, the test was changed to not do what it's
      supposed to do. Namely, the test is supposed to ensure that an
      inputForm=LowForm transform runs immediately before its emitter.
      However, the test is actually checking that the custom transform runs
      before transforms that convert and remove verification statements. I'm
      intentionally leaving the test broken, but doing the refactor in order
      to...
      debee429
    • Schuyler Eldridge's avatar
      Remove overlapping inputForm=LowForm tests · f5dd8ddc
      Schuyler Eldridge authored
      
      
      Remove tests from LoweringCompilerSpec testing the placement of
      inputForm=LowForm legacy, custom transforms. This behavior is already
      tested in the CustomTransformSpec.
      
      Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
      f5dd8ddc
  7. Jul 16, 2020
    • Kevin Laeufer's avatar
      ir: store FileInfo string in escaped format (#1690) · 24be0ac3
      Kevin Laeufer authored
      This should speed up the common case
      as the compiler never operates on the
      unescaped string.
      The new escape function also fixes a bug
      where ']' was not escaped even though it
      is the delimiting character for FileInfo.
      In order to maintain backwards
      compatibility for the ProtoBuf format,
      this patch adds escape/unescape calls
      when going from/to protobuf format.
      For better performance we should consider
      changing the protobuf format.
      24be0ac3
  8. Jul 15, 2020
  9. Jul 14, 2020
  10. Jul 11, 2020
  11. Jul 10, 2020
  12. Jul 09, 2020
    • Kevin Laeufer's avatar
      dedup: use structural sha256 hash instead of agnostify and serialize (#1731) · 3fee5f87
      Kevin Laeufer authored
      
      
      * benchmark: add hot.DedupBenchmark
      
      * dedup: use structural md5 hash instead of agnostify and serialize
      
      * StructuralHash: generate PrimOp LUT
      
      * StructuralHash: change MessageDigestHasher to not be a case class
      
      * StructuralHash: we want Blocks and EmptyStmt to be ignored
      
      * StructuralHash: use SHA-256 instead of MD5
      
      * StructuralHash: clarify extmodule port name agnistification
      
      * StructuralHash: hash the name of width vars instead of trying to agnostify
      
      This should be in line with the old Dedup behavior.
      The prior use of n(..) was incorrect since the namespace
      of these vars is different from the normal module scope namespace.
      
      * StructuralHash: address Schuyler's review comments
      
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      3fee5f87
    • Kevin Laeufer's avatar
      ir: add faster serializer (#1694) · 05ba1c9d
      Kevin Laeufer authored
      
      
      This Serializer which is implemented
      external to the IR node definition
      uses a StringBuilder to achieve about a
      1.7x performance improvement when serializing.
      
      Eventually, all implementations of the
      `serialize` methd should be replaced with
      a call to `Serializer.serialize`.
      
      However, for this PR we keep the old
      code in place in order to allow for easy
      regression testing with the benchmark JAR
      like this:
      > java -cp utils/bin/firrtl-benchmark.jar \
        firrtl.benchmark.hot.SerializationBenchmark \
        ~/benchmarks/medium.pb 2 5 test
      
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      05ba1c9d
  13. Jul 08, 2020
  14. Jul 02, 2020
  15. Jun 27, 2020
  16. Jun 26, 2020