| Age | Commit message (Collapse) | Author |
|
|
|
|
|
toString on Data subtypes will now print the type and optionally binding information including literals and IO names as feasible.
|
|
This compresses the Scaladoc for BoringUtils slightly by using 120
character lines and removing unnecessary whitespace.
This also changes the poorly named "dedup" parameter to the what it
actually is: "disableDedup".
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This adds two tests to the BoringUtilsSpec to explicitly verify that
deduplication is required when boring. This adds tests that both
verify that the test passes as expected with deduplication enabled and
that the same test fails with deduplication disabled.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This fixes a bug where BoringUtils non-hierarchical sinks would be
deduplicated even when specified that they should not be.
h/t @ucbjrl for discovering this!
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
|
|
Module class names (#994)
|
|
|
|
Verilator 4.008 dropped the hammer on procedural wire assignment to
align with the IEEE standard (first I've heard of this, though). The
VerilogVendingMachine.v test resource will error in Verilator 4.008
with a PROCASSWIRE error if you try to compile it. This fixes that
example to only assign to a register.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
JDK 11 `java.lang.String#lines` conflicts with Scala `StringOps#lines`.
This has been fixed in scalac 2.12.8 but projects using 2.11 in their
cross-build need the `Predef.augmentString` patch.
[Scala bug & fix reference](https://github.com/scala/bug/issues/11125)
|
|
* Fix width propagation of non-literals in WireInit and RegInit
* Change .getWidth to throw an exception instead of calling .get
* Add utilities for checking inferred vs. known widths
* Add tests for Wire, WireInit, Reg, and RegInit width inference
* Add ScalaDoc for Reg, Wire, RegInit, and WireInit
|
|
|
|
|
|
The expanded version substituted in by the macro was misspelled, renamed
from toBools -> do_toBools as expected by the macro
|
|
- Trim stack trace to show better, reduced information to the user
- Add --full-stacktrace to FIRRTL option to show full stack trace
|
|
Fixes #893
|
|
Resolves #917
|
|
|
|
* Turned off strong enum annotations because they weren't working
with Vec indexes
* Ignore annotation tests using ScalaTest's 'ignore', rather than
by commenting them out
|
|
Quickfix for LoadMemoryTransform that gets this to work with Instance
Annotations. The new Instance Annotations caused a corner case where a
LoadMemoryAnnotation would be duplicated (via update/renaming) and the
resulting annotation would differ from the original in only their
originalMemoryNameOpt field. This corrects that by having the
ChiselLoadMemoryAnnotation also emit the originalMemoryNameOpt field where
it did not previously.
First part of a fix for freechipsproject/firrtl#922.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This wraps the evaluation of BaseModule.name in try/catch to look for a
NullPointerException that may result from trying to evaluate desiredName
before it's ready. This catches a test case of using a desiredName that
depends on a later defined eager subinstance.
h/t @jackkoenig
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This changes BaseModule.name to be lazy (instead of eager) to enable a
desiredName to be a function of a sub-instance. This includes a test case
showing the new behavior.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
* Added new strongly-typed enum construct called "StrongEnum". "StrongEnum" will automatically generate annotations that HDL backends can use to mark components as enums
Removed "override val width" constructor parameter from "Element" so that classes with variable widths, like the new strong enums, can inherit from it
Changed the parameter types of certain functions, such as "switch", "is", and "LitArg.bindLitArg" from "Bits" to "Element", so that they can take the new strong enums as arguments
* Added tests for the new strong enums
* Changed StrongEnum exception names and made sure in StrongEnum tests that the correct types of exceptions are thrown
* Fixed bug where an enum's global annotation would not be set if it was used in multiple circuits
Made styling changes to StrongEnum.scala
* Reverted accidental changes to the AnnotatingDiamond test
* Changed the API for casting non-literal UInts to enums
Added an isValid function that checks whether or not enums have valid values
Calling getWidth on an enum's companion object now returns a BigInt instead of an Int
* Casting a literal to an enum using the StrongEnum.castFromNonLit(n) function is now simply a wrapper for StrongEnum.apply(n)
* Fixed compilation bug
* * Added "next" method to EnumType
* Renamed "castFromNonLit" to "fromBits"
* The FSM example in the test/scala/cookbook now uses StrongEnums
* * Changed strong enum API, so that users no longer have to declare both a class and a companion object for each strong enum
* Strong enums do not have to be static any longer
* * Added scope protections to ChiselEnum.Value so that users cannot call it
outside of a ChiselEnum definition
* Renamed ChiselEnum.Value type to ChiselEnum.Type so that we can give
it a companion object just like UInt and Bool do
* * Moved strong enums into experimental package
* Non-literal UInts can now be cast to enums with apply() rather than
fromBits()
* Reduced code-duplication by moving some functions from EnumType and
Bits to Element
|
|
A FIRRTL change to inlining changes the inlined instance delimiter to "_"
from "$". This change is reflected here in an update to the associated
Chisel tests for the Inline API.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
* Modify noenq to set the input wires to DontCare.
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
This places all do_* methods (and two unary methods in SInt and FixedPoint
that act like do_* methods) inside the ScalaDoc group
"SourceInfoTransformMacro". Classes/objects which need information about
this group have an additional bare trait mixed in, `SourceInfoDoc`, that
provides information about the group and its priority.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
* Ability to load memories at simulation startup
* first pass
* create annotation
* create skeleton Transform
* Work in progress
Building out transform and pass now
* Support for LoadMemory annotation
* Creates chisel and firrtl LoadMemory annotations
* LoadMemoryTransform converts annotation into BlackBox InLine
* Simple test that verilog bound modules get created.
* Support for LoadMemory annotation
* Supports Bundled/multi-field memories
* more tests
* support for `$readmemh` and `$readmemb`
* warns if suffix used in file specification.
* Support for LoadMemory annotation
* Use standard chisel annotation idiom
* Support for LoadMemory annotation
* Fixes for @seldridge nits and super-nits
* Support for LoadMemory annotation
- transform now only runs if emitter is an instance of VerilogEmitter
- suffixes on memory text files are now respected
- if suffix exists and memory is aggregate, aggregate sub-fields will now be inserted before suffix
- every bind module created gets a unique number
- this is required when multiple loaded memories appear in a module
- this should be generalized for other uses of binding modules
* Support for LoadMemory annotation
- remove un-needed suffix test
* Support for LoadMemory annotation
- remove instance walk, now just processes each module
* Support for LoadMemory annotation
- Move LoadMemoryTransformation into Firrtl for treadle to access it.
* Support for LoadMemory annotation
- One more bug in suffix handling has been eliminated
* Support for LoadMemory annotation
- remove unused findModule per jackkoenig
- fixed complex test, bad filename edge case
* Support for LoadMemory annotation
- changed to not use intellij style column alignment for : declarations
* Load memory from file
Fixes based on @jkoenig review
- remove unused BindPrefixFactory
- Moved code from CreateBindableMemoryLoaders into to LoadMemoryTransfrom
- Made map to find relevant memory annotations faster
- Made map to find modules referenced by annotations faster
- Made things private that should be private
- DefAnnotatedMemorys are no longer referenced, shouldn't be found here.
- println of error changed to failed
* Loading memories from files
- Many changes based on review
- move stuff into experimental
- clean up annotation manipulation
- manage tests better
- use more standard practices for transform
* Loading memories from files
- More review changes
- Move doc from annotation to the object apply method that generates the annotation
- Make scalastyle directives more specific
- Use more efficient collect to generate name to module map
- Made lines obey style length limit
- a couple of cleanups of imports in tests
- removed some commented out code
- optimized checking for lines using .exists
- use _ for unused variable in match
|
|
* Inhibit aggressive resource file name mangling.
This addresses #883.
* Use common method to write resources to a directory to keep file names consistent.
|
|
This adds a new trait, FlattenInstance, to chisel3.util.experimental. When
mixed into a module or a specific instance this trait will "flatten",
i.e., "inline that module and all of its submodules".
This includes testing (additions to InlineSpec) and ScalaDoc
documentation.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This adds a new trait, InlineInstance, to chisel3.util.experimental. This
trait, when mixed into a specific module or instance, will "inline" that
module, i.e., "collapse a module while preserving it's submodules."
This includes testing (InlineSpec) and ScalaDoc documentation.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
|
|
We can sometimes shim with other workarounds like VecInit or manually
creating a mux
|
|
|
|
|
|
|
|
|
|
|
|
This adds an annotator that provides a linkage to the FIRRTL
WiringTransform. This enables synthesizable cross module references
between one source and multiple sinks without changing IO (the
WiringTransform bores through the hierarchy).
Per WiringTransform, this will connect sources to their closest
sinks (as determined by BFS) or fail if ownership is indeterminate.
Make TesterDriver.execute work like Driver.execute:
- annotations are included when running FIRRTL
- custom transforms are run automatically
Also, add a bore method to BoringUtils that allows you to do one source to
multi-sink mapping in a single call. This adds a test that this is doing
the same thing as the equivalent call via disjoint addSink/addSource.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
Fixes #852
|
|
See https://github.com/freechipsproject/chisel3/issues/867 for future API discussion
|
|
ucb-bar/chisel2-deprecated#734) and test for same.
|
|
|
|
They should not be deprecated until zero-width wires actually work
|