2015-08-12 14:36:23 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
2026-01-27 02:24:34 +01:00
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain.
|
|
|
|
|
// SPDX-FileCopyrightText: 2015 Jonathon Donaldson
|
2020-03-21 16:24:24 +01:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
2015-08-12 14:36:23 +02:00
|
|
|
|
2026-03-03 13:21:24 +01:00
|
|
|
module t_bitsel_enum (
|
|
|
|
|
output out0,
|
|
|
|
|
output out1
|
|
|
|
|
);
|
2015-08-12 14:36:23 +02:00
|
|
|
|
2026-03-03 13:21:24 +01:00
|
|
|
localparam [6:0] CNST_VAL = 7'h22;
|
2015-08-12 14:36:23 +02:00
|
|
|
|
2026-03-03 13:21:24 +01:00
|
|
|
enum logic [6:0] {ENUM_VAL = 7'h33} MyEnum;
|
2015-08-12 14:36:23 +02:00
|
|
|
|
2026-03-03 13:21:24 +01:00
|
|
|
assign out0 = CNST_VAL[0];
|
|
|
|
|
// Not supported by NC-verilog nor VCS, but other simulators do
|
|
|
|
|
assign out1 = ENUM_VAL[0]; // named values of an enumeration should act like constants so this should work just like the line above works
|
2015-08-12 14:36:23 +02:00
|
|
|
|
2026-03-03 13:21:24 +01:00
|
|
|
initial begin
|
|
|
|
|
$write("*-* All Finished *-*\n");
|
|
|
|
|
$finish;
|
|
|
|
|
end
|
2015-08-12 14:36:23 +02:00
|
|
|
|
|
|
|
|
endmodule
|