-
Notifications
You must be signed in to change notification settings - Fork 892
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
Any plans to add CDC linting? #4493
Comments
Clock domain crossing correctness can be implemented prior to passing RTLIL or Verilog to Yosys by language specific tooling, for example, see Amaranth HDL. To my knowledge it's not within scope of any current efforts to integrate related features to Yosys. If anybody is interested in building and maintaining something like that, feel free to ask to reopen this issue |
Actually we need to determine clock domains for various functionality inside yosys, which is currently done in an ad-hoc manner, but I'd like to eventually build a helper for (similar to the sigmap and modwalker utilities). Once you have a utility that can tell you for each wire bit the clock domains it's driven from and used in, writing a pass that highlights CDC locations would be the easy part. I've been meaning to look at that for about a year now, there's just never the time... (cf #3956 also) |
FWIW Verilator had CDC warnings but they were rarely used, and lost the maintainer, so were removed. |
It's worth a ton!!!
Similarly to what we've recently seen for language linting, where Slang , Verible and Verilator were called into action, the availability of second opinion for CDC Linting would be a welcome addition, esp. in the early days, when both tools are yet to mature. |
See discussion #3956 CDC detection with yosys. I have a working tool "cdc_snitch" posted and documented. |
Great lead! We will be trying it on all of our active projects, and are also spreading the word for the others to kick some CDC tires with it.
|
In Bedrock and an additional internal project, we check the portable layer of synthesizable Verilog with cdc_snitch, and don't pass CI unless cdc_snitch reports zero BAD. Sorry, the output of that check is not visible publicly. The gitlab CI job definitions are in (https://github.com/BerkeleyLab/Bedrock/blob/master/.gitlab/ci/cdc_check.gitlab-ci.yml). In Bedrock, those two code bases have 3001 and 5211 (non-blank, non-comment) lines of code, with some overlap. If you peek at our gitlab CI configuration, you can tell that we take CI pretty seriously. Here's a cut-and-paste of the relevant output from the last master-branch CI run, job badger_cdc:
|
Thanks! Maybe? The licenses prevent the projects from merging. He's welcome to borrow code from us.
The hint is in bedrock's Dockerfile:
If sufficiently motivated (as we were back in the bullseye days), we could build a fresh (pinned) copy of yosys. |
Feature Description
With a good number of opensource RTL developers being converted software engineers, a CDC validation option would greatly help improve the quality of IP in opensource domain.
Is there any thinking in that direction within Yosys dev community?
The text was updated successfully, but these errors were encountered: