iverilog/ivtest/ivltests/br_gh130b.v

19 lines
294 B
Verilog

// Test that cast to enum works in procedural assignments
module test();
typedef enum { a, b, c } enum_type;
enum_type enum_value;
initial begin
enum_value = enum_type'(1);
if (enum_value == b) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule