Address muxing from multiple sources

S

Salman Sheikh

Hello Out there,

I am trying to come up with an addressing scheme for a memory in my FPGA. I
have various modules with the my algorithm that need to address the RAM
memory. My question is this: How is the best way to write the code to
address the memory from different state address sources. Each address
source will access the memory sequentially. I thought of a mux where I
have a controller picking which block addresses the memory and has access
to the address and data lines, something like this:

--

process (sel_192, mem_en_sum, mem_en_exact, addr_exact, addr_colsum,
mem_en_minmax, addr_minmax, mem_en_estcen, addr_estcent, addrofst0,
addrofst1, addrofst2, addrofst3, addrofst4)
begin
case sel_192 is
when "000" =>
membank0 <= mem_en_sum & addr_colsum;
membank1 <= mem_en_sum & addr_colsum;
membank2 <= mem_en_sum & addr_colsum;
membank3 <= mem_en_sum & addr_colsum;
membank4 <= mem_en_sum & addr_colsum;
when "001" =>
membank0 <= mem_en_minmax & addr_minmax;
when "010" =>
membank0 <= mem_en_estcen & addr_estcent;
when "011" =>
membank0 <= mem_en_exact & addr_exact;
when "100" =>
membank0 <= '1' & addrofst0;
membank1 <= '1' & addrofst1;
membank2 <= '1' & addrofst2;
membank3 <= '1' & addrofst3;
membank4 <= '1' & addrofst4;
when others =>
membank0 <= (others => 'Z');
membank1 <= (others => 'Z');
membank2 <= (others => 'Z');
membank3 <= (others => 'Z');
membank4 <= (others => 'Z');
end case;
end process;

Is this a good way to procede or does anyone have any suggestions?

Thanks in advance.

Salman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top