2023-10-15 12:44:35 +02:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
|
//
|
|
|
|
|
// This file ONLY is placed under the Creative Commons Public Domain, for
|
2025-10-17 15:00:32 +02:00
|
|
|
// any use, without warranty, 2022 Krzysztof Boronski.
|
2023-10-15 12:44:35 +02:00
|
|
|
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
2025-10-17 15:00:32 +02:00
|
|
|
int i = 0;
|
2023-10-15 12:44:35 +02:00
|
|
|
|
2025-10-17 15:00:32 +02:00
|
|
|
function int postincrement_i;
|
|
|
|
|
return i++;
|
|
|
|
|
endfunction
|
2023-10-15 12:44:35 +02:00
|
|
|
|
2025-10-17 15:00:32 +02:00
|
|
|
module t;
|
|
|
|
|
initial begin
|
|
|
|
|
int arr [3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
|
|
|
|
|
i = 0;
|
|
|
|
|
arr[postincrement_i()][postincrement_i()]++;
|
|
|
|
|
$display("Value: %d", i);
|
|
|
|
|
end
|
2023-10-15 12:44:35 +02:00
|
|
|
endmodule
|