Hi,
I have a code as shown below.
logic[31:0] mem1[0:1024];
logic[31:0] mem2[0:1024];
logic[31:0] mem3[0:1024];
filename = {/a/b,"/c/d/a1.hex"};
$readmemh(filename,mem1);
filename = {/a/b,"/c/d/a2.hex"};
$readmemh(filename,mem2);
filename = {/a/b,"/c/d/a3.hex"};
$readmemh(filename,mem3);
and so on till a100.hex,mem100
i wanted to use loop as shown below.
for(int i =1;i<100;i++)
begin
filename = {/a/b,"/c/d/ai.hex"};
$readmemh(filename,memi);
end
where “i” should be replaced with loop count number using string concatenation.Can someone help with the right way to achieve it.
Regards,
Sravan