verilator/test_regress/t/t_enum_huge_methods_bad.v

38 lines
685 B
Systemverilog
Raw Normal View History

2021-12-11 05:08:03 +01:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2014 Wilson Snyder
2021-12-11 05:08:03 +01:00
// SPDX-License-Identifier: CC0-1.0
2026-05-14 03:00:34 +02:00
module t (
input clk
);
2021-12-11 05:08:03 +01:00
2026-05-14 03:00:34 +02:00
typedef enum logic [159:0] {
E01 = 160'h1,
ELARGE = 160'h1234_4567_abcd_1234_4567_abcd
} my_t;
2021-12-11 05:08:03 +01:00
2026-05-14 03:00:34 +02:00
my_t e;
2021-12-11 05:08:03 +01:00
2026-05-14 03:00:34 +02:00
int cyc;
2021-12-11 05:08:03 +01:00
2026-05-14 03:00:34 +02:00
// Check runtime
always @(posedge clk) begin
cyc <= cyc + 1;
if (cyc == 0) begin
// Setup
e <= E01;
end
else if (cyc == 1) begin
$display(e.name);
e <= ELARGE;
end
else if (cyc == 99) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
2021-12-11 05:08:03 +01:00
endmodule