| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
* Fix style of literal creators
Literal creators for UInt, SInt and Bool were declared with parens, but
virtually all uses of these methods do not use parens. This is for
issue #539.
This fix is an API breaking change. If anyone has used parens, e.g.
val x = 1.U()
This will now be an error
* remove trailing parens from literal creators in IntegerMathTester
|
|
|
|
Part 1 of mega-change in #578
Major notes:
- Input(...) and Output(...) now (effectively) recursively override their elements' directions
- Nodes given userDirection (Input, Output, Flip - what the user assigned to _that_ node) and actualDirection (Input, Output, None, but also Bidirectional and BidirectionalFlip for mostly Aggregates), because of the above (since a higher-level Input(...) can override the locally specified user direction).
- DataMirror (node reflection APIs) added to chisel3.experimental. This provides ways to query the user given direction of a node as well as the actual direction.
- checkSynthesizable replaced with requireIsHardware and requireIsChiselType and made available in chisel3.experimental.
Internal changes notes:
- toType moved into Emitter, this makes the implementation cleaner especially considering that Vec types can't be flipped in FIRRTL. This also more clearly separates Chisel frontend from FIRRTL emission.
- Direction separated from Bindings, both are now fields in Data, and all nodes are given hierarchical directions (Aggregates may be Bidirectional). The actualDirection at the Element (leaf) level should be the same as binding directions previously.
- Bindings are hierarchical, children (of a, for example, Bundle) have a ChildBinding that points to their parent. This is different than the previous scheme where Bindings only applied at the Element (leaf) level.
- Lots of small misc clean up.
Future PRs will address other parts of #578, including stricter direction checks that aren't a side-effect of this internal refactor, stricter checks and splitting of binding operations (Wire vs. WireInit), and node operations not introduced here (getType and deprecation of chiselCloneType). Since those shouldn't mess with internals, those should be much smaller.
|
|
|
|
Enables changing FIRRTL's IR to only accept multiplication of identical
types.
|
|
Fixes #495
Helps distinguish between Records/Bundles defined in Chisel._ vs.
chisel3._. Also override compilationOptions when bulk connecting
Records/Bundles defined in Chisel._. This allows Records/Bundles defined
in Chisel._ code to be correctly bulk connected in chisel3._ code.
|
|
|
|
|
|
|
|
* Remove explicit import of NotStrict - fixes #492
* Provide macro for MemBase.apply().
* Provide macro for MemBase.apply().
Since a macro cannot override an abstract method, provide a concrete
apply method n VecLike() that we can override with a macro.
* Remove concrete apply() in VecLike.
Since MemBase no longer extends the trait VecLike, we do not require a concrete method to which we can apply a macro to extract the appropriate CompileOptions.
* Add missing implicit compileOptions to do_pad() and do_zext().
The latter caused:
```
[error] /vm/home/jenkins/workspace/rocket-chip_with_chisel3/hardfloat/src/main/scala/MulAddRecFN.scala:205: too many arguments for method do_zext: (implicit sourceInfo: chisel3.internal.sourceinfo.SourceInfo)chisel3.core.SInt
[error] val CDom_sExp = io.fromPreMul.sExpSum - io.fromPreMul.doSubMags.zext
```
* Add SourceInfoTransform macros to Vec methods in order to avoid apply() chain issues.
Since utils methods are no longer NotStrict, Pipe objects need access to the client's compile options. There may be more.
* Respond to review comments.
Don't propagate SourceInfo through helper functions.
Replace old usages of CompileOptionsTransform with the now equivalent SourceInfoTransform and redefine CompileOptionsTransform to only deal with CompileOptions.
Just thread CompileOptions (not SourceInfo) through deprecated functions.
|
|
* Remove explicit import of NotStrict - fixes #492
* Provide macro for MemBase.apply().
* Provide macro for MemBase.apply().
Since a macro cannot override an abstract method, provide a concrete
apply method n VecLike() that we can override with a macro.
* Remove concrete apply() in VecLike.
Since MemBase no longer extends the trait VecLike, we do not require a concrete method to which we can apply a macro to extract the appropriate CompileOptions.
|
|
|
|
* Partially revert 8e4ddc62db448b613ae327792e72defca4d115d4
It was an incomplete fix for handling Vec(0).
* Fix assignment from 0-entry Vec: add test
375e2b6a0a456c55298d82837d28986de6211ebc introduced a regression for bundles
containing zero-entry Vecs. Until zero-width UInts are supported, the
zero-entry Vecs need to be flattened out before doing asUInt/asTypeOf on
a bundle. Undoing that commit's replacement of Data.flatten with
Aggregate.getElements is the best interim fix.
|
|
|
|
* still trying to find right mix
* Making some progress on Mux1H
* Mux1H that works in non-optimzed fashion for FixedPoint, works pretty well in general
Catches some additional problem edge cases
Some tests that illustrate most of this
* Moved in Angie's code for handling FixedPoint case
Cleaned up tests considerably, per @ducky64 review
* Just a bit more cleanup
|
|
Using the sample_element of the created wire is incorrect because Wires have no
direction so the Wire constructed for a Vec of Module IO was constructed
incorrectly. Fixes #569 and resolves #522.
|
|
Make it relatively easy to override a single CompileOption.
|
|
Fixes #567
|
|
This caused one hot muxing problems in dsptools
FixedPoint spec fixed based on error uncovered by this change
|
|
This also allows asUInt/asTypeOf to work properly on those Bundles,
even though zero-width wire support is lacking.
|
|
Use fold(0) instead of reduce to handle the corner case.
|
|
Allow muxing FxP of different widths and BPs
|
|
* Revert "Change Vec creation to check if gen is lit (and hence needs to be declared)"
This reverts commit dc86e7e1734d6abacb739b488df1de231e6b41b2.
This may address #522 - using chiselCloneType (instead of cloneType) to preserve directionality.
* Add missing implicits to Vec.apply() signature.
* Use correct macro (CompileOptionsTransform) for indexWhere.
|
|
|
|
This is necessary for user-defined Record-derived types to retain
the same signal name as they would using a Vec.
|
|
Fixes #501. Also added UIntOps test.
|
|
|
|
This turned up after updating #494 (Remove explicit import of NotStrict) and adding the missing implicit CompileOptions to ":="'s signature at which point Scala pointed out FixedPoint's ":=" could not override Data's final ":=" with the same signature: the implicit time bomb.
|
|
* Bugfix #513. Needs better test case
* Improved test
|
|
* change builder for bundle reflection fix
* fixed bug -- should be not assignable
|
|
* Add scaladoc examples for Vec and Bundle
* address comments, added @example tag
eliminate extraneous context
* address comments, added @example tag
eliminate extraneous context
* ok, I've wrestled with the javadoc sytnax, the following commit, is my best result so far
|
|
withClockAndReset, withReset, and withClock allow changing the implicit clock and reset.
Module.clock and Module.reset provide access to the current implicit clock and reset.
|
|
|
|
|
|
|
|
|
|
* Don't allow analog to analog monoconnect
adjust tests accordingly
* demonstrate bit loss in shift right for fixed point
* cleaned up some stuff.
this does not test clean due to bug in firrtl
|
|
Used for stitching Verilog inout through Chisel Modules (from BlackBox
to BlackBox)
|
|
|
|
* Fix up Absolute value #abs
Defines #abs in Num
Implement #abs in UInt
Change #abs in SInt to return an SInt
Change #abs in FixedPoint to return a FixedPoint
Added a couple of tests
Add some scala style suppression to Bits so I can read code in IntelliJ
* Per review
Add tests that abs works for positive values
Added SInt and UInt tests for abs to new underpopulated IntegerMathSpec
Used fixed point literals in fixed points abs definition
|
|
|
|
Retain un-deprecated SeqMem in compatibility mode, deprecate in chisel3.
|
|
* Added vec IO tests for #104
* Added Vec test case for Reg of vecs
* Change Vec creation to check if gen is lit (and hence needs to be declared)
Fixes #104
* Fix tests (add IO())), Vec.fill()
* Fix deprecated usage.
* Add Binding IO() NPE fix so tests pass.
* Fix style - use space consistently.
* Fix style - use space consistently.
|
|
|
|
Fix default suggested name of Module instances (now based on desired name
rather than actual assigned name).
Remove parent/child relationship from Namespace.
Previously, Module and Bundle namespaces were "children" of the Module
definition namespace. This could lead to collisions that would give unexpected
names for module instances or Bundle elements. In particular, otherwise
identical modules that instantiate other identical modules in such a way that
the instance cannot be named via reflection would not be deduplicated because
the names of the instances would collide with the names of the modules in the
Builder.globalNamespace.
|
|
|