| Age | Commit message (Collapse) | Author |
|
* Make "def width" a private API; expose isWidthKnown instead
Resolves #256.
Since width was used to determine whether getWidth would succeed, I added
def isWidthKnown: Boolean
but another option would be to expose something like
def widthOption: Option[Int]
...thoughts?
* Document getWidth/isWidthKnown
* Add widthOption for more idiomatic Scala manipulation of widths
|
|
The API allowed this before, but not safely, as users could create
name conflicts. This exposes the pre-deduplication/sanitization
naming API, and closes the other one.
|
|
It's not entirely clear what the FIRRTL implementation supports, so
I'm using the ANSI C requirements for the time being.
|
|
Deprecating toBits removes the capability to cast an arbitrary
type to UInt. While it's still possible to do so using asBits.asUInt,
this creates boilerplate. (asBits is almost never useful itself.)
|
|
|
|
For Chisel nodes defined in Module class-level values of type Option or
Iterable, we can still use reflection to assign names based on the name
of the value. This works for arbitrary nesting of Option and Iterable so
long as the innermost type is HasId. Note that this excludes Maps which
always have an innermost type of Tuple2[_,_].
|
|
Clean up Scala code, and use +& to generate a lot less FIRRTL
|
|
Closes #229
h/t @sdtwigg @davidbiancolin
|
|
|
|
|
|
|
|
(#223)
|
|
|
|
|
|
Rather than using a global counter, memoize the last returned value for
colliding names to generate smaller sequence numbers.
|
|
|
|
|
|
package/folder, move more things into utils
|
|
|
|
|
|
* chiselTests: include an example of two empty Vectors killing FIRRTL
* Aggregate: fix a bug whereby Vec[T] was using equals/hashCode of Seq
In Chisel, two vectors are NOT equal just if their contents are equal.
For example, two empty vectors should not be considered equal. This
patch makes Vec use the HasId._id for equality like other Chisel types.
Without this fix, Bundle.namedElts.seen: HashSet[Data]() will eliminate
one of the named vectors and emit bad IR.
|
|
|
|
|
|
Source locators
|
|
|
|
Option(null) returns None, but Some(null) returns Some(null)
|
|
|
|
The return value of Bits.toBools doesn't need to be dynamically indexed
(as you could have just dynamically indexed the Bits itself), so
returning a Seq instead of a Vec is mroe appropriate.
This breaks a circular dependence between Bits and Vec, which helps
with macros/frontend refactoring.
|
|
|
|
|
|
|
|
for source locator macros
|