[sv-bc] Q: case selector wildcards in a localparam?

From: Seligman, Erik <erik.seligman@intel.com>
Date: Wed Jul 02 2014 - 09:45:57 PDT
Should the code below be legal?   I was surprised to find that some compilers accept it, though my interpretation of the standard is that the localparam needs to be a constant.


module localparam_case (input logic [7:0] i1,input logic clk,rst, output logic [7:0] o1);

localparam ugly =  7'b110_1???;

default clocking @(posedge clk); endclocking
default disable iff rst;

always_comb begin
casez (i1)
  ugly: o1 = 0;
  default: o1 = i1;
endcase
end

a1: assert property (o1 == i1);

endmodule


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Jul 2 09:46:09 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 02 2014 - 09:46:41 PDT