| Age | Commit message (Collapse) | Author |
|
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Add test to check ShiftRegister(s) with delay is 0.
This should break ShiftRegister(x, 0) since last is not exist in a empty
Seq. Originally, test only test 1 to 4, which missed a potential bug
from #1723.
* Fix ShiftRegister with 0 delay.
if ShiftRegisters is empty, java will complain:
```
java.util.NoSuchElementException
scala.collection.LinearSeqOptimized.last(LinearSeqOptimized.scala:150)
```
This fix this issue and return `in` directly when ShiftRegister size is 0.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* add ShiftRegisters to expose register inside ShiftRegister.
* use Seq.iter for oneline implementation.
|
|
|
|
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
This annotation adds memory import with inline generation for the
emmiter.
Supports both readmemh and readmemb statements based on argument.
|
|
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
|
|
* Added SyncReadMem-based implementation of the Queue class
* Rework of the parametrized Queue class SyncReadMem-based implementation
* Modification of the parametrized Queue class SyncReadMem-based implementation
* Limiting the visibility of the read address for SyncReadMem-based Queue
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
|
|
If a method passed to higher function does not return any value,
it is prefer to use `foreach` instead of `map`.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
|
|
* Improve source locators for switch statements.
|
|
* Added forcename transform and tests
* Added documentation and additional error checking
* Added mdoc. Added RunFirrtlTransform trait
* Removed TODO comment
* Addressed reviewer feedback
* Removed trailing comma
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
* Return 0.U for asUInt of a zero-element Seq
Add a condition to SeqUtils.asUInt to have it return an unspecified
width 0.U when applied to an empty sequence. This enables the ability
to do a Cat of a zero-element sequence.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
* Test elaboration of Cat on zero-element Seq
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
|
|
* ExtModule's lacked support built in support for providing
the verilog source. This changes creates traits that
can be used with ExtModule to provide the support currently found in
BlackBox
- Add support for ExtModule helpers
- HasExtModuleResource to use addResource
- HasExtModuleInline to use setInline
- HasExtModulePath to use addPath
- Add tests of the above support.
- Note: These tests use Stage instead of Driver
- Added ScalaDoc for HasBlackBoxInline#setInline
* Fix the danged trailing commas.
* Change to use `.transform` as the correct API for `ChiselStage`
|
|
Change source and other relevant files to use SPDX license
LICENSE file moved from src/ to ./
Changed license file to refer to this per recommendation
using_spdx_license_list_short_identifiers
WARNING: Tests fail with as of yet undiagnosed error
```
[error] Failed: Total 691, Failed 19, Errors 0, Passed 672, Ignored 15
[error] Failed tests:
[error] chiselTests.QueueSpec
[error] examples.VendingMachineGeneratorSpec
[error] chiselTests.HarnessSpec
[error] chiselTests.ConnectSpec
[error] chiselTests.aop.SelectSpec
[error] chiselTests.PopCountSpec
[error] chiselTests.CloneModuleSpec
[error] (Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 379 s (06:19), completed Sep 30, 2020 12:38:17 AM
sbt:chisel3>
```
|
|
|
|
Co-authored-by: Megan Wachs <megan@sifive.com>
|
|
* fix loadMemoryFromFile to work with binary
Passed in hexOrBinary parameter to ChiselLoadMemoryAnnotation
* Added test for binary format support in loadMemoryFromFile
* Added test for binary format support in loadMemoryFromFile
|
|
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
Includes special case support for Counter(0) which has identical
behavior to Counter(1) except for the value of n.
|
|
comment fix only.
|
|
* Add positive range generator
* Allow the Counter module to be instantiated with a Scala range
* Use head/last to determine counter width
Co-authored-by: Jack Koenig <jack.koenig3@gmail.com>
* Let counter overflow naturally when appropriate
We only need to explicitly wrap counters that don't start at zero, or end on a power of two. Otherwise we just let the counter overflow naturally to avoid wasting an extra mux.
* Require counter range to be non-empty
Co-authored-by: Jack Koenig <jack.koenig3@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
Added prefixing and a compiler plugin to improve naming. Only works for Scala 2.12 and above.
Co-authored-by: Jack Koenig <koenig@sifive.com>
|
|
|
|
* Canonicalize construction of empty Decoupled
* Change signature after dev meeting discussion
* Make EmptyBundle private and final
* Add test case for Decoupled with no payload
* Apply suggestions from code review
Co-authored-by: Richard Lin <richard.lin@berkeley.edu>
Co-authored-by: Albert Magyar <albert.magyar@gmail.com>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: Adam Izraelevitz <azidar@gmail.com>
Co-authored-by: Richard Lin <richard.lin@berkeley.edu>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
* Added group chisel API
* Removed println
* Added scaladoc
* Added more tests
* Cleaned spacing and removed println
Co-authored-by: Chick Markley <chick@qrhino.com>
Co-authored-by: Jim Lawson <ucbjrl@berkeley.edu>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Co-authored-by: Adam Izraelevitz <azidar@gmail.com>
|
|
This reverts commit c279860c36a73984cd1b7b0ac6c213e8b44a7143.
|
|
Remove var from object Counter.apply, using a Wire instead. Also improve
some ScalaDoc and the class Counter require message.
|
|
* Show linking against Javadoc
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
* Add sbt-api-mappings plugin
This adds the sbt-api-mappings plugin which enables
auto-linking (properly setting the apiMappings for the sbt project) so
that Scaldoc/unidoc generation will now automatically link against
Java and Scala API docs (and use the right version).
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
* Show linking against Scala APIs
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Close #1134
|
|
* Change when thunks return type to Any
Changes the type of the thunk for when and WhenContext methods from
call-by-name Unit to call-by-name Any. This prevents a
warning (-Ywarn-value-discard) where a when thunk is returning
something other than Unit that is then discarded, e.g., another
WhenContext.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
* Change switch thunk return to type to Any
Changes the type of switch thunks from call-by-name Unit to
call-by-name Any. This prevents a warning (-Ywarn-value-discard) when
the internals of a switch block return something other than Unit which
is then discarded.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
The BitPat.parse factory though did not remove these from the returned count.
This fixes that adds whitespace and underscores to the unit tests
This is an updated vesion of Chisel PR #1069
|
|
This modifies MuxLookup to not use the 'default' mapping argument if a
"full" mapping is provided. A "full" mapping enumerates all possible
cases for a 'key' argument of a known size. This will check literal
values to ensure exhaustiveness holds.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Co-authored-by: Albert Magyar <albert.magyar@gmail.com>
|
|
This fixes a bug where internal boring using BoringUtils.bore would
fail because it was using instanceName which cannot be called before
the module closes. Previously, this meant that BoringUtils.bore would
work for boring instances (which are closed in a parent), but not for
boring signals in the current, unclosed module.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
FIRRTL barfs on negative and zero-sized memories
|
|
|
|
* Move dontTouch out of experimental package.
* Move RawModule, MultiIOModule out of experimental.
* Respond to comments - Move LagacyModule from experimental to internal.
*NOTE*: At some point, these module definitions (especially those in separate packages) should be moved to individual files at the appropriate location in the source tree. The current organization is purely to support comparison with prior versions.
* Fix up a few more imports.
|
|
Muxes and resets are only isomorphic with synchronous reset. Use a reset
instead of a conditional to make this async-reset-safe.
|
|
Anything removed by this that is used by the compatibility layer is
migrated to the compatibility layer.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
* Add width utility functions to avoid incorrect usage of bare log2Ceil().
* Respond to comments:
Remove apply(Data) method.
Change name(s) to signedBitLength, unsignedBitLength.
* Respond to comments - don't be lazy.
Independently calculate the bit length to verify correct operation.
* Respond to comments - return in.bitLength - 0 (not 1) for 0
* Respond to comments - update wdith for signed 0; add explicit tests.
* Add comment expressing zero width wire assumption.
|
|
* Added documentation to Decoupled, Conditionals, Counter
* Fixed private Counter class error
* Move Counter class deprecation and re-definition into util package object.
* Revert "Move Counter class deprecation and re-definition into util package object."
This reverts commit f61bdddf7051522363e1d203fcd46b512047c87d.
* Restore the old Counter definition and address this in a separate PR.
We can move the deprecation warning and the type definition into the util package object (see f61bdddf7051522363e1d203fcd46b512047c87d), but then we fail tests using Counter with a `ScalaReflectionException` in Aggregate.scala:779 (in def cloneType) when:
`Some(mirror.reflect(this).symbol)` generates `type Counter is not a class`.
* Made @ducky64 change to Counter doc
Used to generate an inline (logic directly in the containing Module, no internal Module is created) hardware counter.
|
|
* Move Bits, Data, and BitPat to chiselFrontend/src/main/scala/chisel3
and deal with the subsequent fallout.
* Move Aggregate, Clock, Mem, Printf, Reg
* Move almost all chisel3.core definitions to chisel3 or chisel3.experimental
* Revive core package object to provide aliases for moved definitions.
* Cleanup package definitions; eliminate ambiguous implicits
* Move more definitions to experimental.
Extract BaseModule, DataMirror, ExtModule, IO into their own files.
* Put BitPat back in chisel3.util
* More experimental motion - avoid multiple import definitions.
* Add experimental.FixedPoint alias
* Add EnumType definition to core package.
Update deprecated messages to refer to correct object
* Move FixedPoint into the experimental package (but keep it in Bits.scala).
* Add missing implicits to core/package - compatibility
* Cleanup: update ScalaDoc references; remove unused imports
* Add Reset alias to core/package
* Use common 3.2 version in deprecation warning
* Move Binding from core to internal.
* Optimize imports.
* Repair IntelliJ's overly cleanliness.
* Move Bits, Data, and BitPat to chiselFrontend/src/main/scala/chisel3
and deal with the subsequent fallout.
Move Aggregate, Clock, Mem, Printf, Reg
Move almost all chisel3.core definitions to chisel3 or chisel3.experimental
Revive core package object to provide aliases for moved definitions.
Cleanup package definitions; eliminate ambiguous implicits
Move more definitions to experimental.
Extract BaseModule, DataMirror, ExtModule, IO into their own files.
Add EnumType definition to core package.
Update deprecated messages to refer to correct object
Move FixedPoint into the experimental package (but keep it in Bits.scala).
Add missing implicits to core/package - compatibility
Cleanup: update ScalaDoc references; remove unused imports
Use common 3.2 version in deprecation warning
Move Binding from core to internal.
* Change == to reference equality (eq) in Data print (#1044)
* Remove @chiselName from MixedVec (#1045)
* Fix enum annotations (#936)
* Turned off strong enum annotations because they weren't working with Vec
indexes
* Add new EnumVecAnnotation for vecs of enums and vecs of bundles with
enum fields
* Changed Clock's width parameter back to a fixed constant value of 1
* Fixed enum annotations for Vecs of Bundles which contain enum elements
* Fixed usage of "when/otherwise" to use consistent style
* Add Record to type hierarchy documentation
* Undeprecate isLit (#1048)
* move doNotDedup to experimental (#1008)
* Aggregate coverage - aggregate tests but not publishing (#1040)
Discover a working combination of aggregate usage to enable coverage of subproject testing but publish a single Jar.
Use "scalastyle-test-config.xml" for scalastyle config in tests.
Enable "_" in method names and accept method names ending in "_=".
Re-sync scalastyle-test-config.xml with scalastyle-config.xml
This should finally fix #772.
* Check field referential equality in autoclonetype (#1047)
* Allow naming annotation to work outside builder context (#1051)
* Try to eliminate JVM hang due to static initialization deadlock (#1053)
* Make core.DontCare private to chisel3 (#1054)
Force clients to access 'DontCare' through the chisel3 package to ensure it's created as a chisel3 object and not a client object.
* Ignore empty aggregates elements when binding aggregate direction (#946)
Previously, including an empty aggregate in a Bundle would cause
a MixedDirectionAggregateException because it has no elements and thus
doesn't have a direction
* Add SampleElementBinding for Vec sample elements
* Add ActualDirection.Empty for bound empty aggregates
* Detect bundle aliasing (#1050)
* Implement connectFromBits in ChiselEnum (#1052)
This is necessary to use ChiselEnum in aggregates where things are
casted using .asTypeOf
* Optimize imports.
* Move Analog to experimental.
* More repackage cleanup - reduce differences with master.
* Cleanup chisel3 references.
* More chisel3 reference cleanup.
* Merge cleanup.
* Remove unused import
* Bump core deprecation to 3.3
* Move DontCare back into Data.scala inside package internal
* Re-indent experimental/internal package code
* Move code back to original files - facilitate comparison with other branches
* Some code motion, update imports, minimize master differences
Move exceptions up to chisel3 package object - they're part of the interface.
* More master diff minimization.
* Try to eliminate JVM hang due to static initialization deadlock (#1053)
* Ignore empty aggregates elements when binding aggregate direction (#946)
Previously, including an empty aggregate in a Bundle would cause
a MixedDirectionAggregateException because it has no elements and thus
doesn't have a direction
* Add SampleElementBinding for Vec sample elements
* Add ActualDirection.Empty for bound empty aggregates
* Implement connectFromBits in ChiselEnum (#1052)
This is necessary to use ChiselEnum in aggregates where things are
casted using .asTypeOf
* Move Analog to experimental.
More repackage cleanup - reduce differences with master.
Cleanup chisel3 references.
More chisel3 reference cleanup.
* Fix wrong directionality for Vec(Flipped())
Create Chisel IR Port() in a way that Converter is happy with.
Also add more extensive test suite for future-proofing.
Close #1063
* Move Bits, Data, and BitPat to chiselFrontend/src/main/scala/chisel3
and deal with the subsequent fallout.
Move Aggregate, Clock, Mem, Printf, Reg
Move almost all chisel3.core definitions to chisel3 or chisel3.experimental
Revive core package object to provide aliases for moved definitions.
Cleanup package definitions; eliminate ambiguous implicits
Move more definitions to experimental.
Extract BaseModule, DataMirror, ExtModule, IO into their own files.
Put BitPat back in chisel3.util
More experimental motion - avoid multiple import definitions.
Add experimental.FixedPoint alias
Add EnumType definition to core package.
Update deprecated messages to refer to correct object
Move FixedPoint into the experimental package (but keep it in Bits.scala).
Add missing implicits to core/package - compatibility
Cleanup: update ScalaDoc references; remove unused imports
Add Reset alias to core/package
Use common 3.2 version in deprecation warning
Move Binding from core to internal.
Optimize imports.
Repair IntelliJ's overly cleanliness.
Move Bits, Data, and BitPat to chiselFrontend/src/main/scala/chisel3
and deal with the subsequent fallout.
Move Aggregate, Clock, Mem, Printf, Reg
Move almost all chisel3.core definitions to chisel3 or chisel3.experimental
Revive core package object to provide aliases for moved definitions.
Cleanup package definitions; eliminate ambiguous implicits
Move more definitions to experimental.
Extract BaseModule, DataMirror, ExtModule, IO into their own files.
Add EnumType definition to core package.
Update deprecated messages to refer to correct object
Move FixedPoint into the experimental package (but keep it in Bits.scala).
Add missing implicits to core/package - compatibility
Cleanup: update ScalaDoc references; remove unused imports
Use common 3.2 version in deprecation warning
Move Binding from core to internal.
Optimize imports.
Merge cleanup.
Remove unused import
Bump core deprecation to 3.3
Move DontCare back into Data.scala inside package internal
Re-indent experimental/internal package code
Move code back to original files - facilitate comparison with other branches
Some code motion, update imports, minimize master differences
Move exceptions up to chisel3 package object - they're part of the interface.
More master diff minimization.
Fix minor discrepancies with repackagecore-testbed
* Remove redundant imports
As part of its import updating process, IntelliJ converted some import statements to `import package.{object, _}`. Is this intended to show an explicit dependency on `package.object` and a further dependency on `package` implicits? Unsure. Replace these with `import package._`
* Move the BaseModule object into the internal package.
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
This moves the documentation for loadMemoryFromFile onto the object as
opposed to the apply method. This includes additional cleanup in terms
of fixing uses of "$", topical grammar/capitalization, and adding more
outbound links.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|
|
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
|