);\r
end component fifo_19x16_obuf;\r
\r
+\r
+--component dbg_reg is\r
+--generic(\r
+-- WIDTH : integer := 1\r
+--);\r
+--port(\r
+-- DEBUG_IN : in std_logic_vector(WIDTH-1 downto 0);\r
+-- DEBUG_OUT : out std_logic_vector(WIDTH-1 downto 0)\r
+--);\r
+--end component dbg_reg;\r
+\r
+\r
type STATES is (IDLE, RD1, RD2, RD3, RD4, RD5, WT5, WR5, WD5, DEL);\r
signal CURRENT_STATE, NEXT_STATE: STATES;\r
signal bsm_x : std_logic_vector(3 downto 0);\r
\r
signal p_wait_x : std_logic;\r
signal p_avail_x : std_logic;\r
+signal p_really_x : std_logic;\r
\r
signal fifo_data_i : std_logic_vector(18 downto 0);\r
signal fifo_data_o : std_logic_vector(18 downto 0);\r
attribute syn_hier : string;\r
attribute syn_hier of trb_net_sbuf5_arch : architecture is "flatten, firm";\r
\r
+--attribute syn_noprune : boolean;\r
+--attribute syn_noprune of THE_DBG_REG : label is true;\r
+--signal my_debug : std_logic_vector(26 downto 0);\r
+\r
begin\r
\r
+\r
+---------------------------------------------------------------------\r
+-- VHDL / Synplify workaround for fixed nodes... creepy.\r
+---------------------------------------------------------------------\r
+--THE_DBG_REG: dbg_reg\r
+--generic map(\r
+-- WIDTH => 27\r
+--)\r
+--port map(\r
+-- DEBUG_IN => my_debug,\r
+-- DEBUG_OUT => open\r
+--);\r
+--\r
+--my_debug(8 downto 4) <= fifo_wcnt;\r
+--my_debug(3 downto 0) <= bsm;\r
+---------------------------------------------------------------------\r
+---------------------------------------------------------------------\r
+\r
---------------------------------------------------------------------\r
-- I/O\r
---------------------------------------------------------------------\r
AlmostFull => fifo_almostfull --open\r
);\r
\r
-p_wait_x <= '1' when (unsigned(fifo_wcnt) > x"0") else '0';\r
-p_avail_x <= '1' when ((unsigned(fifo_wcnt) >= x"2") and (COMB_DATAREADY_IN = '1')) or\r
+p_wait_x <= '1' when (unsigned(fifo_wcnt) > x"0") else '0';\r
+p_avail_x <= '1' when ((unsigned(fifo_wcnt) >= x"2") and (COMB_DATAREADY_IN = '1')) or\r
(unsigned(fifo_wcnt) >= x"3")\r
- else '0';\r
+ else '0';\r
+p_really_x <= '1' when (unsigned(fifo_wcnt) >= x"3") else '0';\r
\r
-- was 3 and 4\r
\r
end process STATE_MEM;\r
\r
-- state transitions\r
-STATE_TRANSFORM: process( CURRENT_STATE, p_wait_x, p_avail_x, SYN_READ_IN, syn_dataready, COMB_DATAREADY_IN )\r
+STATE_TRANSFORM: process( CURRENT_STATE, p_wait_x, p_avail_x, p_really_x, SYN_READ_IN, syn_dataready, COMB_DATAREADY_IN )\r
begin\r
NEXT_STATE <= IDLE; -- avoid latches\r
fifo_rd_en_x <= '0';\r
else\r
NEXT_STATE <= RD5;\r
end if;\r
- when WR5 => if( (SYN_READ_IN = '1') and (p_avail_x = '1') ) then\r
+ when WR5 => if( (SYN_READ_IN = '1') and (p_really_x = '1') ) then\r
NEXT_STATE <= RD2;\r
fifo_rd_en_x <= '1';\r
--syn_dataready_x <= '1';\r