About assocative memory

I am working on a noc(AXI-APB) bridge in apb side assocative memory is declared because the address are not particular order. In NOC defualt read from axi side is not working because until the data is written the memory is won’t created in assocative array now it shoing a warning called " Non-existent associative array entry. Returning default value. " The memory i declared is
bit[31:0] apb_memory[bit[31:0]]
is there any to write all address to defualt value at one instance.?

1 Like

Use an assignment pattern with a default.

bit[31:0] apb_memory[bit[31:0]] = '{default:32'hDeadFace};

See section 7.8.7 Allocating associative array elements in the 1800-2017 LRM

In the above example, is assigning default value going to allocate every possible element in the associative array and take up (2**32)*4 bytes = 64GB of memory?

No, elements do not get allocated until there is an actual assignment to a specific element.