Commit 2cfee4e
[ImportVerilog] Fix signal captures in timing controls
When a task reads a module-scope signal in an event control expression
like `@(posedge clk)`, the signal must be captured as an extra argument
to the task function. Previously, `convertTimingControl` set the
`rvalueReadCallback` to null to prevent event control reads from
polluting implicit `@*` sensitivity lists. This also suppressed the
function capture callback, causing the signal to be used across region
boundaries without being plumbed as an argument.
Replace the callback nulling with an `isInsideTimingControl` flag. The
implicit event callback checks this flag before recording reads, while
function capture callbacks (which don't check it) continue to work.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 838a8bb commit 2cfee4e
File tree
3 files changed
+50
-8
lines changed- lib/Conversion/ImportVerilog
- test/Conversion/ImportVerilog
3 files changed
+50
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
423 | 429 | | |
424 | 430 | | |
425 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
221 | | - | |
| 222 | + | |
| 223 | + | |
222 | 224 | | |
223 | 225 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 226 | + | |
230 | 227 | | |
231 | 228 | | |
232 | 229 | | |
| |||
241 | 238 | | |
242 | 239 | | |
243 | 240 | | |
244 | | - | |
| 241 | + | |
| 242 | + | |
245 | 243 | | |
246 | 244 | | |
247 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3736 | 3736 | | |
3737 | 3737 | | |
3738 | 3738 | | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
3739 | 3777 | | |
3740 | 3778 | | |
3741 | 3779 | | |
| |||
0 commit comments