rocket-chip icon indicating copy to clipboard operation
rocket-chip copied to clipboard

[TestDriver.v] Set initial `clock = 1'b1;`

Open Waxpple opened this issue 3 years ago • 3 comments

Related issue: Potential timing violation in the initial condition.

Type of change: other enhancement

Impact: no functional change

Development Phase: implementation

Release Notes

Set clock = 1'b1; to avoid the first reset signal only using half of the clock cycle. If want to avoid the first reset cycle using only half clock period causing timing violation, modify TestDriver.v like this: image

The waveform will be: image

The original testbench will look like this: image The waveform will be image

Waxpple avatar Jun 23 '22 03:06 Waxpple

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: Waxpple / name: Waxpple (cde5a3bbe84adba7d28143ca4b990435603758ac)

What timing violation are you seeing? Are you assuming sync or async reset?

jerryz123 avatar Jul 13 '22 16:07 jerryz123

What timing violation are you seeing? Are you assuming sync or async reset?

Sorry for the late reply.

Setup time violation like this: image I assume the reset signal is synchronized. However, It will reset for a couple of cycles, so the actual timing violation is not critical. But if the initial condition is set as above, it is not easy to trigger the timing check and makes it easier to debug the timing violation if there is any.

Waxpple avatar Jul 26 '22 09:07 Waxpple