MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
546 stars 114 forks source link

Fix errors on non blocking assignments with RHS delays inside always_ff #933

Closed udif closed 1 month ago

udif commented 1 month ago

This is my attempt to fix #932 . It works, the new unit tests pass, but I'm really lacking confidence in my patch (at least it is very short and can be easily reviewed).

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.00%. Comparing base (9c9b487) to head (a4aff23).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/MikePopoloski/slang/pull/933/graphs/tree.svg?width=650&height=150&src=pr&token=sS5JjK9091&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski)](https://app.codecov.io/gh/MikePopoloski/slang/pull/933?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski) ```diff @@ Coverage Diff @@ ## master #933 +/- ## ======================================= Coverage 94.00% 94.00% ======================================= Files 189 189 Lines 48425 48426 +1 ======================================= + Hits 45524 45525 +1 Misses 2901 2901 ``` | [Files](https://app.codecov.io/gh/MikePopoloski/slang/pull/933?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski) | Coverage Δ | | |---|---|---| | [source/ast/Statements.cpp](https://app.codecov.io/gh/MikePopoloski/slang/pull/933?src=pr&el=tree&filepath=source%2Fast%2FStatements.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski#diff-c291cmNlL2FzdC9TdGF0ZW1lbnRzLmNwcA==) | `92.26% <100.00%> (+<0.01%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/MikePopoloski/slang/pull/933?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/MikePopoloski/slang/pull/933?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski). Last update [9c9b487...a4aff23](https://app.codecov.io/gh/MikePopoloski/slang/pull/933?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski).
MikePopoloski commented 1 month ago

This makes sense to me, and seems to match behavior of other tools I tried.