| Age | Commit message (Collapse) | Author |
|
Often times the scala runtime reflection fails to find an appropriate
name for a given net. This commit tries to partially ameliorate the
issue by exposing a suggestName function onto HasId (i.e. Module, Data)
that the user can call to 'suggest' a name.
Only the first suggestion is taken so repeated calls to suggestName will
not change the name for that node. This type of name exposure is
slightly risky as there is a chance the same name is suggested in the
same namespace. Thus, naming within a Module occurs in two passes:
The suggestion phase is when the user calls suggestName, etc. Near the
'end,' the Module uses runtime reflection to suggest names as well.
The forcing phase is when all the nodes are run through and a name is
'forced' onto them, using the namespace to suggest alternatives if the
desired one is taken. If no suggestion is present, the default name is
T, as before.
Second, there is an issue that commonly comes up when a component
library creates intermediate logic and then only returns a piece, or
even a piece of a piece (like part of a module IO). Any names suggested
by the Module by reflection onto that return value are either lost or
not fully applied. This issue is resolved by TransitName. TransitName
attaches a hook to the suggestName function of a HasId. With that hook,
any time suggestName is called on the hooked ID, that name suggestion is
also applied to other nodes.
For example, if Queue(in) is called, then any attempts to name the
returned output DecoupledIO will actually translate to naming attempts
on the backing Queue.
|
|
|
|
|
|
|
|
|
|
I had a def instead of a val.
|
|
|
|
One could make an argument for disallowing n=0, too, but HW generators
will benefit from our leniency.
Closes #107. Thanks @jackkoenig
|
|
|
|
Users should assume it's OK to make them expensive to evaluate.
|
|
|
|
It's an unconvincing means to pretend there isn't mutable state when
there really is. It's more confusing and less performant than just
calling a spade a spade.
|
|
Mathematically, we should also reject 0, like log2Ceil does. But accepting
0 and returning 1 is more in the spirit of the special case for widths.
|
|
This makes chisel2's behaviour and makes it
easier to read large constants.
|
|
There's a separate debate to be had about whether we want to
default-initialize Wires to invalid. This patch just fixes the
implementation of the previous, unsafe approach, which was usually,
but not always, defaulting to invalid.
|
|
|
|
This would ultimately get DCE'd, but it's easy enough to not
generate the dead code in the first place.
|
|
- Remove power-of-2 restriction on count
- Avoid redundancy between lockIdx and chosen signals, reducing area
- Infer locked from lockCount, rather than maintaining separate state
- Reduce FIRRTL node count in several places
- Special-case simple Arbiter, which avoids serializing the computation
of io.chosen with io.out.valid/bits. This lops off a few FO4 delays
at no area cost, and actually reduces area if io.chosen isn't used.
|
|
It was never meant to be a public API, and the implementation left
something to be desired.
|
|
It doesn't really make sense to create a one-hot result then follow it
with a decoder. It's more performant to use a PriorityEncoder followed
by a comparator. Discourage the former by returning Seq, not Vec.
In Chisel2, it seems the return type was originally Seq, but was at some
point inadvertently changed to Vec.
|
|
Sign- or zero-extend the argument to match.
|
|
For internal purposes only. Avoids redundant code emission for assertions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show verilator command on starndard out
Changed --Wno-fatal to -Wno-fatal (double dash became single dash) in accordance with verilator docs
println the verilator command to the standard out, so it can be seen along with the various compiler calls
|
|
I'm getting this error and the message is awful.
|
|
I'm trying to get RocketChip to work with Chisel3 again, and we need to
run in multiple directories. This fixes the workaround I made earlier
to actually parse the passed command-line arguments so I can emit FIRRTL
in the correct directory.
|
|
for DeqIO and EnqIO initialization is likely to change.
|
|
Make the corresponding test run faster by giving it a Counter.
|
|
EnqIO bundles
|
|
|
|
Chisel tester support
|
|
|
|
Cleanup comment for finish method in BasicTester, and finishWrapper in TesterDriver.
|
|
|
|
clean up the test example
|
|
|
|
Separate assertion failure message from source locator line
|
|
|
|
subclass which allows tester to have clean up and other construction code executed after a user code executed during constructor of that subclass
|
|
Add Flipped trait; fix DeqIO, this fix looks good to go
|
|
clonable
|
|
|
|
If we end up generalizing Strings, this code should be moved elsewhere.
Note FIRRTL doesn't handle this stuff right, so I'm not committing the
companion test yet.
|
|
|
|
|