Don't use tri-state logic for TDO; introduce TDO_EN signal to indicate when TDO is...
[c4m-jtag.git] / rtl / vhdl / c4m_jtag_ioblock.vhdl
index ec634407e363bc4a5c96753b4314f42ed91d54fc..c70be6f262a3e8bba163a71ba7dc2ad026d535cc 100644 (file)
@@ -15,6 +15,7 @@ entity c4m_jtag_ioblock is
     TCK:        in std_logic;
     TDI:        in std_logic;
     TDO:        out std_logic;
     TCK:        in std_logic;
     TDI:        in std_logic;
     TDO:        out std_logic;
+    TDO_EN:     out std_logic := '0';
 
     -- JTAG state
     STATE:      in TAPSTATE_TYPE;
 
     -- JTAG state
     STATE:      in TAPSTATE_TYPE;
@@ -84,5 +85,7 @@ begin
                 SR_Normal;
 
   TDO <= BDSR_OUT(0) when ISSAMPLECMD and STATE = Shift else
                 SR_Normal;
 
   TDO <= BDSR_OUT(0) when ISSAMPLECMD and STATE = Shift else
-         'Z';
+         '0';
+  TDO_EN <= '1' when ISSAMPLECMD and STATE = Shift else
+            '0';
 end rtl;
 end rtl;