aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-22Merge pull request #945 from seldridge/add-phaseSchuyler Eldridge
- Change firrtl.options API, add Phase
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-21Merge pull request #946 from seldridge/rm-altIRSchuyler Eldridge
- Remove firrtl.altIR package
2018-11-21Remove firrtl.altIR packageSchuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@gmail.com>
2018-11-21 Bump sbt to 1.2.6; update dependencies (#940)Jim Lawson
* Bump sbt to 1.2.6; update dependencies * Remove left-over surgery items. * Add explanation for explicit junit library dependency
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-13Add FIRRTL logo to repo and README (#938)Albert Magyar
2018-11-09Merge pull request #936 from seldridge/TargetDirAnnotation-fixSchuyler Eldridge
- Add deprecated TargetDirAnnotation type to firrtl package
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-07Merge pull request #919 from seldridge/f764.6Schuyler Eldridge
- Add, but do not use Options-mirroring Annotations
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-07Merge pull request #879 from ↵Schuyler Eldridge
seldridge/issue-764-refactor-pr-pointer-optionsPackage - Adds firrtl.options package and tests - Does not use firrtl.options in any way
2018-11-07Add firrtl.options testsSchuyler 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-05Merge pull request #932 from seldridge/f269Schuyler Eldridge
- Add Target.prettyPrint method - Improve UninferredWidth exception message
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-05Update commandline `sbt publishLocal` (#931)Haifeng Gu
With the newest version of SBT, the commandline `sbt publish-local` should be changed to `sbt publishLocal`.
2018-11-02Fix renaming in UniquifyPorts (#930)Albert Chen
2018-11-01Merge pull request #928 from freechipsproject/dont-append-to-listsSchuyler Eldridge
Adds performance improvements by removing list appends.
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
2018-10-31Speed up ExpandConnects by replacing foldLeft + List appends with flatMapJack Koenig
2018-10-31Don't include verilog header files in "FileList" for VCS/Verilator. (#918)Jim Lawson
When constructing the black box helper file list (firrtl_black_box_resource_files.f), filter out Verilog header files (*.vh) - Fixes #917
2018-10-30Instance Annotations (#926)Adam Izraelevitz
Formerly #865 Major Code Changes/Features Added: Added Target trait as replacement for Named Added TargetToken as token in building Target Added GenericTarget as a catch-all Target Added CircuitTarget, ModuleTarget, ReferenceTarget, and InstanceTarget Added ResolvePaths annotation Added EliminateTargetPaths (and helper class DuplicationHelper) Updated Dedup to work with instance annotations Updated RenameMap to work with instance annotations DCE & ConstantProp extend ResolveAnnotationPaths
2018-10-30Fix $TRAVIS_COMMIT_RANGE (#927)Schuyler Eldridge
- Travis unshallow if shallow clone breaks ancestry
2018-10-28Fix TRAVIS_COMMIT_RANGE in .run_chisel_tests, replace ... with .. (#924)Jack Koenig
This makes "skip chisel tests" work properly
2018-10-27Revert "Instance Annotations (#865)" (#925)Adam Izraelevitz
This reverts commit 7e2f787e125227dc389d5cf1d09717748ecfed2e.
2018-10-24Instance Annotations (#865)Adam Izraelevitz
Added Target, which now supports Instance Annotations. See #865 for details.
2018-10-24Merge pull request #921 from seldridge/f893Schuyler Eldridge
Better error message on missing BlackBox resource
2018-10-24Better error message on missing BlackBox resourceSchuyler Eldridge
This wraps interactions with a BlackBox resource file such that a FileNotFoundException are wrapped in a BlackBoxNotFoundException and rethrown. This provides a better, verbose error message to the user and avoids a FileNotFoundException showing up as an internal FIRRTL error. This adds tests that the expected exception is thrown for both BlackBoxResourceAnno and BlackBoxResourceAnno. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-10-16Added reference to ICCAD paper (#915)Adam Izraelevitz
2018-10-12Merge pull request #909 from seldridge/issue-729.2Schuyler Eldridge
Verilog renaming uses "_", works on whole AST
2018-10-12Refactor VerilogRename -> RemoveKeywordCollisionsSchuyler Eldridge
This moves VerilogRename out of Passes.scala and genericizes it as the new Transform KemoveKeywordCollisions. This new Transform will remove keywords for arbitrary sets of reserved keyword. This adds VerilogRename back as a class instead of an object. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-10-12Verilog renaming uses "_", works on whole ASTSchuyler Eldridge
Summary of changes to firrtl.passes.VerilogRename: - Use "_" to mangle names that conflict with Verilog keywords (previously "$") - Rewrite to operate on the whole AST to propogate mangled ports and module names - Make VerilogRename a Transform (was previously a Pass) - Renames are now propagated - Adds documentation for new VerilogRename This makes the VerilogRename Transform (previously a Pass) use an underscore ('_') instead of a dollar sign ('$') to mangle names that conflict with Verilog keywords. This prevents problems with potentially buggy tools that are not expecting '$' in Verilog names. This reimplements VerilogRename to be safe for name collisions that may occur anywhere in the AST, e.g., in ports, module names, circuit names, or in any statements/expressions. Previously, names were only mangled in statements and in place. This resulted in problems where renames of ports in a child's namespace would not be guaranteed to be mangled the same way in a parent's namespace. The algorithm is reimplemented to walk all modules in reverse topological order (from leafs to main) and relying on a RenameMap to track name changes. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
2018-10-05Merge pull request #901 from seldridge/issue-729.1Schuyler Eldridge
Use "_" for Inline Name Mangling, Respect Namespaces
2018-10-03Inlining uses "_", respects namespacesSchuyler Eldridge
Summary of changes: - Use "_" as an inlining delimiter instead of "$" - Makes inlining avoid namespace conflicts This changes the delimiter used for inlining to "_" instead of "$". This avoids problems with buggy parsers that may not handle "$" correctly. As ClockListTransform relies on the explicit use of "$", the delimiter is a FIRRTL-private val that the ClockListTransform overrides (to the original "$"). Namespace conflicts could occur previously, but are very rare as users will almost never use "$" in a name (even though it's allowed by both the FIRRTL and Verilog specifications). Moving to "_" increases the probability of namespace conflicts occurring. This adds explicit checking that inlined names will not introduce namespace conflicts and that generated names are prefix unique (as defined in the spec). Note: inlined modules may not have unique prefixes. A test is included that this is the case and an ignored test shows what prefix uniqueness would look like. MISC: - [skip chisel tests]: Changing the delimiter causes the Chisel InlineSpec to fail as this explicitly checks for "$". Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>