Skip to content

Commit

Permalink
Add a for loop to a test
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Nov 29, 2023
1 parent 079bc7a commit fc7759e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions test_regress/t/t_param_passed_to_port.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
parameter int HwDataAttr[1] = '{1};

module flash_mp_data_region_sel (
input int region_attrs_i[1],
output int o
input int region_attrs_i[1]
);
assign o = region_attrs_i[0];
endmodule

module t;
int o;
flash_mp_data_region_sel u_hw_sel (.region_attrs_i(HwDataAttr), .o(o));
initial begin
int o = 0;
for (int i = 0; i < 1; i++) begin
o = region_attrs_i[i];
end
if (o != 1) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
endmodule

module t;
flash_mp_data_region_sel u_hw_sel (.region_attrs_i(HwDataAttr));
endmodule

0 comments on commit fc7759e

Please sign in to comment.