| Age | Commit message (Collapse) | Author |
|
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Add SimplifyBinaryOp trait
* Add extra functionality to comparison folding
* Add tests
* Fix comments from review
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
* Consume NoDedupMemAnnotations in ResolveMemoryReference
The ComponentName being pointed to by the annotation no longer exists
after ReplaceSeqMems so we should consume the annotations
* Support renaming in ReplaceMemMacros
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Generates lint-clean Verilog for the case: x + -1
...where x is anything and 1 is any literal.
Master behavior:
input x : SInt<8>
output z : SInt<9>
z <= add(x, SInt(-2))
generates
assign z = $signed(x) + -8'sh2;
After this PR:
assign z = $signed(x) - 8'sh2;
If the literal is the maximum possible literal, a special case is triggered to properly trim the resulting subtraction.
Input:
input x : SInt<2>
output z : SInt<3>
z <= add(x, SInt(-2))
now generates (after this PR)
assign z = $signed(x) - 3'sh2;
* Updated documentation
* Change ArrayBuffer to ListBuffer
* Change name to minNegValue
* Remove mutable public interfaces
Co-authored-by: Albert Magyar <albert.magyar@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
Add a test that EliminateTargetPaths properly duplicates an annotation
pointing at a ModuleTarget.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
* Fixes #1240
* Add failing reg const prop test case from #1240
|
|
* Add constant prop to async regs
* Added another test of no reset value but constant assignment
* Clarify name of updateNodeMap
* Update constant assignment of async reset to not be inferred as a latch, works with donttouch
* Revert "Update constant assignment of async reset to not be inferred as a latch, works with donttouch"
This reverts commit 952bf38127cb32f814496a2b4b3bfb173d532728.
|
|
* Fixes #1344
|
|
|
|
* transform InlineBitExtractions
* InlineNotsTransform, InlineBitExtractionsTransform: inputForm/outputForm = UnknownForm
* clean up some minor redundancies from Adam review
* clarifications from Seldrige review
|
|
Co-authored-by: Jim Lawson <ucbjrl@berkeley.edu>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
Change EliminateTargetPaths to remove ResolvePaths annotations in the
output AnnotationSeq. This prevents a bug whereby the upstream
ResolvePaths annotations from previous runs of EliminateTargetPaths
can result in unexpected duplication.
Adds a test that checks that ResolvePaths annotations are actually
removed.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Change LoggerState.globalLevel to Warn
PR #1305 changes the `globalLogLevel` in `LogLevelAnnotation` to from `None` to `Warn`. Update the default `LoggerState.globalLevel` to `Warn` as well.
* Update LoggerSpec tests to match globalLogLevel of Warn
* Add test of behavior for LogLevel.None
|
|
Change PassTests to include Dedup when running transforms. This makes
PassTests behave more like an actual compiler.
Fixes bugs in Inline, Flatten, and Grouping tests where the tests
would only work without deduplication. This adds
NoCircuiDedupAnnotations to prevent deduplication for the offending
tests.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
|
|
This includes the built-in functions in BackendCompilationUtilities
which are a public API
|
|
Many tools don't except 'always @(posedge 1'h0)' so we assign the
literal to a wire and use that as the posedge target.
|
|
[skip formal checks]
Adds new InlineCastsTransform to the VerilogEmitter which removes
Statements that do nothing but cast by inlining the cast Expression
|
|
|
|
[skip formal checks]
* ConstProp FoldEqual/FoldNotEqual propagate boolean (non-)equality with true/false
* transform InlineNots
* transform back-to-back Nots into straight rename
* swap mux with inverted select
Co-authored-by: Jack Koenig <jack.koenig3@gmail.com>
|
|
InferResets will now support last connect semantics (within the same
scope) when determining the concrete reset type for components of type
Reset. This only includes *unconditional* last connects; it remains
illegal to drive a component of type Reset with different concrete types
under differing when conditions.
For example, the following is now legal:
input a : UInt<1>
input b : AsyncReset
output z : Reset
z <= a
z <= b
The second connect will when and z will be of type AsyncReset.
The following remains illegal:
input a : UInt<1>
input b : AsyncReset
input c : UInt<1>
output z : Reset
z <= a
when c :
z <= b
This commit also ensures that components of type Reset with no drivers
(or only invalidation) default to type UInt<1>. This fixes a bug where
the transform would crash with such input.
|
|
There was some vestigial logging that conflicts with the homebrewed
logger used by most of the codebase
|
|
* Types containing bundles can't generally be converted to a single mask granularity
* Update ReplSeqMemTests to check for illegal masks
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
Recursive literal lookup needs to be guarded against combinational loops
Added a test-case to illustrate the issue when CheckResets is run before CheckCombLoops
|
|
|
|
* Closes #1162
* Instances of extmodules remain in the final hierarchy
* Extmodule definitions are not renamed or duplicated
* The rest of the pass may proceed as normal
|
|
* Fixes #1154
* Tests that #1154 example produces SyntaxErrorsException
* Generally helps catch trailing syntax errors
* Performance-neutral relative to previous grammar
* Recommended by antlr4 devs, can help performance in some cases
* See antlr/antlr4#1540
|
|
|
|
|
|
* Change FIRRTL-internal API, affecting only one corner case
* Make API more "DWIM" and consistent with other methods
* Add test cases for findInstancesInHierarchy
* Update Scaladoc
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|
|
|
|
|
|
Major features:
- Added Interval type, as well as PrimOps asInterval, clip, wrap, and sqz.
- Changed PrimOp names: bpset -> setp, bpshl -> incp, bpshr -> decp
- Refactored width/bound inferencer into a separate constraint solver
- Added transforms to infer, trim, and remove interval bounds
- Tests for said features
Plan to be released with 1.3
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
* Corrects behavior under write collisions
* Avoids heavily refactoring pass
|
|
* Make the read-under-write (RUW) parameter typesafe
* Add RUW support to the FIRRTL proto and CHIRRTL grammar
|
|
* dont chain inline and refix RenameMaps
* cache already inlined modules
* reduce number of chained RenameMaps
* InlineInstances: cleanup and add comments
|
|
The following names are changed:
- gender -> flow
- Gender -> Flow
- MALE -> SourceFlow
- FEMALE -> SinkFlow
- BIGENDER -> DuplexFlow
- UNKNOWNGENDER -> UnknownFlow
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
|