diff options
| author | Jack | 2022-03-15 19:37:37 +0000 |
|---|---|---|
| committer | Jack | 2022-03-15 19:37:37 +0000 |
| commit | 2f21943ff772da2171df866d4cee71dfa8127bf8 (patch) | |
| tree | d00c9059c9361920036e784425641288782515d5 /src/test/scala/chiselTests/Module.scala | |
| parent | 1876e740a48be2e5ff5bd4fd6c2018927f1dcec2 (diff) | |
| parent | f26df23bbe0ae9b7162ed70369f24b01d75a1493 (diff) | |
Merge branch '3.5.x' into 3.5-release
Diffstat (limited to 'src/test/scala/chiselTests/Module.scala')
| -rw-r--r-- | src/test/scala/chiselTests/Module.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/Module.scala b/src/test/scala/chiselTests/Module.scala index 13dbe1e9..b0fece3b 100644 --- a/src/test/scala/chiselTests/Module.scala +++ b/src/test/scala/chiselTests/Module.scala @@ -18,6 +18,8 @@ class SimpleIO extends Bundle { class PlusOne extends Module { val io = IO(new SimpleIO) + val myReg = RegInit(0.U(8.W)) + dontTouch(myReg) io.out := io.in + 1.asUInt } @@ -267,6 +269,13 @@ class ModuleSpec extends ChiselPropSpec with Utils { property("getVerilogString(new PlusOne() should produce a valid Verilog string") { val s = getVerilogString(new PlusOne()) assert(s.contains("assign io_out = io_in + 32'h1")) + assert(s.contains("RANDOMIZE_REG_INIT")) + } + + property("getVerilogString(new PlusOne() should produce a valid Verilog string with arguments") { + val s = getVerilogString(new PlusOne(), Array("--emission-options=disableRegisterRandomization")) + assert(s.contains("assign io_out = io_in + 32'h1")) + assert(!s.contains("RANDOMIZE_REG_INIT")) } property("emitVerilog((new PlusOne()..) shall produce a valid Verilog file in a subfolder") { |
