| Age | Commit message (Collapse) | Author |
|
#2935) (#2936)
* TruthTable improvements: structural equality and delete sort (#2935)
We had implemented equals, but not hashCode. This commit also changes
the implemental of equals to just use the underlying values instead of
wasting the compute calling .toString.
Delete TruthTable.sort, it is unused.
(cherry picked from commit b5d9c08b2d0994b94df2380425282206fe1f25bc)
* Restore and deprecate TruthTable.sort
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Fix BitSet decoder API when errorBit=False
When errorBit is set to False, the original code will return
`Unit` which will be `()` in interpolated string.
* Add testcases for both errorBit cases in BitSetSpec
(cherry picked from commit 42416cb6c6a3019fc29b9d98cfea3e3bb4e42684)
Co-authored-by: Ocean Shen <30361859+OceanS2000@users.noreply.github.com>
|
|
#2829) (#2831)
* Add Aggregate.elementsIterator and micro-optimize
elementsIterator provides a more efficient API for iterating on the
elements of Aggregates. It is especially useful for Records where
getElements returns a Seq and thus eagerly constructs a new
datastructure which may then just be iterated on anyway.
This new elementsIterator API is then used throughout the codebase where
it makes sense.
Also change Vec.getElements to just return the underlying self instead
of constructing a new Seq.
(cherry picked from commit defa440b349031475daeff4024fad04925cccee6)
# Conflicts:
# core/src/main/scala/chisel3/Aggregate.scala
# core/src/main/scala/chisel3/Module.scala
# core/src/main/scala/chisel3/experimental/Trace.scala
* Move Aggregate.bind inline into Record.bind
Vec overrides bind and does not call the version in Aggregate so the
version in Aggregate is misleading in that its only ever used by
Records. Now there is no version in Aggregate and the actual
functionality and use is more clear.
(cherry picked from commit b054c30ba47026cb2a9b28c696a0a0a58b1e2ee7)
# Conflicts:
# core/src/main/scala/chisel3/Aggregate.scala
* Extract and optimize duplicate checking Record.bind
This replaces an immutable.Map with a single mutable.HashSet and saves
the allocation of # elements Seqs.
(cherry picked from commit 832ea52bc23424bb75b9654422b725a9cafaef40)
# Conflicts:
# core/src/main/scala/chisel3/Aggregate.scala
* Add check for Records that define def elements
(cherry picked from commit a4f223415de19e2a732e0b6a8fe681f706a19a56)
* Resolve backport conflicts
* Make elementsIterator final and package private
* Waive false MiMa failure
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
This enables emission of modules that serialize to >2 GiB of .fir text.
(cherry picked from commit 2cbc852d09bb63cd5da291e5d5d942ab971952a4)
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
|
|
* Add option to treat warnings as errors (#2676)
Add --warnings-as-errors option
(cherry picked from commit 498946663726955c380a1e420f5d7b9630000aad)
# Conflicts:
# core/src/main/scala/chisel3/experimental/hierarchy/Definition.scala
# core/src/main/scala/chisel3/internal/Builder.scala
# src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
# src/main/scala/chisel3/stage/ChiselOptions.scala
# src/main/scala/chisel3/stage/package.scala
# src/main/scala/chisel3/stage/phases/Elaborate.scala
* Resolve backport conflicts
Co-authored-by: Zachary Yedidia <zyedidia@gmail.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
(cherry picked from commit 8538269a14e0d5a1163298a79aa43b77a380aabc)
Co-authored-by: Jared Barocsi <82000041+jared-barocsi@users.noreply.github.com>
|
|
(cherry picked from commit b20df1d6cda03f6eef28ee480e0aade914c5face)
Co-authored-by: Jared Barocsi <82000041+jared-barocsi@users.noreply.github.com>
|
|
Also remove all non-testing uses of chiselName.
(cherry picked from commit 1c5d1b5317a0c9fe7ef9d15138065a817380a1e4)
Co-authored-by: Jared Barocsi <82000041+jared-barocsi@users.noreply.github.com>
|
|
#2612) (#2620)
* Refactor TruthTable.apply and add factory method for Espresso (#2612)
Improves performance of creating TruthTables by processing entire BitPats
rather than individual bits. New TruthTable factory method enables
constructing TruthTables with semantics of OR-ing output BitPats together
rather than erroring when multiple terms have the same input BitPat.
This alternative factory method matches semantics for the output format
of Espresso.
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
(cherry picked from commit 231f14e74f112a9f721e774561126b2bd1250039)
# Conflicts:
# src/main/scala/chisel3/util/BitPat.scala
* Resolve backport conflicts
Co-authored-by: Aditya Naik <91489422+adkian-sifive@users.noreply.github.com>
|
|
(#2617)
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
(cherry picked from commit 3ab34cddd8b87c22d5fc31020f10ddb2f1990d51)
Co-authored-by: Jared Barocsi <82000041+jared-barocsi@users.noreply.github.com>
|
|
* Deprecate TransitName (#2603)
* Deprecate TransitName
* Add @nowarn macros to usages of TransitName in the repo
Co-authored-by: Jack Koenig <koenig@sifive.com>
(cherry picked from commit a0b05190e5303ec28a0c7abe645d81e9a72023ff)
* Update src/main/scala/chisel3/util/Valid.scala
* Update src/main/scala/chisel3/util/Valid.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
|
|
BitPat.rawString is called a lot when decoding and is used for certain
BitPat operations. We should use it less but this is at least a bandaid.
(cherry picked from commit c11af20fe5b211ec72ba00f3ce0880d7933e566b)
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
* Factor buildName into reusable function
The new function is chisel3.internal.buildName.
(cherry picked from commit 370ca8ac68f6d888dd99e1b9e63f0371add398cf)
* Add --warn:reflective-naming
This new argument (and associated annotation) will turn on a warning
whenever reflective naming changes the name of a signal. This is
provided to help migrate from Chisel 3.5 to 3.6 since reflective naming
is removed in Chisel 3.6.
(cherry picked from commit 97afd9b9a1155fa7cd5cedf19f9e0c15fbe899ec)
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
These methods will start using def macros and since def macros do not
supported named arguments this will be a source-incompatible change.
This deprecation will warn users that they need to remove any uses of
named arguments on these methods.
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
(cherry picked from commit 2c2d72ceaa494b6acc351ff4300dbb40d4a7d863)
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
|
|
Co-authored-by: Jiuyang Liu <liu@jiuyang.me>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
(cherry picked from commit 73d3c26029c07c17ce179dfead092eab4fb8ae2c)
Co-authored-by: Liu Xiaoyi <circuitcoder0@gmail.com>
|
|
Widths are now padded to the maximum width of the inputs.
Co-authored-by: Jack Koenig <koenig@sifive.com>
(cherry picked from commit 546b4e13fe90ff09d24b63664c072d46c13c0c38)
Co-authored-by: Jiuyang Liu <liu@jiuyang.me>
|
|
(cherry picked from commit b55dc36d4edd1d22db37616235c003c89d68d29b)
Co-authored-by: Carlos Eduardo <me@carlosedp.com>
|
|
(#2395)
(cherry picked from commit 055a85298c46c6734880cd828af436adbded1d0a)
Co-authored-by: John Ingalls <43973001+ingallsj@users.noreply.github.com>
|
|
* Improve error reporting (#2376)
* Do not trim stack traces of exceptions with no stack trace
This prevents us from accidentally giving stack traces to exceptions
that don't have them and giving misleading messages telling users to use
--full-stacktrace when it won't actually do anything.
Also deprecate ChiselException.chiselStackTrace which is no longer being
used anywhere in this codebase.
* Add exception class for multiple-errors reported
New chisel3.internal.Errors replaces old anonymous class that would show
up as chisel3.internal.ErrorLog$$anon$1 in error messages.
* Add new option --throw-on-first-error
This tells Chisel not to aggregate recoverable errors but instead to
throw an exception on the first one. This gives a stack trace for users
who need it for debugging.
(cherry picked from commit ff2e9c92247b3848659fa09fdd53ddde2120036a)
* Waive MiMa false positives
The waived change is to a package private constructor.
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Fix the QMC bug for constant and dontcare output.
* Fix the Espresso bug for constant and dontcare output.
(cherry picked from commit 46b53320e9ec09fc26d63259f1821f4234640839)
Co-authored-by: Jiuyang Liu <liu@jiuyang.me>
|
|
(cherry picked from commit 91d7baa8e7162d736f46b6d4964b09016d2dd172)
Co-authored-by: Kevin Laeufer <laeufer@cs.berkeley.edu>
|
|
Command:
sbt scalafmtAll
|
|
* New Feature: Add a Select.ios that works with Definition/Instance
* BugFix: isA now truly ignores type parameters
|
|
BitSet is a new experimental parent type for BitPat.
It enables more complex operations on BitPats.
Co-authored-by: Ocean Shen <shenao6626@gmail.com>
|
|
This makes the resulting Verilog from decoding a TruthTable deterministic.
|
|
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
* DataProducts for Seq and Tuple2-10 in DataProduct companion object
* DataViews for Seq and Tuple 2-10 in DataView companion object
* HWTuple2-10 Bundles in chisel3.experimental
* Implicit conversions from Seq to Vec and Tuple to HWTuple in chisel3.experimental.conversions
|
|
These were not actually deprecated but any APIs using them were long
since deprecated and more recently removed.
They also depend on long deprecated APIs in FIRRTL that will soon be
removed.
|
|
Also remove as many deprecated APIs as possible by inlining
implementations of old deprecated/removed code from firrtl
|
|
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* refactor Queue.hasFlush: Boolean to Queue.flush: Option[Bool].
Using factory Queue(..., hasFlush = true) won't take effects, since in the Queue.apply API, Queue Module is not exposed, thus even user defines hasFlush = true, there is no place for them to give the flush signal.
This commit fix this, refactor Queue.hasFlush: Boolean to Queue.flush: Option[Bool], makes user be able to pass the flush signal into Queue Module.
* use zip to connect.
* refactor docs.
Co-authored-by: Megan Wachs <megan@sifive.com>
|
|
|
|
* Update Arbiter.scala
* Update src/main/scala/chisel3/util/Arbiter.scala
changed group name
Co-authored-by: Megan Wachs <megan@sifive.com>
* minor changes on grouping ArbiterIO
* removed unmatched closing brace
* Remove groupdesc from Arbiter.scala
* Added groupdesc to Aggregate.scala
* Update Arbiter.scala
* Update core/src/main/scala/chisel3/Aggregate.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update Arbiter.scala
* Update src/main/scala/chisel3/util/Arbiter.scala
Added suugestions.
Co-authored-by: Megan Wachs <megan@sifive.com>
* added suggestions from review
* added suggestions from review
* Resolved conflicts
* update Arbiter.scala
* Update core/src/main/scala/chisel3/Aggregate.scala
deleted groudesc for ArbiterIO
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update Scaladoc syntax
* removed some lines
* Better documentation
* Removed @param and @gen
* Update core/src/main/scala/chisel3/Aggregate.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Arbiter.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Added groupdesc to ArbiterIO
* Update src/main/scala/chisel3/util/Arbiter.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update core/src/main/scala/chisel3/Aggregate.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update Arbiter.scala
* Update src/main/scala/chisel3/util/Arbiter.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update Arbiter.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
|
|
* Add field grouping scaladocs for DecoupledIo
* Added groupdesc to DecoupledIO
* Added groupings for IrrevocableIO
* Add groupings for ValidIO
* Add field grouping scaladoc for PRNGIO
* Add field grouping scaladoc for QueueIO
* Added groupings for PipeIO
* Update src/main/scala/chisel3/util/Decoupled.scala
Commited Sugestion
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Decoupled.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Decoupled.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Decoupled.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Decoupled.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Valid.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Valid.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
* Update src/main/scala/chisel3/util/Valid.scala
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
|
|
Exposing more internals of D/I, which are required for supporting D/I with more powerful Chisel libraries:
- Exposing IsClone[_]
- Exposing InstantiableClone[_]
- Gated builders for Instance/Definition
- Unsealing Lookupable, with protected accessors for proto and cloned
|
|
* Add Hierarchy trait
* Add Hierarchy trait
* Add Hierarchy scaladoc
* Add license
* Add isA and tests
* Add back isA
* Add new Select APIs for hierarchy package
* Update scaladoc
* Write outlines for tests
* Add tests and fixes to new Select functions
* Make calculate via lazy val
* Apply suggestions from code review
Co-authored-by: Megan Wachs <megan@sifive.com>
* Apply suggestions from code review
Co-authored-by: Megan Wachs <megan@sifive.com>
* Clean up scaladoc
* Add shouldNot compile
* Apply suggestions from code review
Co-authored-by: Megan Wachs <megan@sifive.com>
* Bugfix all funcs should analyze root too
* Add mdoc, bugfix toDefinition
* Make func private, add scaladoc
* Update src/test/scala/chiselTests/experimental/hierarchy/InstanceSpec.scala
Co-authored-by: Jack Koenig <koenig@sifive.com>
* Made protected vals private
* Apply suggestions from code review
Co-authored-by: Jack Koenig <koenig@sifive.com>
* Address code review comments
* Added additional null check
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
|
|
Also replace all uses of .fire() with .fire
|
|
functions (#2124)
* Migrate nullary funcs to parameterless versions
* Make deprecation message and dummy arguments clear and consistent
Co-authored-by: Megan Wachs <megan@sifive.com>
|
|
* Remove all manual cloneTypes and make it chisel runtime deprecated to add one
* runtime deprecate cloneType with runtime reflection
* [Backport this commit] Bundle: add check that override def cloneType still works (will be made an error later)
* Plugin: make it an error to override cloneType and add a test for that
* Docs: can't compile the cloneType anymore
* BundleSpec: comment out failing test I cannot get to fail or ignore
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
|
|
|
|
|
|
This introduces a new experimental API for module instantiation that disentagles
elaborating the definition (or implementation) from instantiation of
a given module. This solves Chisel's longstanding reliance on
"Deduplication" for generating Verilog with multiple instances of the
same module.
The new API resides in package chisel3.experimental.hierarchy. Please
see the hierarchy ScalaDoc, documentation, and tests for examples of
use.
Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
|
|
* add Y and N to BitPat.
* add ## for BitPat.
* add rawString API.
* use rawString in decoder
* add select and slice to BitPat.
|
|
|
|
|
|
This will be slightly slower as it involves converting from Chisel
modules to FIRRTL modules before turning them into Strings. This cost is
somewhat mitigated by doing that conversion lazily such that we never
materialize the entire firrtl Circuit in memory, only 1 module at a
time.
|