summaryrefslogtreecommitdiff
path: root/chiselFrontend
AgeCommit message (Collapse)Author
2018-07-04brokenducky
2018-07-04styleducky
2018-07-04Run-unique idsducky
2018-07-04bundle literal mockup, but broken =(Richard Lin
2018-07-04refactoring of lit and ref implementationsRichard Lin
2018-07-04work on new style literal accessorsducky
2018-07-04Infrastructure for bundle literalsducky
2018-07-02Direct to FIRRTL (#829)Jack Koenig
Provide direct conversion from ChiselIR to FIRRTL. Provide Driver support for dumping ProtoBuf.
2018-06-29Catch returns from within when blocks and provide an error message (#842)Jack Koenig
Resolves #841
2018-06-20Programmatic Port Creation (#833)Jack Koenig
Add chisel3.experimental.IO for programmatic port creation in Raw and MultiIOModules. suggestName is required to name ports that cannot be named by reflection. Two ports cannot be given the same name.
2018-06-01Literals set their ref so they no longer get named (#826)Jack Koenig
Fixes #763 Add tests for #763 and #472 This has a few implications * Constructing a literal no longer increments _T_ suffixes * Internally, wrapping a literal Bits in Node(...) will work * Literal Bools work in withReset/withClockAndReset
2018-05-31Suggest wrapping in Wire(_) or IO(_) in requireIsHardware (#827)Jack Koenig
2018-05-24Use Vec.apply instead of new Vec in VecInit.apply (#825)Jack Koenig
The Vec constructor invokes the gen argument for each element in the Vec. Since VecInit invokes cloneSupertype which touches every element of the input Seq, this was an n^2 operation. Vec.apply accepts its arguments by value so cloneSupertype is only called once. It then calls cloneType on that once for each element in the Vec, which is constant time reducing the overall complexity of VecInit to just n.
2018-05-24Remove extraneous traversal in cloneSupertype (#824)Jack Koenig
2018-05-24Fix UIntToOH for output widths larger than 2^(input width) (#823)Andrew Waterman
* Add test for UIntToOH * Pad UIntToOH inputs to support oversized output widthds * Optimize Bits.pad in case of known widths * Add missing import and fix test in OneHotMuxSpec
2018-04-26Minor edits to wordingedwardcwang
2018-04-24Make Mem and SyncReadMem constructors private (#816)Andrew Waterman
They should only be instantiated through their companion objects. Resolves #815
2018-04-22Add Module.currentModule for getting a reference to the current Module (#810)Jack Koenig
Resolves #809
2018-03-23Fallback null insertion for autoclonetype (#801)Richard Lin
If autoclonetype is unable to determine an outer class, this attempts to insert a null (and give a deprecation warning), preserving old behavior (in some cases) where the new behavior doesn't work. This doesn't provide full compatibility with old autoclonetype: this does not attempt null insertion in the general first argument (if it's not an outer class reference). Reasoning is that inserting a null for an explicit argument is probably not the right thing to do, and will likely cause a difficult-to-debug NullPointerException (whereas that would be unlikely for an outer class, which is not always referenced in Bundle subclass code).
2018-03-06Fix SyncReadMem.read; add test (#796)Andrew Waterman
SyncReadMem.read with an enable signal currently only works in compatibility mode, where Wires are implicitly initialized to DontCare. Fix by explicitly assigning DontCare to the Wire. This might fix #775.
2018-03-02Fix for 792 (#793)Richard Lin
Makes Builder.updateBundleStack a bit stricter in deciding how many stack frames to discard by additionally matching against method names and deleting stack frames at or above the frame currently being inserted.
2018-02-28Refactor Annotations (#767)Jack Koenig
* Generalize ChiselAnnotation This allows us to delay creation of Annotations till elaboration is complete. Also update all annotation-related code. * Add RunFirrtlTransform Use a Chisel-specific RunFirrtlTransform API to preserve behavior of old ChiselAnnotation (now called ChiselLegacyAnnotation) * Use unique test directories in ChiselRunners.compile
2018-02-28Auto Clone Bundles in Companion Objects (#788)Richard Lin
2018-02-20Make Bundle abstract (#774)Jack Koenig
2018-02-08Make uncloneable IO deprecated instead of error, improve error handling (#771)Richard Lin
It appears #754 breaks more code than I thought, so this makes it a soft error (with a runtime deprecation warning - to get people to fix their stuff before we break it for real) for now. This additionally changes the autoclonetype errors to be more deterministic (reporting class names instead of object names) in the most common cases, to allow the deprecations manager to deduplicate warnings.
2018-02-07Cloning IO with compatibility 🦆 (#754)Richard Lin
Changes the API such that IO(...) clones. All Bundles will need to be clone-able, but auto clone type is expected to handle most cases.
2018-02-07Better support for autoclonetype of nested Bundles (#769)Richard Lin
* Better support for autoclonetype of nested Bundles * Move bundleStack to dynamicContext * prefer $outer if available, make guesses distinct * Catch IllegalAccessException in autoclonetype In strange circumstances this type of exception can occur when accessing $outer
2018-02-02Autoclonetype will clone args that are of type data (#768)Richard Lin
2018-01-23Runtime API deprecation warnings (#761)Richard Lin
Add runtime warnings for use of deprecated Chisel methods. This is done using a macro that takes the message from a `@deprecated` annotation, and adds a call to `Builder.deprecated`. Reasoning is that by default, Scala doesn't print all deprecations, and that it's somewhat tricky to notice them - yet some support questions revolve around the use of deprecated and terribad API. This now prints warnings for uses of deprecated functions at runtime, and aggregates them by error and line to avoid spam. Also included is convenient information on enabling scalac deprecations. This also changes how line numbers for Chisel's error facility is determined, using prefix string comparison of the stack trace element classnames, instead of checking if the class is a subtype of UserModule. The previous one (specifically, calls to Class.forName) seems to interact badly with reflection-based cloneType when called at scale. This should also give more accurate reporting of errors that are in user code but outside of a UserModule. It turns out that `@deprecated` on macro functions don't do anything, so this changes the tags to the functions that the macros point to, which seems to work properly. It also turns out that there's a bunch of uses of deprecated functions in chiselTests which needs to be fixed. Not all `@deprecated` functions are also annotated with `@chiselRuntimeDeprecation`, because they're still used in Chisel internals, and we can't track whether they're called by the user or by Chisel and it will give a misleading error. These are a small amount of functions.
2018-01-02Add support for autoclonetype of bound, anonymous inner BundlesJack Koenig
Also change Data.outerModule to Bundle._outerInst since it is only used in autoclonetype. _outerInst is also Option[Object] instead of Option[BaseModule] because the outer object could also be a Bundle.
2018-01-02address review style commentsRichard Lin
2018-01-02Support for inner classes, implicit parameter lists, supertypessducky64
2018-01-02Add auto clone implementation for inner Bundles (#722)Albert Magyar
2018-01-02Autoclonetype initial prototypeducky
2017-12-22Fixes format strings in assertions. Fixes #540 (#542)Jack Koenig
2017-12-20Add compileOptions to Module.apply, use for invalidating submod ports (#747)Jack Koenig
Fixes #746 Also add test for https://github.com/freechipsproject/firrtl/issues/705
2017-12-19Add WireInit.apply that accepts DontCare (#731)Jack Koenig
Prevents DontCare from affecting type inference Fixes #728
2017-12-19Add source info / compile options transforms to Mem accessors (#744)Richard Lin
Fixes #708
2017-12-14Add error message for <> of Vec and Seq of different lengths (#739)Jack Koenig
Fixes #482
2017-12-13Fix some ScalaDoc warningsJack Koenig
2017-12-13Expand Printable documentationJack Koenig
2017-12-13Expand printf documentationJack Koenig
2017-12-08Reject negative shift amounts; add tests (#730)Andrew Waterman
Closes #729
2017-11-06Default to unidoc for scaladoc generation. (#715)Jim Lawson
Disambiguate DontCare reference in initializeSingletons() avoiding compilation error during unidoc generation.
2017-10-26Invalidateapi (#645)Adam Izraelevitz
* Require explicit connection to DontCare to generate "is invalid". * Add tests for RefNotInitializedException. Currently, we fail the when ... otherwise ... * Disable ScalaTest shrinking on error in ComplexAssignSpec. * fix broken merge; still some binding issues * cleanup DontCare connection checks; add missing directions to test module IOs * Have library code inherit compileOptions from the enclosing Module (if it exists). * work around current firrtl uninitialized references with Strict compile options and explicitInvalidate * more CompileOptions cleanup; move test-specific defines to package object * minimize differences with master * set default CompileOptions.explicitInvalidate to false until we fix the FIRRTL when issue * ignore the StrictCompiler property checks (until CompileOptions.explicitInvalidate is defaulted to true) * Revert "more CompileOptions cleanup; move test-specific defines to package object" This reverts commit e4486edcba990d150e76e08a2fc6abca033556e0. * Revert "work around current firrtl uninitialized references with Strict compile options and explicitInvalidate" This reverts commit 426faa430a62c3dac2dbdf33044d3386d4243157. * remove unused code * Convert to binding-based DontCare implementation * comment cleanup to minimize differences with master * Tentatively remove possibly redundant DefInvalid on module ports. * Respond to code review change request. - backout build.sbt change - correct indentation - handle bulk of DontCare semantics in elemConnect() - have DontCare extend Element, not Data (eliminate most Object specific methods - add comments indicating reason for explicit DontCare connections * Initialize test elements without requiring a DontCare. * Respond to review change requests. - DontCare should work on left or right side in BiDirectional connections - call bind() to set DontCare binding instead of messing with internal variables - DontCares are only equivalent with DontCares - clean up processWhens() definition * Eliminate DontCare connection to inputs in MonoConnect(). * Pull aggregates apart for the purpose of DontCare connections. * Restore the explicit (conditionally executed) ports DefInvalidin ImplicitModule() * Don't add DontCare's to the module list of _ids. * Add missing DefInvalid() to LegacyModule(). * Respond to review requests: add DontCare BiConnect Vec, remove null parent hack to avoid addId(), initialize singletons early in Builder * Move DontCare out of chisel3.experimental.
2017-10-05the cloneType and chiselCloneType hot mess 🔥 (#653)Richard Lin
Addresses #419 cloneType is now marked (through comments only) as an internal API. chiselCloneType deprecated (and changed to cloneTypeFull internally, analogous to cloneTypeWidth). chiselTypeOf(data) introduced as the external API to get a chisel type from a hardware object Intended usage: cloning is an implementation detail, and chisel types and hardware objects both should act as immutable types, with operations like Input(...), Reg(...), etc returning a copy and leaving the original unchanged. Hence, the clone operations are all deprecated. Deletes what appears to be an unused Bundle companion object. Input(...), Output(...), Flipped(...) require the object to be unbound
2017-09-26Disallow assignment to op results (#698)Richard Lin
2017-08-17Use firrtl elses in elsewhen/otherwise case emission (#510)Albert Magyar
Preprocess chisel3 IR before emission to determing whether whens have alternatives.
2017-08-17More of the bindings refactor (#635)Richard Lin
Rest of the binding refactor
2017-08-17Make Reset a trait (#672)Jack Koenig
Bool implements Reset. Compatibility package includes an implicit conversion from Reset to Bool.