diff options
| author | Jack Koenig | 2018-06-28 16:57:03 -0700 |
|---|---|---|
| committer | GitHub | 2018-06-28 16:57:03 -0700 |
| commit | 3243f05a69b4b77761699be412f349a9b8b9193f (patch) | |
| tree | af29ca891c968e718aa1a83c0fd233142395255c /src/test/scala/firrtlTests/FirrtlSpec.scala | |
| parent | 991dba31b751f26d05835094ea49eea83f81247e (diff) | |
Protobuf (#832)
Add support for ProtoBuf serialization and deserialization
* Add support for additional features in .proto description
Features added: Info, Fixed[Type|Literal], AnalogType, Attach, Params
* Add support for .pb input files
This involves an API change where FIRRTL no longer implicitly adds .fir
to input file names
Diffstat (limited to 'src/test/scala/firrtlTests/FirrtlSpec.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/FirrtlSpec.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/FirrtlSpec.scala b/src/test/scala/firrtlTests/FirrtlSpec.scala index 861d1745..01ae0431 100644 --- a/src/test/scala/firrtlTests/FirrtlSpec.scala +++ b/src/test/scala/firrtlTests/FirrtlSpec.scala @@ -101,6 +101,12 @@ trait FirrtlMatchers extends Matchers { require(!s.contains("\n")) s.replaceAll("\\s+", " ").trim } + /** Helper to make circuits that are the same appear the same */ + def canonicalize(circuit: Circuit): Circuit = { + import firrtl.Mappers._ + def onModule(mod: DefModule) = mod.map(firrtl.Utils.squashEmpty) + circuit.map(onModule) + } def parse(str: String) = Parser.parse(str.split("\n").toIterator, UseInfo) /** Helper for executing tests * compiler will be run on input then emitted result will each be split into |
