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

Failed generate C++ code with unique casez when "--assert" argument #1164

Closed
veripoolbot opened this issue May 17, 2017 · 2 comments
Closed

Failed generate C++ code with unique casez when "--assert" argument #1164

veripoolbot opened this issue May 17, 2017 · 2 comments
Assignees

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented May 17, 2017


Author Name: Enzo Chi
Original Redmine Issue: 1164 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


Verilator version: 3.902

Command for reproduce it: verilator --assert --cc unique_case.sv

Error Message:
%Error: unique_case.sv:20: Unsupported tristate construct: EQ
%Error: Exiting due to 1 error(s)
%Error: See the manual and http://www.veripool.org/verilator for more assistance.
%Error: Command Failed /home/eda/verilator-3.902//verilator_bin --assert --cc unique_case.sv

Test code: unique_case.sv

module unique_case (
     input bit       clk,
     input bit       rst,
     input bit [3:0] sel,
     input bit [3:0] a,
     input bit       c,
     output bit      dout
     );

     localparam logic DC  = 1'b?;

     always_ff @(posedge clk) begin
         if (rst) begin
             dout <= '0;
         end else begin
             unique casez(sel)
                 4'b0000: dout                  <= a[0];
                 4'b001?: dout                  <= a[1];
                 {1'b0, 1'b1, 1'b?, 1'b?}: dout <= a[2];
                 {1'b1, 1'b?, 1'b?, DC}: dout   <= a[3];
                 default: dout                  <= '0;
             endcase // unique casez (sel)
         end
     end // always_ff @ (posedge clk)

endmodule // unique_case


It looks the user localparam in the unique casez cause the problem.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented May 18, 2017


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-05-18T00:17:29Z


Thanks for the test.

Fixed in git towards 3.903. I used a relatively big hammer, so check no previously working cases break.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented May 31, 2017


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-05-31T02:07:28Z


In 3.904.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.