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)
23 STATE: in TAPSTATE_TYPE;
24 NEXT_STATE: in TAPSTATE_TYPE;
25 DRSTATE: in std_logic;
28 IR: in std_logic_vector(IR_WIDTH-1 downto 0)
32 architecture rtl of c4m_jtag_idblock is
33 constant IDCODE: std_logic_vector(31 downto 0) := VERSION & PART_NUMBER & MANUFACTURER & "1";
35 signal SR_ID: std_logic_vector(31 downto 0);
36 signal EN_TDO: boolean;
38 constant CMD_IDCODE: std_logic_vector(IR_WIDTH-1 downto 0) := c4m_jtag_cmd_idcode(IR_WIDTH);
39 constant CMD_BYPASS: std_logic_vector(IR_WIDTH-1 downto 0) := c4m_jtag_cmd_bypass(IR_WIDTH);
43 if rising_edge(TCK) then
50 if IR = CMD_IDCODE then
51 SR_ID(30 downto 0) <= SR_ID(31 downto 1);
53 elsif IR = CMD_BYPASS then
66 EN_TDO <= STATE = Shift and DRSTATE = '1' and (IR = CMD_IDCODE or IR = CMD_BYPASS);
67 TDO <= SR_ID(0) when EN_TDO else