verilator/test_regress/t/t_mem_trace_split.v

29 lines
562 B
Systemverilog
Raw Normal View History

2024-10-23 17:51:48 +02:00
// DESCRIPTION: Verilator: Demonstrate complex user typea problem with --x-assign
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2024 Wilson Snyder
2024-10-23 17:51:48 +02:00
// SPDX-License-Identifier: CC0-1.0
2026-03-10 02:38:29 +01:00
module t (
input clk
);
2024-10-23 17:51:48 +02:00
2026-03-10 02:38:29 +01:00
logic [31:0] mem_a[32];
logic [15:0] mem_b[32];
2024-10-23 17:51:48 +02:00
2026-03-10 02:38:29 +01:00
int cyc = 0;
2024-10-23 17:51:48 +02:00
2026-03-10 02:38:29 +01:00
// finish report
always @(posedge clk) begin
cyc <= cyc + 1;
mem_a[cyc] <= cyc;
mem_b[cyc] <= 16'(cyc);
if (cyc == 10) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
2024-10-23 17:51:48 +02:00
endmodule