1 -- Handle the instruction register for the JTAG controller
4 use ieee.std_logic_1164.ALL;
8 entity c4m_jtag_irblock is
10 IR_WIDTH: integer := 2
17 TDO_EN: out std_logic := '0';
20 STATE: in TAPSTATE_TYPE;
21 NEXT_STATE: in TAPSTATE_TYPE;
22 IRSTATE: in std_logic;
24 -- instruction register
25 IR: out std_logic_vector(IR_WIDTH-1 downto 0)
29 architecture rtl of c4m_jtag_irblock is
30 signal SHIFT_IR: std_logic_vector(IR_WIDTH-1 downto 0);
32 constant CMD_IDCODE: std_logic_vector(IR_WIDTH-1 downto 0) := c4m_jtag_cmd_idcode(IR_WIDTH);
36 if STATE = TestLogicReset then
37 SHIFT_IR <= (others => '0');
39 elsif rising_edge(TCK) then
47 SHIFT_IR(IR_WIDTH-2 downto 0) <= SHIFT_IR(IR_WIDTH-1 downto 1);
48 SHIFT_IR(IR_WIDTH-1) <= TDI;
60 TDO <= SHIFT_IR(0) when STATE = Shift and IRSTATE = '1' else
62 TDO_EN <= '1' when STATE = Shift and IRSTATE = '1' else