aboutsummaryrefslogtreecommitdiff
path: root/src/main
AgeCommit message (Collapse)Author
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
2018-11-27Add foreach as alternative to map (#952)Adam Izraelevitz
* Added Foreachers * Changed CheckTypes to use foreach * Check widths now uses foreach * Finished merge, added foreachers to added stmts * Address reviewer feedback
2018-11-27Add "none" compiler (#953)Jack Koenig
Where the high form compiler removes Chirrtl (and runs some checks), this compiler does nothing but read in the circuit and then emit it
2018-11-26Make return types of util functions more specific (#949)Albert Magyar
2018-11-21Change firrtl.options API, add PhaseSchuyler Eldridge
This breaks firrtl.options.Stage into a small type hierarchy: * Phase: something that transforms an AnnotationSeq * Stage extends Phase: a Phase with a Command Line Interface Some of the old "common options" (input annotation file and target directory) are moved into firrtl.options and provided as part of the Stage class. Stage will automatically preprocess an input annotation sequence to resolve all input annotation files and add a default target directory. Minor changes: * Adds ViewException * Stops mixing in the DoNotTerminateOnExit trait into the default Shell parser * Add StageOptionsView Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-21Remove firrtl.altIR packageSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@gmail.com>
2018-11-16Memoize type of instance refs in RemoveKeywordCollisions (#942)Jack Koenig
Huge performance improvement when you have lots of ports for a given module. Also split up some long implicit argument lines.
2018-11-15Combine cats (#851)Albert Chen
- Add firrtl.transforms.CombineCats - Use CombineCats in LowFirrtlOptimization - Modify Verilog emitter to allow for nested Cat DoPrims - Modify firrtlEquivalenceTest to write input FIRRTL string to test directory
2018-11-09Fix bug in TargetDirAnnotation compatibilitySchuyler Eldridge
TargetDirAnnotation was moved from firrtl to firrtl.stage. However, this is only aliased as a val in the firrtl package object. This also needs to be type aliased for matching against a type. This fixes a bug I ran across in the visualizer. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Make ClockListAnnotation a RegisteredTransformSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Make InlineInstances a RegisteredTransformSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Make CheckCombLoops a RegisteredTransformSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Make DeadCodeElimination a RegisteredTransformSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Add MemLibOptions RegisteredLibrarySchuyler Eldridge
This shows an example of using a RegisteredLibrary, with the appropriate META-INF ServiceLoader entry, that adds options from the InferReadWrite and ReplSeqMem transforms. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Make ReplSeqMem mixin HasScoptOptionsSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Make InferReadWrite mixin HasScoptOptionsSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Add FirrtlOptionsSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-07Add firrtl.optionsSchuyler Eldridge
This adds a new package, "firrtl.options", that provides a framework for working with options inside and outside FIRRTL. Small changes: - Make TerminateOnExit return the correct exit code - Deprecate mutable TerminateOnExit - Add immutable DoNotTermianteOnExit Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-05Better error message for UninferredWidth exceptionSchuyler Eldridge
This changes the CheckTypes.UniferredWidth exception to include the pretty printed Target that was uninferred and suggests to the user that they may have forgotten to assign to it. This changes the CheckTypes pass to communicate the necessary Target information during AST traversal such that when an uninferred width is found, the Target is known and available. This also adds one test checking the message of the UniferredWidth exception. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-05Add prettyPrint method to TargetSchuyler Eldridge
This adds a pretty printer for firrtl.annotation.Target and associated tests. This uses a tree-like output where the following target ~Circuit|Module/foo:Foo>ref.field[0] will serialize to: circuit Circuit: └── module Module: └── foo of Foo: └── ref.field[0] This enables better error messages and a human readable syntax better than the existing serialize method (and avoiding the need for users to understand the Target serialization syntax), but that is not intended to be deserialized nor space efficient. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-11-02Fix renaming in UniquifyPorts (#930)Albert Chen
2018-10-31Remove all uses of get_flip and deprecateJack Koenig
It is O(n) and every use is in an O(n) iteration resulting in O(n^2). Same information can be extracted from create_exps which happens to also be called at every use of get_flip.
2018-10-31Use Vector instead of List for bulk renaming in RenameMapJack Koenig
2018-10-31Speed up LowerTypes by replacing foldLeft + List appends with flatMapJack Koenig
2018-10-31Speed up ExpandWhens by replacing foldLeft + List appends with flatMapJack Koenig
2018-10-31Speed up create_exps by replacing foldLeft + List appends with flatMapJack Koenig