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

ternary expression with unpacked array produces bad result #1017

Closed
veripoolbot opened this issue Dec 17, 2015 · 2 comments
Closed

ternary expression with unpacked array produces bad result #1017

veripoolbot opened this issue Dec 17, 2015 · 2 comments
Assignees
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Varun Koyyalagunta
Original Redmine Issue: 1017 from https://www.veripool.org
Original Date: 2015-12-17
Original Assignee: Wilson Snyder (@wsnyder)


module top(
  input        a[1],
  output logic b[1],
  input        clk,
  input        en
);
    always_ff @(posedge clk)
        b <= en ? a : b;
endmodule

On the current master, 21cb29b, this produces -

     // Variables
     VL_SIG8(__Vdlyvval__b__v0[1],0,0);
     //char  __VpadToAlign5[3];
     // Body
     // ALWAYS at a.sv:7
     __Vdlyvval__b__v0 = ((IData)(vlTOPp->en) ? vlTOPp->a                    //this line produces compiler error: incompatible types in assignment of CData to CData [1]
        [0U] : vlTOPp->b[0U]);
     // ALWAYSPOST at a.sv:8
     vlTOPp->b[0U] = __Vdlyvval__b__v0;                                      //this line produces compiler error: invalid conversion from CData* to CData

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-12-18T23:03:20Z


Thanks for the test, simple enough fix, fixed in git towards 3.880.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-12-19T15:34:31Z


In 3.880.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants