aboutsummaryrefslogtreecommitdiff
path: root/src/main
AgeCommit message (Collapse)Author
2019-04-22Change Memory Depth to a BigInt (#1075)Jack Koenig
2019-04-17Remove unnecessary 'FIRRTLParser' prefix (#1072)Leway Colin
If 'import FIRRTLParser._' globally, 'FIRRTLParser.' is unnecessary.
2019-04-10Remove redundant code (#1069)Leway Colin
Use getWidth function if it is suitable.
2019-03-29Faster reg constprop (#1067)Albert Magyar
* Improve memoization for register const prop
2019-03-28Merge branch 'master' into dce-printf-stopJack Koenig
2019-03-26Convert the RemoveAccesses object into a class. (#1058)Jim Lawson
* Convert the RemoveAccesses object into a class. Prevent simultaneous access to common resources when tests are run in parallel. * Respond to comments - use object factory to preserve existing API.
2019-03-26DCE printf and stop statements with constant-0 enablesAndrew Waterman
This gets rid of about 10% of the generated Verilog in the rocket-chip default config.
2019-03-19Designs with no SeqMems should produce empty MemConf strings, and this ↵John Wright
should be parsable without excepting (#1060)
2019-03-18Add serialization support for LoadMemoryFileType in LoadMemoryAnnotation (#1056)Jim Lawson
* Add serialization support for LoadMemoryFileType in LoadMemoryAnnotation Add custom LoadMemoryFileTypeSerializer. Add test to verify LoadMemoryAnnotation can be correctly serialized/deserialized. * Simplify and focus LoadMemoryAnnotation serialization/deserialization. Respond to comments on earlier implementations. * Add type FileType definition for current chisel3 code.
2019-03-07Add a data structure for memory conf reading and writing (#1041)John Wright
* Copy MemConf.scala from ucb-bar/barstools#35 into memlib. This provides a data structure wrapper around the existing memory conf format which contains both reading and writing methods, making it easier to write code that needs to read the format. * Add MemConf tests and use a Map[MemPort, Int] for port lists instead of a Seq[MemPort] which is a bit less fragile.
2019-02-28[ExpandWhens] Don't create nodes to hold Muxes with >0 void cases (#1039)Albert Magyar
* Don't create nodes to hold Muxes with >0 void cases * Added test case demonstrating void error * Memoize intermediate expression when checking for WVoid-ness
2019-02-27Add --nodedup option to facilitate FIRRTL to verilog regression testing. (#1035)Jim Lawson
* Add --nodedup option to facilitate FIRRTL to verilog regression testing. * Short-circuit the DedupModules transform if NoCircuitDedupAnnotation exists.
2019-02-27Create a simple generic GraphViz renderer for DiGraph (#1034)Chick Markley
* Create a simple generic graphviz renderer for DiGraph There are three basic kinds - A simple default renderer - A ranked renderer that places nodes in columns based on depth from sources - A sub-graph render for graphs that contain a loop - Renders just nodes that are part of first loop found - Plus the neighbors of the loop - Loop edges are shown in red. * Create a simple generic graphviz renderer for DiGraph - Moved the graph loop finder into DiGraph - Fixed scala doc per Edward's comments
2019-02-25Run CheckHighForm after all non-emitter transforms in firrtl tests (#548)Jack Koenig
* Run CheckHighForm after all non-emitter transforms in firrtl tests * Remove shlw from checks.scala * Removed mistake in fix * Fix FirrtlSpec fix
2019-02-25Detect and error on registers with flip in type (#1031)Albert Magyar
2019-02-25Fix almost all Scaladoc warningsSchuyler Eldridge
This fixes all Scaladoc warnings except for those trying to link to Java. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2019-02-22Add Width Constraints with Annotations (#956)Albert Chen
* refactor InferWidths to allow for extra contraints, add InferWidthsWithAnnos * add test cases * add ResolvedAnnotationPaths trait to InferWidthsWithAnnos * remove println * cleanup tests * remove extraneous constraints * use foreachStmt instead of mapStmt * remove support for aggregates * fold InferWidthsWithAnnos into InferWidths * throw exception if ref not found, check for annos before AST walk
2019-02-22Stop reporting exceptions in custom transformations as internal errors (#867)Jack Koenig
Instead, just forward the exception
2019-02-21Don't let the main module become deduped out of existence. (#1023)Jim Lawson
2019-02-21Prevent Flatten from stripping all annotations (#1024)Schuyler Eldridge
2019-02-21Correctly handle dots in loaded memory paths (#984)Nick Hynes
* Correctly handle dots in loaded memory paths * Added test for loadmem filename
2019-02-14Asynchronous Reset (#1011)Jack Koenig
Fixes #219 * Adds AsyncResetType (similar to ClockType) * Registers with reset signal of type AsyncResetType are async reset registers * Registers with async reset can only be reset to literal values * Add initialization logic for async reset registers
2019-02-11Fix typo for -c: compiler -> circuit (#1014)John Wright
2019-02-05Do Shr constant propagation in LegalizeSchuyler Eldridge
This uses the foldShiftRight method of the ConstantPropagation Transform when legalizing Shr PrimOps. This has the effect of removing literals with bit extracts from the MinimumVerilogCompiler. This makes the formerly private foldShiftRight method of a public method of the ConstantPropagation companion object. Tests in the MimimumVerilogCompilerSpec are updated to check that Shr is handled as intended. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2019-02-05Add RemoveValidIf to -X mverilogSchuyler Eldridge
This adds the RemoveValidIf Pass to the MinimumLowFirrtlOptimization Transform. A test case is included to verify that `is invalid` is properly converted to a connection to zero. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2019-02-05Add "mverilog" Compiler Option, Compiler FixesSchuyler Eldridge
This adds "mverilog" to the "--compiler" command line option. This will run the MinimumVerilogCompiler. This additionally fixes the MinimumVerilogCompiler such that DeadCodeElimination will not be run (it's not supposed to be). This is done by adding a MinimumVerilogEmitter, subclassing VerilogVerilog, that strips the DeadCodeElimination step from its parent. Additionally, BlackBoxSourceHelper is removed from the MinimumVerilogCompiler since this will be run by the VerilogEmitter already. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2019-02-05Missed constprop opportunity (#1009)Andrew Waterman
* Enhance constant propagation across registers * Add more elaborate test case for register const prop
2019-02-04Correct Kind info from #1010 (#1012)Albert Magyar
2019-02-01Mem helpers (#1010)Albert Magyar
* Add memory WRef factory for completeness * Refactor DefAnnotatedMemory construction for clarity
2019-01-31Use apache commons for string escaping instead of reflection (#1008)Jack Koenig
2019-01-28typo fix (#1001)Sequencer
make more clear for ExecutionOptionsManager log level settings.
2019-01-23Improve Shl codegen; eliminate Shlw WIR node (#994)Andrew Waterman
* Improve Shl codegen; eliminate Shlw WIR node If we emit shl(x, k) as {x, k'h0} instead of (x << k), then there's no need for Verilog-specific padding in the PadWidths pass. Avoiding the redundant padding improves compiler/simulator performance and renders Shlw unnecessary. * [skip formal checks] Add test
2019-01-21Merge branch 'master' into top-wiring-aggregatesDavid Biancolin
2019-01-13Suppress unchecked warning in Constant PropagationJack Koenig
2019-01-13Constant Propagate dshl and dshr with constant amountsJack Koenig
Fixes #990 h/t @pentin-as and @abejgonzalez
2019-01-13Keep constant propagating expressions until done optimizingJack Koenig
2019-01-08Avoid enforcing time constrains during coverage tests. (#989)Jim Lawson
This fixes issue #988 I tried one alternative to this fix: record the time to do a *no rename* run (`depth = 0`) and check that the time to do the *deep rename* (`depth = 500`) was a reasonable multiple of the *no rename* test. Unfortunately, the discrepancies were all over the map, sometime as much three orders of magnitude difference. I decided the current fix was the simplest - don't enforce timing checks if we're doing coverage testing, although determining the latter is brittle.
2019-01-04Fix GroupComponents to work with unused componentsJack Koenig
Previously, components that did not affect the output would cause exceptions because they were missing from the label2group Map. This commit treats them as "reachable" by the ports so they are included in the default "ungrouped" group.
2019-01-02Make GroupComponents run ResolveKindsJack Koenig
This fixes an issue where expressions created by GroupComponents would be improperly lowered because they were not marked as references to instance ports.
2018-12-25Performance fix of Uniquify for deep bundles (#980)Adam Izraelevitz
2018-12-21Small convenience tweaks to IR/WIR APIs (#961)Albert Magyar
* Seal Direction trait * Add WRef factories for ports and instances
2018-12-21Enhance CheckCombLoops to support annotated ExtModule paths (#962)Albert Magyar
2018-12-20Require transforms.size >= 1 for CompilersSchuyler Eldridge
This adds a requirement that all Compilers must have at least one Transform. Without this, there is no way to determine the inputForm or outputForm of a given compiler as these are (rightly) defined in terms of the head/last transform. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-12-20Use IdentityTransform to construct NoneCompilerSchuyler Eldridge
This changes the NoneCompiler to be a unary sequence consisting of an IdentityTransform. This fixes the inputForm and outputForm inherited methods that implicitly mandate a non-empty transform sequence. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-12-19Add IdentityTransformSchuyler Eldridge
This adds an identity transform that applies an identity function to some CircuitState, i.e., it just returns the original CircuitState. This is useful for transform generators that may, for edge cases, generate an empty transform sequence. Other classes (e.g., Compiler) have explicit or implicit requirements that a transform sequence is non-empty. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-12-18Give better error when mport references non-existant memory. (#975)Paul Rigge
* Give better error when mport references non-existent memory * Closes #796
2018-12-13[Top Wiring] Expand top wiring to work on aggregatesDavid Biancolin
2018-12-12Remove side effect from DiGraph summationSchuyler Eldridge
This fixes a bug where DiGraph summation (using the `+` operator) would mutate the DiGraph. This occurred because the underlying edges set was not being cloned. This is fixed to explicitly clone the underlying edges set. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-12-06Fix bug in dedup where lots of annotations could prevent dedup (#958)Jack Koenig
Iterating on a HashSet could cause identical modules (including annotations) to not dedup
2018-11-29Replace Mappers with Foreachers in several passes (#954)Albert Magyar