aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-10[smt] PropagatePresetAnnotations is now a real prereq (#2325)Kevin Laeufer
2021-08-09PropagatePresetAnnotations: remove dep. on SplitExpressions and PadWidths ↵Kevin Laeufer
(#2324) Both transforms are (most likely) not needed.
2021-08-09PropagatePresetAnnotations: remove false prerequisites (#2323)Kevin Laeufer
The SMT backend actually needs to run PropagatePresetAnnotations (as will treadle at some point). None of the Verilog specific passes were actually required!
2021-08-09Implement NoCommonSubexpressionElimination (#2291)Jiuyang Liu
* implement NoCommonSubexpressionElimination to resolve chipsalliance/chisel3#2006 * Update src/main/scala/firrtl/passes/CommonSubexpressionElimination.scala Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2021-08-05Fix Specification Memory Port Types (#2319)Schuyler Eldridge
Correct incorrect type specified for memories in the FIRRTL specification. This is important because the memory type determines what is a legal bundle to try to connect to a memory port. I based this off of FIRRTL accepting the following circuit: circuit MemOrder: module MemOrder: input r: {addr : UInt<3>, en : UInt<1>, clk : Clock, flip data : UInt<1>} input w: {addr : UInt<3>, en : UInt<1>, clk : Clock, data : UInt<1>, mask : UInt<1>} input rw: {addr : UInt<3>, en : UInt<1>, clk : Clock, flip rdata : UInt<1>, wmode : UInt<1>, wdata : UInt<1>, wmask : UInt<1>} mem memory: data-type => UInt<1> depth => 8 reader => r writer => w readwriter => rw read-latency => 1 write-latency => 1 read-under-write => undefined memory.r <= r memory.w <= w memory.rw <= rw Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2021-08-04Revert "Deprecate DependencyAPIMigration. (#2303)" (#2316)Kevin Laeufer
This reverts commit 2630537cf956eea3768c5bd8e57de839f7d3700a.
2021-08-03Require Andr, Orr, Xorr, Neg to have one operand (#2312)Schuyler Eldridge
Fix an OG bug where Andr, Orr, and Xorr would accept an arbitrary number of operands. Verilog emission doesn't support this and will silently drop all operands after the first. E.g., "andr(a, b)" would emit as "&a". After this commit, "andr(a, b)" will be rejected by checking passes. For archaeological purposes, this appears to have been the behavior dating back to when this was added in d2d3260a. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2021-08-02Skip Formal CI checks via Github Actions not commit message (#2308)Jack Koenig
2021-08-02remove LoweringCompilersSpec (#2310)Kevin Laeufer
This has outlived its usefulness.
2021-08-02add emitter for optimized low firrtl (#2304)Kevin Laeufer
* rearrange passes to enable optimized firrtl emission * Support ConstProp on padded arguments to comparisons with literals * Move shr legalization logic into ConstProp Continue calling ConstProp of shr in Legalize. Co-authored-by: Jack Koenig <koenig@sifive.com> Co-authored-by: Jack Koenig <koenig@sifive.com>
2021-08-02Update spec to disallow 0-bit mux sel (#2305)Schuyler Eldridge
Change the FIRRTL spec to disallow a zero-width multiplexer select. Clarify that the select line can be either one-bit or zero-bit, but will infer to one-bit. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-07-29Dedup attribute annos (#2297)Jared Barocsi
* Add new util "groupByIntoSeq" * Restore annotation order when dedupping annotations * Attribute annotations now deduplicate * Implement doc string anno dedup Co-authored-by: Jack Koenig <koenig@sifive.com>
2021-07-27Deprecate DependencyAPIMigration. (#2303)Jiuyang Liu
* deprecate DependencyAPIMigration.
2021-07-27ir: make HashCode.toHashString public (#2302)Kevin Laeufer
This will allow chiseltest to save the hash code to disk for the purpose of caching simulation binaries.
2021-07-27Merge pull request #2298 from chipsalliance/fix_type_in_dependencymanagerJiuyang Liu
Add typedef in DependencyManager.
2021-07-25Add typedef in DependencyManager.Jiuyang Liu
This is a bug fix, before this PR, Scala compiler will infer `Nothing`, which makes code below failed to compile: ``` class UserCompiler extends TransformManager(Seq(Dependency(UserPass))) { override def optionalPrerequisiteOf: Seq[TransformDependency] = Seq( Dependency[DedupModules] ) } ```
2021-07-14Fix memory annotation deduplication (#2286)Jared Barocsi
* Add transform to deduplicate memory annotations * Add annotation deduplication to Dedup stage * ResolveAnnotationPaths and EliminateTargetPaths now invalidate the dedup annotations transform * Verilog emitter now throws exception when memory annotations fail to dedup Co-authored-by: Jack Koenig <koenig@sifive.com>
2021-07-12Update sbt to 1.5.5 (#2292)Scala Steward
2021-07-11Rm java.io in WriteEmitted (#2275)sinofp
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-07-11Update sbt to 1.5.4 (#2267)Scala Steward
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-07-11Deprecate BlackBoxResourceAnno (#2262)Schuyler Eldridge
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-07-11Merge pull request #2290 from scala-steward/update/sbt-scalafmt-2.4.3Jiuyang Liu
Update sbt-scalafmt to 2.4.3
2021-07-09Update sbt-scalafmt to 2.4.3Scala Steward
2021-07-07Replace hard coded line separators with system specific ones (#2281)Boyang Han
2021-07-06Merge pull request #2285 from ↵Schuyler Eldridge
chipsalliance/dev/seldridge/spec-zero-width-select-mux Relax spec on 0-bit mux select, use SFC behavior
2021-06-30Relax spec on 0-bit mux select, use SFC behaviorSchuyler Eldridge
Change the FIRRTL specification document to allow for 0-bit mux selects. The existing ZeroWidths pass will promote these to a 1-bit, 0-valued select signal (which effectively means that the mux can be optimized away to just the false path). Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2021-06-25Correct a typo in src/main/scala/firrtl/WIR.scala (#2283)Felix Yan
2021-06-22Fix VerilogMemDelays use before declaration (#2278)Jack Koenig
The pass injects pipe registers immediately after the declaration of the memory. This can be problematic if the clock for the associated memory port is defined after the declaration of the memory. For any memory port clocks that are driven by non-ports, we now inject a wire before the pipe register declarations to be sure there are no use-before-declaration issues.
2021-06-21[spec] Explicit widths may be non-negative, not just positive (#2277)Albert Magyar
* Fixes #2206
2021-06-18Fix MultiInfo parser + serialization bug (#2265)Jared Barocsi
* Restore parsed MultiInfo structure in firrtl parser * Change erroneous expected output in InfoSpec test FileInfo compression sorts the outputted entries alphabetically, but this test did not reflect that fact * Fix typo in comment * Add unit tests for file locator parsing * Fix syntax issues and typos * More redundant braces removed Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-06-17smt: include firrtl statement names in SMT and btor2 output (#2270)Kevin Laeufer
* smt: include firrtl statement names in SMT and btor2 output * smt: remove println * smt: make tests run again and fix stale ones Apparently `private` classes aren't found by th sbt test runner.
2021-06-17Add --start-from option (#2273)Schuyler Eldridge
Add a new option to the FIRRTL compiler, "--start-from = <form>". If used, this will cause the compiler to assume that the input FIRRTL circuit is already in the specific form. It will then skip unnecessary passes given this information. E.g., if a user requests to run "firrtl -X verilog --start-from low" then the compiler will only run transforms necessary to get from low FIRRTL to Verilog. Transforms necessary for ingesting FIRRTL IR will be run if needed (checks and type/kind/flow resolution). To implement this, a CurrentFirrtlStateAnnotation is added. Advanced users can use this directly to tell the FIRRTL compiler exactly what transforms have already been run, including the ability to ignore checks or type/kind/flow resolution if they so desire. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2021-06-17Add Protocol Buffer emission (#2271)Schuyler Eldridge
* Add Protocol Buffer emission export This adds infrastructure and annotations that let a user emit a FIRRTL circuit as a Protocol Buffer. Fixes #1696. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> * fixup! Add Protocol Buffer emission export
2021-06-15make PresetRegAnnotation public (#2254)Kevin Laeufer
* make PresetRegAnnotation public this annotation is useful outside the firrtl compiler: - to implement a pass that creates registers which need to be initialized at the beginning of simulation (e.g., for formal verification) - to support preset registers in treadle * add PresetRegAnnotation test and deal with annotation correctly in RemoveReset pass
2021-06-14Add -X mhigh compiler for minimal high form (#2268)Schuyler Eldridge
Add a compiler/emitter that can target minimal high form. This will produce output that only has CHIRRTL constructs removed. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
2021-06-09Merge pull request #2263 from sinofp/nomorejavaio-mustdedupJiuyang Liu
Remove java.io in MustDedup
2021-06-08Prepend target dir to default dedup report dirsinofp
Requested by reviewer.
2021-06-08Rm java.io in MustDedupsinofp
2021-06-08Merge pull request #2256 from sinofp/nomorejavaio-fileutilsJiuyang Liu
Remove java.io in FileUtils
2021-06-06Merge branch 'master' into nomorejavaio-fileutilsJiuyang Liu
2021-06-06Merge pull request #2258 from scala-steward/update/os-lib-0.7.8Jiuyang Liu
Update os-lib to 0.7.8
2021-06-05Merge branch 'master' into update/os-lib-0.7.8mergify[bot]
2021-06-05Add deprecation annotation in FileUtilssinofp
2021-06-04Update sbt-scoverage to 1.8.2 (#2261)Scala Steward
Co-authored-by: Jiuyang Liu <liu@jiuyang.me>
2021-06-04Merge branch 'master' into update/os-lib-0.7.8Jiuyang Liu
2021-06-04Merge pull request #2257 from scala-steward/update/sbt-scalafix-0.9.29Jiuyang Liu
Update sbt-scalafix to 0.9.29
2021-06-04Update os-lib to 0.7.8Scala Steward
2021-06-04Update sbt-scalafix to 0.9.29Scala Steward
2021-06-04Rm java.io in FileUtilssinofp
2021-06-03Replace mem macros renaming (#2243)Albert Chen
* ReplaceMemMacros: add target rename test case * ReplaceMemMacros: rename references to instances * fix renaming for deduped mems * use grouped DummyAnnos to preserve order * Apply suggestions from code review Co-authored-by: Jack Koenig <koenig@sifive.com> * run scalafmt * flatten targets Co-authored-by: Jack Koenig <koenig@sifive.com>