From d468aaedba533b473ac713e09a5dae9f5e9e849f Mon Sep 17 00:00:00 2001 From: Vladimir Burian Date: Sun, 1 May 2011 20:36:52 +0200 Subject: [PATCH] Error in MCU external data bus multiplexer --- msp_motion.vhd | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/msp_motion.vhd b/msp_motion.vhd index 1542c0d..2d2f3f4 100644 --- a/msp_motion.vhd +++ b/msp_motion.vhd @@ -165,10 +165,9 @@ begin -- External data bus address decoder and data multiplexer. ------------------------------------------------------------------------------ - -- This statement leads to priority encoder (which should be avoided), but for - -- a small mux it doesn't matter and it's better readable. - dmem_dout <= DPA_DAT_O when DPA_SEL = '1' else - (others => 'X'); + -- When connection more memories, be aware that 'dmem_dout' can vary only when + -- reading cycle is performed. I.e. mux variable must be registered. + dmem_dout <= DPA_DAT_O; DPA_SEL <= '1' when dmem_addr (11 downto 10) = "00" else '0'; DPA_STB <= dmem_ce and DPA_SEL; -- 2.39.2