> My problem is that I have to address a memory composed
> of 2 banks, M muxes, N pages and K words.
You're not really giving us enough information to help.... You need to
provide details on how the REAL RAM handles it's paging etc. How wide
is your RAM? Timings etc.
> My question is: how can I define the structure to write/read a word?
Erm, you cannot. You have to determine what I/O your memory has
(address, data, write strobe, chip select etc.) then any requirements
of timing between asserting your address and the data being valid etc.
You may have to create a state-machine to do the reads and writes as
chances they may be multi-cycle.
> type ram_type is array (0 to 255) of std_logic_vector(15 downto 0);
This is a description of a register array, not a RAM/memory. Used for
small internal usage and perhaps used as part of a behavioural model of
real RAMs
|