Skip to content
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

Fix vector assignment with undefined delay #1164

Merged
merged 2 commits into from
Sep 7, 2024

Commits on Sep 2, 2024

  1. tgt-vvp: Fix vector assignment with undefined delay

    Assignments with an undefined intra-assignment delay should be treated like
    assignments with zero delay. For the most part this is implemented
    correctly, except for assignments to a part of a vector where the offset
    inside the vector is an immediate value. E.g.
    ```
    reg [1:0] x;
    integer d = 'x;
    ...
    x[0] <= #d 1'b1
    ```
    
    Here when loading the delay into the index register flag 4 is updated, but
    never cleared afterwards. As a result, if the delay is undefined, the vector
    assignment will be skipped. Fix this by making sure flag 4 is always
    cleared before the vector assignment instruction.
    
    Signed-off-by: Lars-Peter Clausen <[email protected]>
    larsclausen committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    80fd301 View commit details
    Browse the repository at this point in the history
  2. ivtest: Add regression test for undefined intra-assignment delay

    Check that assignments with undefined intra-assignment delay get executed
    with zero delay. The assignment should not be skipped.
    
    Signed-off-by: Lars-Peter Clausen <[email protected]>
    larsclausen committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    fa83f42 View commit details
    Browse the repository at this point in the history