Don't use tri-state logic for TDO; introduce TDO_EN signal to indicate when TDO is...
[c4m-jtag.git] / rtl / vhdl / c4m_jtag_irblock.vhdl
index e8b34a5caf28d59cc601f486140c64f4923adbe5..8be483a192503f36f253c76083eb8eee42436cce 100644 (file)
@@ -14,6 +14,7 @@ entity c4m_jtag_irblock is
     TCK:        in std_logic;
     TDI:        in std_logic;
     TDO:        out std_logic;
+    TDO_EN:     out std_logic := '0';
     
     -- JTAG state
     STATE:      in TAPSTATE_TYPE;
@@ -57,5 +58,7 @@ begin
   end process;
 
   TDO <= SHIFT_IR(0) when STATE = Shift and IRSTATE = '1' else
-         'Z';
+         '0';
+  TDO_EN <= '1' when STATE = Shift and IRSTATE = '1' else
+            '0';
 end rtl;