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
19 STATE: in TAPSTATE_TYPE;
20 NEXT_STATE: in TAPSTATE_TYPE;
21 IRSTATE: in std_logic;
23 -- instruction register
24 IR: out std_logic_vector(IR_WIDTH-1 downto 0)
28 architecture rtl of c4m_jtag_irblock is
29 signal SHIFT_IR: std_logic_vector(IR_WIDTH-1 downto 0);
31 constant CMD_IDCODE: std_logic_vector(IR_WIDTH-1 downto 0) := c4m_jtag_cmd_idcode(IR_WIDTH);
35 if STATE = TestLogicReset then
36 SHIFT_IR <= (others => '0');
38 elsif rising_edge(TCK) then
46 SHIFT_IR(IR_WIDTH-2 downto 0) <= SHIFT_IR(IR_WIDTH-1 downto 1);
47 SHIFT_IR(IR_WIDTH-1) <= TDI;
59 TDO <= SHIFT_IR(0) when STATE = Shift and IRSTATE = '1' else