Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
vcs: fix assertions at time 0 (#548)
Browse files Browse the repository at this point in the history
It seems that clock=1 at time zero qualifies as a posedge for vcs.
This caused assertions to fire as registers have not yet been reset.
  • Loading branch information
terpstra authored Aug 15, 2022
1 parent b97e2a5 commit 541ae8c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private[chiseltest] object VpiVerilogHarnessGenerator {

val codeBuffer = new StringBuilder
codeBuffer.append(s"module $testbenchName;\n")
codeBuffer.append(s" reg $clockName = 1;\n")
codeBuffer.append(s" reg $clockName = 0;\n")
toplevel.inputs.foreach { case PinInfo(name, width, _) =>
codeBuffer.append(s" reg[${width - 1}:0] $name = 0;\n")
}
Expand Down

0 comments on commit 541ae8c

Please sign in to comment.