Best way to mux addresses

S

salman sheikh

I have some memory RAMS that I have multiple address sources. I thought
a mux with a control would be best for addressing the memory. Is this
the best approach in terms of simplicity of code and synthesis?

-- Here is my example address case statement based on control signal
-- sel192
process (sel192, eram_colsum, eram_minmax, eram_estcen, eram_exact,
addr_colsum, addr_minmax, addr_estcent, addr_exact, addrofst0,
addrofst1, addrofst2, addrofst3, addrofst4)
begin
case sel192 is

when "000" =>
addr_bnk0 <= eram_colsum & addr_colsum;
addr_bnk1 <= eram_colsum & addr_colsum;

when "001" =>
addr_bnk0 <= eram_minmax & addr_minmax;
addr_bnk1 <= (others => 'Z');

when "010" =>
addr_bnk0 <= eram_estcen & addr_estcent;
addr_bnk1 <= (others => 'Z');

when "100" =>
addr_bnk0 <= eram_exact & addr_exact;
addr_bnk1 <= (others => 'Z');

when "101" =>
addr_bnk0 <= '0' & addrofst0;
addr_bnk1 <= '0' & addrofst1;

when others =>
addr_bnk0 <= (others => 'Z');
addr_bnk1 <= (others => 'Z');
end case;
end process;
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top