mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-06 09:07:15 +02:00
Check that the behavior for all sorts of base types for enums is correctly implemented. Both for valid as well as invalid base types. Signed-off-by: Lars-Peter Clausen <[email protected]>
27 lines
379 B
Verilog
27 lines
379 B
Verilog
// Check that it is possible to declare an enum type with a scalar vector type
|
|
// as the base type.
|
|
|
|
module test;
|
|
|
|
enum reg {
|
|
A
|
|
} e1;
|
|
|
|
enum logic {
|
|
B
|
|
} e2;
|
|
|
|
enum bit {
|
|
C
|
|
} e3;
|
|
|
|
initial begin
|
|
if ($bits(e1) == 1 && $bits(e2) == 1 && $bits(e3) == 1) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED");
|
|
end
|
|
end
|
|
|
|
endmodule
|