Closed hankhsu1996 closed 7 months ago
Yeah, there is basically no difference between a system task and a void-returning system function, since system tasks don't ever consume time anyway. There's a discussion on the Accellera issue tracker where they considered making the severity tasks into void-returning functions but I think they just ran out of time before the 2023 LRM shipped. I think it makes sense here to just remove the restriction on the deferred assertion action.
Yeah, there is basically no difference between a system task and a void-returning system function, since system tasks don't ever consume time anyway. There's a discussion on the Accellera issue tracker where they considered making the severity tasks into void-returning functions but I think they just ran out of time before the 2023 LRM shipped. I think it makes sense here to just remove the restriction on the deferred assertion action.
Hi. Also this bug appears while elaborating such opensource code with slang
.
Fixed in 0b436f94a4745a573a236a17ca9425dc9a585f4b
Describe the bug After the commit c35b879f5bfb334b84af192bbe2585e08d9b5195, severity tasks are now being classified as
SubroutineKind::Function
. This classification is causing my existing SystemVerilog code to fail when using with deferred assertions.To Reproduce Here is a simplified snippet:
Result:
Additional context In the LRM's sections on deferred assertions, it states:
My thoughts:
Regarding the comment in the following code snippet: https://github.com/MikePopoloski/slang/blob/9705113788c5a11749ae463f3ee3e49751948666/source/ast/builtins/SystemTasks.cpp#L121-L123
LRM says:
Therefore, it refers to "elaboration" severity system tasks (LRM 20.10.1), which are different from the run-time severity system tasks (LRM 20.10) used in the deferred assertion action block.