| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This adds three new methods to ChiselStage to replace deprecated
methods in the Driver for converting a Chisel circuit to a string:
- emitChirrtl
- emitFirrtl
- emitVerilog
This also adds a ChiselStage companion object that lets you generated
a Chisel Circuit or a FIRRTL Circuit from a Chisel module:
- elaborate
- convert
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
squash! Add string emission helper methods to ChiselStage
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Add trait chisel3.experimental.NoChiselNamePrefix which causes
@chiselName to skip naming of the instance effectively preventing it
from prefixing any vals inside the instance. It can be applied to
classes such that all instances of that class have this property, or to
individual instances (via creating an anonymous class inline).
Also add basic ScalaDoc for NoChiselNamePrefix and chiselName.
|
|
Adds two tests:
1. Test that an internal requirement failure (a bare exception) inside
a Builder is properly reported/trimmed by ChsielStage/ChiselMain
2. Test that the full stack trace includes the ChiselException
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
squash! Wrap elaboration in ChiselException
|
|
Introduces mutually-exclusive traits RequireAsyncReset and
RequireSyncReset to set the type of the implicit reset in
MultiIOModules. The Scala-type remains Reset, but the Chisel
elaboration-time checks apply.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Clean up aspects
* Refactored InjectingAspect with InjectorAspect
* Made AspectLibrary work with objects
* Cleaned up code
* Apply suggestions from code review
* Added tests, removed deprecated newInstance call
* Backed out removal of newInstance as exceptions were different
* Removed trailing commas
|
|
This changes Phase dependency specification to use the new Dependency
wrapper. Previously, dependencies were specified as classes.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
Close #1134
|
|
Co-authored-by: Megan Wachs <megan@sifive.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
Change the emission strategy for Bits methods andR and orR to emit
FIRRTL bitwise reduce operations andr and orr.
Add two tests that assert the correct behavior of these operations in
BitwiseOpsSpec.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
* Add support for readUnderWrite to SyncReadMem
* Add write collision behavior test to MemorySpec
* Update constant names
|
|
|
|
|
|
|
|
* Change when thunks return type to Any
Changes the type of the thunk for when and WhenContext methods from
call-by-name Unit to call-by-name Any. This prevents a
warning (-Ywarn-value-discard) where a when thunk is returning
something other than Unit that is then discarded, e.g., another
WhenContext.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
* Change switch thunk return to type to Any
Changes the type of switch thunks from call-by-name Unit to
call-by-name Any. This prevents a warning (-Ywarn-value-discard) when
the internals of a switch block return something other than Unit which
is then discarded.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
# Conflicts:
# src/test/scala/chiselTests/IntervalSpec.scala
|
|
|
|
Non-functional, must have been a typo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Shortcut for .asUInt.asBool
Added test to show it works
|
|
decimal
- made .F and .I work for creating fixed point and interval lits from big decimal
- Added NumObject trait which provides new math conversions
- Made a Num object that extends NumObject
- Add this trait to FixedPoint and Interval for backward compatibility
- Removed code that is now in NumObject, keeping things DRY
- Add tests to FixedPointSpec to show lit conversion to double and big decimal
- Add tests to IntervalSpec to show lit conversion to double and big decimal
- Add tests to LiteralExtractorSpec to show general math conversions between BigInts with binary points and double and big decimal
|
|
The BitPat.parse factory though did not remove these from the returned count.
This fixes that adds whitespace and underscores to the unit tests
This is an updated vesion of Chisel PR #1069
|
|
|
|
This removes a dead line where a WriteEmitted phase is constructed.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
- boundary testing was not taking binary point into account correctly
- add tests to show where things work and where they are supposed to fail
|
|
- getLowestPossibleValue
- getHighestPossibleValue
- getPossibleValues
|
|
This reverts commit 85fe90d5b7ed4e1101b0b3959a1d362eb93915ac.
|
|
|
|
|
|
* Use macro to materialize CompileOptions in Chisel._
This switches from using an implicit val that required awkward
suppression (as illustrated in CompileOptionsSpec) to allowing
overriding in the same way as done in "import chisel3._" via the
creation of an implicit val in lexical scope.
* Deprecate Chisel.defaultCompileOptions
|
|
|
|
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: Albert Magyar <albert.magyar@gmail.com>
|
|
This modifies MuxLookup to not use the 'default' mapping argument if a
"full" mapping is provided. A "full" mapping enumerates all possible
cases for a 'key' argument of a known size. This will check literal
values to ensure exhaustiveness holds.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: Albert Magyar <albert.magyar@gmail.com>
|
|
Accomplished by changing the code gen for casting literals to
aggregates. Rather than connecting the literal to a wire that is then
bit selected from, just bit select from the literal which saves the
creation of an intermediate wire and matches FIRRTL's semantics for
legal async reset initial values.
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This enables users to use the nice run method of `ChiselStage` with their own set of phases.
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This fixes a bug where internal boring using BoringUtils.bore would
fail because it was using instanceName which cannot be called before
the module closes. Previously, this meant that BoringUtils.bore would
work for boring instances (which are closed in a parent), but not for
boring signals in the current, unclosed module.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Plan to be released with 3.3.
Breaks experimental Range API.
Adds new Interval type and associated support.
This commit adds the following:
- Renamed Range to IntervalRange to avoid name collision with scala Range
- Changed RangeTransform macro to Return an IntervalRange
- Improved error messages on missing comma or decimal
- Added notational support for binary point
- Some formatting cleanup also
- SIntFactory
- Change to use IntervalRange API
- UIntFactory
- UInt from range has custom width computation
- It does not need to deal with lowerbound extending bit requirements
- Code to handle special case of range"[0,0]" to have a width of 1
- IR.scala
- Removed Bound and other constraint code that was duplicating firrtl stuff
- Added new RangeType
- Added IntervalRange class and object
- RangeSpec
- modified just a bit to handle notational differences
- previous range interpolator returned tuple now returns IntervalRange
- Add IntervalType to emitter
- Added IntervalSpec with many tests
- Added ScalaIntervalSimulatorSpec which tests golden model for Interval
- Added ScalaIntervalSimulator which is a golden model for Interval
- This gold may not have been polished to a high sheen
- Add IntervalLit cases to Converter
- Add Interval PrimOps to IR
- asInterval, wrap, squz, clip, setp, decp, incp
- Add IntervalLit class to IR
- Add Interval to MonoConnect
- Add Interval Type to Bits (in experimental package)
- add conversions to Interval from other types
- Add Interval clone stuff to Data
- Add Literal creation helpers to chisel3 package
- these may move to experimental if I can figure that out
|
|
Dynamically indexing a Vec of Flipped bidirectional Bundles would get
the wrong directions on the elements of the Bundles
Fixes #1192
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|