Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Waxpple
Copy link

@Waxpple Waxpple commented Jun 23, 2022

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

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](https://user-images.githubusercontent.com/20642651/175191673-3447a393-b064-4dc5-8584-9fd30480d166.png)

The waveform will be:
![image](https://user-images.githubusercontent.com/20642651/175193123-431b326b-e706-4f40-ab6b-71150b49065a.png)

The original testbench will look like this:
![image](https://user-images.githubusercontent.com/20642651/175190617-b13a16eb-2187-4cf1-8bc5-c6d5c9d23c8b.png)
The waveform will be
![image](https://user-images.githubusercontent.com/20642651/175191639-2ae13e6b-ef4b-4026-8282-2dd4f03bd8b5.png)
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 23, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Waxpple / name: Waxpple (cde5a3b)

@jerryz123
Copy link
Contributor

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

@Waxpple
Copy link
Author

Waxpple commented Jul 26, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants