2022-01-16 10:52:46 +01:00
|
|
|
// Test that cast to enum works in procedural assignments
|
2022-01-15 19:18:50 +01:00
|
|
|
module test();
|
|
|
|
|
|
|
|
|
|
typedef enum { a, b, c } enum_type;
|
|
|
|
|
|
|
|
|
|
enum_type enum_value;
|
|
|
|
|
|
|
|
|
|
initial begin
|
|
|
|
|
enum_value = enum_type'(1);
|
2022-01-16 10:52:46 +01:00
|
|
|
|
|
|
|
|
if (enum_value == b) begin
|
|
|
|
|
$display("PASSED");
|
|
|
|
|
end else begin
|
|
|
|
|
$display("FAILED");
|
|
|
|
|
end
|
2022-01-15 19:18:50 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
endmodule
|