From fbd773f6758d41af1d7b45994c18754d162cd978 Mon Sep 17 00:00:00 2001 From: hadeshyp Date: Mon, 31 May 2010 16:57:39 +0000 Subject: [PATCH] *** empty log message *** --- .../trb_net16_med_ecp_sfp_gbe.vhd | 9 +++- trb_net16_endpoint_hades_cts.vhd | 42 +++++++++---------- trb_net_std.vhd | 2 +- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/media_interfaces/trb_net16_med_ecp_sfp_gbe.vhd b/media_interfaces/trb_net16_med_ecp_sfp_gbe.vhd index 3a1bf1b..6afc9b9 100755 --- a/media_interfaces/trb_net16_med_ecp_sfp_gbe.vhd +++ b/media_interfaces/trb_net16_med_ecp_sfp_gbe.vhd @@ -1101,7 +1101,14 @@ stat_debug(15 downto 0) <= rx_data; stat_debug(17 downto 16) <= rx_k; stat_debug(19 downto 18) <= (others => '0'); stat_debug(23 downto 20) <= buf_stat_debug(3 downto 0); -stat_debug(41 downto 24) <= (others => '0'); +stat_debug(24) <= fifo_rx_rd_en; +stat_debug(25) <= fifo_rx_wr_en; +stat_debug(26) <= fifo_rx_reset; +stat_debug(27) <= fifo_rx_empty; +stat_debug(28) <= fifo_rx_full; +stat_debug(29) <= last_rx(8); +stat_debug(30) <= rx_allow_q; +stat_debug(41 downto 31) <= (others => '0'); stat_debug(42) <= sysclk; stat_debug(43) <= sysclk; stat_debug(59 downto 44) <= (others => '0'); diff --git a/trb_net16_endpoint_hades_cts.vhd b/trb_net16_endpoint_hades_cts.vhd index 58fb7af..54c6537 100644 --- a/trb_net16_endpoint_hades_cts.vhd +++ b/trb_net16_endpoint_hades_cts.vhd @@ -18,15 +18,16 @@ entity trb_net16_endpoint_hades_cts is REPLY_CAN_RECEIVE_DATA : channel_config_t := (c_YES,c_YES,c_NO,c_NO); USE_CHECKSUM : channel_config_t := (c_NO,c_YES,c_YES,c_YES); APL_WRITE_ALL_WORDS : channel_config_t := (c_NO,c_NO,c_NO,c_NO); + ADDRESS_MASK : std_logic_vector(15 downto 0) := x"FFFF"; BROADCAST_BITMASK : std_logic_vector(7 downto 0) := x"FF"; REGIO_NUM_STAT_REGS : integer range 0 to 6 := 2; --log2 of number of status registers REGIO_NUM_CTRL_REGS : integer range 0 to 6 := 3; --log2 of number of ctrl registers --standard values for output registers - REGIO_INIT_CTRL_REGS : std_logic_vector(2**(3)*32-1 downto 0) := (others => '0'); + REGIO_INIT_CTRL_REGS : std_logic_vector(2**(4)*32-1 downto 0) := (others => '0'); --set to 0 for unused ctrl registers to save resources - REGIO_USED_CTRL_REGS : std_logic_vector(2**(3)-1 downto 0) := "00000001"; + REGIO_USED_CTRL_REGS : std_logic_vector(2**(4)-1 downto 0) := x"0001"; --set to 0 for each unused bit in a register - REGIO_USED_CTRL_BITMASK : std_logic_vector(2**(3)*32-1 downto 0) := (others => '1'); + REGIO_USED_CTRL_BITMASK : std_logic_vector(2**(4)*32-1 downto 0) := (others => '1'); REGIO_USE_DAT_PORT : integer range 0 to 1 := c_YES; --internal data port REGIO_INIT_ADDRESS : std_logic_vector(15 downto 0) := x"FFFF"; REGIO_INIT_UNIQUE_ID : std_logic_vector(63 downto 0) := x"0000_0000_0000_0000"; @@ -34,8 +35,9 @@ entity trb_net16_endpoint_hades_cts is REGIO_INIT_ENDPOINT_ID : std_logic_vector(15 downto 0) := x"0001"; REGIO_COMPILE_TIME : std_logic_vector(31 downto 0) := x"00000000"; REGIO_COMPILE_VERSION : std_logic_vector(15 downto 0) := x"0001"; - REGIO_HARDWARE_VERSION : std_logic_vector(31 downto 0) := x"00000000"; + REGIO_HARDWARE_VERSION : std_logic_vector(31 downto 0) := x"50000000"; REGIO_USE_1WIRE_INTERFACE: integer := c_YES; --c_YES,c_NO,c_MONITOR + REGIO_USE_VAR_ENDPOINT_ID : integer range c_NO to c_YES := c_NO; CLOCK_FREQUENCY : integer range 1 to 200 := 100 ); port( @@ -84,6 +86,11 @@ entity trb_net16_endpoint_hades_cts is REGIO_COMMON_CTRL_REG_OUT : out std_logic_vector(std_COMCTRLREG*32-1 downto 0); REGIO_REGISTERS_IN : in std_logic_vector(32*2**(REGIO_NUM_STAT_REGS)-1 downto 0) := (others => '0'); REGIO_REGISTERS_OUT : out std_logic_vector(32*2**(REGIO_NUM_CTRL_REGS)-1 downto 0); + COMMON_STAT_REG_STROBE : out std_logic_vector(std_COMSTATREG-1 downto 0); + COMMON_CTRL_REG_STROBE : out std_logic_vector(std_COMCTRLREG-1 downto 0); + STAT_REG_STROBE : out std_logic_vector(2**(REGIO_NUM_STAT_REGS)-1 downto 0); + CTRL_REG_STROBE : out std_logic_vector(2**(REGIO_NUM_CTRL_REGS)-1 downto 0); + --following ports only used when using internal data port REGIO_ADDR_OUT : out std_logic_vector(16-1 downto 0); REGIO_READ_ENABLE_OUT : out std_logic; REGIO_WRITE_ENABLE_OUT : out std_logic; @@ -97,7 +104,8 @@ entity trb_net16_endpoint_hades_cts is REGIO_ONEWIRE_INOUT : inout std_logic; REGIO_ONEWIRE_MONITOR_OUT : out std_logic; REGIO_ONEWIRE_MONITOR_IN : in std_logic; - TRIGGER_MONITOR_IN : in std_logic; --strobe when timing trigger received + REGIO_VAR_ENDPOINT_ID : in std_logic_vector(15 downto 0) := (others => '0'); + TRIGGER_MONITOR_IN : in std_logic := '0'; --strobe when timing trigger received GLOBAL_TIME_OUT : out std_logic_vector(31 downto 0); --global time, microseconds LOCAL_TIME_OUT : out std_logic_vector(7 downto 0); --local time running with chip frequency TIME_SINCE_LAST_TRG_OUT : out std_logic_vector(31 downto 0); --local time, resetted with each trigger @@ -627,6 +635,7 @@ begin USED_CTRL_BITMASK => REGIO_USED_CTRL_BITMASK, USE_DAT_PORT => REGIO_USE_DAT_PORT, INIT_ADDRESS => REGIO_INIT_ADDRESS, + INIT_BOARD_INFO => REGIO_INIT_BOARD_INFO, INIT_UNIQUE_ID => REGIO_INIT_UNIQUE_ID, COMPILE_TIME => REGIO_COMPILE_TIME, COMPILE_VERSION => REGIO_COMPILE_VERSION, @@ -672,6 +681,10 @@ begin --Custom Register in / out REGISTERS_IN => REGIO_REGISTERS_IN, REGISTERS_OUT => REGIO_REGISTERS_OUT, + COMMON_STAT_REG_STROBE => COMMON_STAT_REG_STROBE, + COMMON_CTRL_REG_STROBE => COMMON_CTRL_REG_STROBE, + STAT_REG_STROBE => STAT_REG_STROBE, + CTRL_REG_STROBE => CTRL_REG_STROBE, --following ports only used when no internal register is accessed DAT_ADDR_OUT => REGIO_ADDR_OUT, DAT_READ_ENABLE_OUT => REGIO_READ_ENABLE_OUT, @@ -766,21 +779,4 @@ begin STAT_DEBUG_1 <= (others => '0'); - - - - - -end architecture; - - - - - - - - - - - - +end architecture; \ No newline at end of file diff --git a/trb_net_std.vhd b/trb_net_std.vhd index 9698f7c..e08020f 100644 --- a/trb_net_std.vhd +++ b/trb_net_std.vhd @@ -111,7 +111,7 @@ package trb_net_std is --common registers --maximum: 4, because of regio implementation constant std_COMSTATREG : integer := 2; - constant std_COMCTRLREG : integer := 2; + constant std_COMCTRLREG : integer := 3; --needed address width for common registers constant std_COMneededwidth : integer := 2; constant c_REGIO_ADDRESS_WIDTH : integer := 16; -- 2.43.0