System verilog associative array, where its usage is

my question may be little dumb but i want to know the following.

always read what type of index it can take, and it is useful when we have sparse memory, fastest accessible.

i wanted to know where exactly its usage can be and how it is related to a sparse memory and how associative array is stored in sparse memory.

Thanks in advance
Pradeep

In reply to Pradeepkumar:

I show examples of associative arrays in my responses (go through all) in

Obviously, an associative array is a software concept and is not is hardware.
However, it is possible to come close to emulating it in hardware with constraints and speed penalties. A cache is a form of associative arrays, though, in hardware caches, more words are fetched in the contemplation that data from nearby addresses will be requested.
How it’s handled by simulation tool? That is vendor dependent, as 1800 does not address that.
Do a search on associative array implementation, there are lots of responses

A simple approach to get you started would be to create a map class that uses two vectors - one for the key and one for the value. To add an item, you insert a key in one and a value in another. To find a value, you just loop over all the keys. Once you have this working, you can think about using a more complex data structure.

Ben Cohen
http://www.systemverilog.us/ ben@systemverilog.us
For training, consulting, services: contact Home - My cvcblr


In reply to ben@SystemVerilog.us:

Thanks a lot Ben.

sure will read through. thanks again for the quick response…