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';
19 -- instruction register
20 IR: out std_logic_vector(IR_WIDTH-1 downto 0);
24 CAPTURE: in std_logic;
30 architecture rtl of c4m_jtag_irblock is
31 signal SHIFT_IR: std_logic_vector(IR_WIDTH-1 downto 0);
33 constant CMD_IDCODE: std_logic_vector(IR_WIDTH-1 downto 0) := c4m_jtag_cmd_idcode(IR_WIDTH);
37 if rising_edge(TCK) then
39 SHIFT_IR <= (others => '0');
41 elsif CAPTURE = '1' then
44 elsif SHIFT = '1' then
45 SHIFT_IR(IR_WIDTH-2 downto 0) <= SHIFT_IR(IR_WIDTH-1 downto 1);
46 SHIFT_IR(IR_WIDTH-1) <= TDI;
47 elsif UPDATE = '1' then
53 TDO <= SHIFT_IR(0) when SHIFT = '1' else
55 TDO_EN <= '1' when SHIFT = '1' else