circt
circt copied to clipboard
[FIRRTL] Lint XMRs in the "Design"
A useful thing to lint is to check that there are no cross module references inside design code. (Note: it is not well defined what is "design code" vs. what is "testbench code" or "not-design code".)
I'm running into a situation where I'm introducing FIRRTL probe reads in a region of the design which should not have them. Currently, nothing is preventing me from doing this and this type of inadvertent change is getting caught in PR review by eagle-eyed reviewers (h/t @girishpai). However, if this wasn't caught, I wouldn't realize this problem until physical design teams complained.
This probably is somewhat difficult because it is not well defined what is the "design". This can be done with janky lint checks involving MarkDutAnnotation. However, this is really not ideal.
I don't have a solution here. I'm bringing this up as something that requires more thought before an implementation can be considered.