For loop taking large compilation time

I want to set the address map for the ACE questaVIP

Here I have four diffrent slaves.The address width is 64 bit.
Address[6:5] decides the slave ie. if address[6:5]==0 then it is for slave0, if address[6:5]==1 then it is for slave1, and so on.

I want to set address map for address range 64’h8000_0000 to 64’hFFFF_FFFF

So considering above condition

64’h8000_0000 is the starting address of slave0; ie size of 'h20
64’h8000_0020 is the starting address of slave1 ie size of 'h20
64’h8000_0040 is the starting address of slave2 ie size of 'h20
64’h8000_0060 is the starting address of slave3 ie size of 'h20

Again

64’h8000_0080 is the starting address of slave0; ie size of 'h20
64’h8000_00a0 is the starting address of slave1; ie size of 'h20 and so on

So I have written this using for loop.But the compilation taking vary very long time.
Is there any way to speed the compilation. or any ther logic to do this task?


// code here ‘i’ is used for starting address
for (longint i='h8000_0000; i <'hFFFF_FFFF;i=i+‘h80)begin
addr_map.add(’{MAP_NORMAL,“S0”,0,MAP_SI,10,i,'h0000_0020,MEM_NORMAL,MAP_NORM_SEC_DATA});//slave0
end

for (longint i='h8000_0020; i <'hFFFF_FFFF;i=i+‘h80)begin
addr_map.add(’{MAP_NORMAL,“S0”,1,MAP_SI,10,i,'h0000_0020,MEM_NORMAL,MAP_NORM_SEC_DATA});//slave1
end

for (longint i='h8000_0040; i <'hFFFF_FFFF;i=i+‘h80)begin
addr_map.add(’{MAP_NORMAL,“S0”,2,MAP_SI,10,i,'h0000_0020,MEM_NORMAL,MAP_NORM_SEC_DATA});//slave2
end

for (longint i='h8000_0060; i <'hFFFF_FFFF;i=i+‘h80)begin
addr_map.add(’{MAP_NORMAL,“S0”,3,MAP_SI,10,i,'h0000_0020,MEM_NORMAL,MAP_NORM_SEC_DATA});//slave3
end


Thanks,

In reply to navinpatil1:

I can’t see how this code would take long to compile. Simulation would take millions of iterations. Are you sure that is what you want to do?

In reply to dave_59:
Hi,
It’s my mistake,the simulation is taking time not compilation. Is there any approach to speed up this. Because only after this configurations,my actual tests will start.

Thanks,

In reply to navinpatil1:

Do you really have millions of slaves?

In reply to dave_59:

No, have only four slaves, But as as mentioned previously the [6:5] bits of address decides the slaves. So it divides the whole 64 bit address into multiple address ranges of size ‘h20.
The addr_map.addr requires the parameters like slave_id(ie. 0 for slave0, 1 for slave1 etc.), starting_address, size_of_address_range (end_address=starting_addr+size-1)
So eg. For slave0 there will be multiple entries with
1)Starting_address :‘h8000_0000 size:’h20 slave_id:0
2)Starting_address :’h8000_0080 size:’h20 slave_id:0 (here starting address is ‘h8000_0080 because ‘h8000_0020 to ‘h8000_0080 is for slave 1 to 3 depending on [6:5] bits).
So I need to write multiple entries for each slave considering different starting_address .