1 -- The JTAG id and bypass handling block
4 use ieee.std_logic_1164.ALL;
8 entity c4m_jtag_idblock is
10 IR_WIDTH: integer := 2;
12 PART_NUMBER: std_logic_vector(15 downto 0);
13 VERSION: std_logic_vector(3 downto 0) := "0100";
14 MANUFACTURER: std_logic_vector(10 downto 0)
21 TDO_EN: out std_logic := '0';
24 STATE: in TAPSTATE_TYPE;
25 NEXT_STATE: in TAPSTATE_TYPE;
26 DRSTATE: in std_logic;
29 IR: in std_logic_vector(IR_WIDTH-1 downto 0)
33 architecture rtl of c4m_jtag_idblock is
34 constant IDCODE: std_logic_vector(31 downto 0) := VERSION & PART_NUMBER & MANUFACTURER & "1";
36 signal SR_ID: std_logic_vector(31 downto 0);
37 signal EN_TDO: boolean;
39 constant CMD_IDCODE: std_logic_vector(IR_WIDTH-1 downto 0) := c4m_jtag_cmd_idcode(IR_WIDTH);
40 constant CMD_BYPASS: std_logic_vector(IR_WIDTH-1 downto 0) := c4m_jtag_cmd_bypass(IR_WIDTH);
44 if rising_edge(TCK) then
51 if IR = CMD_IDCODE then
52 SR_ID(30 downto 0) <= SR_ID(31 downto 1);
54 elsif IR = CMD_BYPASS then
67 EN_TDO <= STATE = Shift and DRSTATE = '1' and (IR = CMD_IDCODE or IR = CMD_BYPASS);
68 TDO <= SR_ID(0) when EN_TDO else
70 TDO_EN <= '1' when EN_TDO else