attribute nopad : string;
attribute nopad of hdinp, hdinn, hdoutp, hdoutn : signal is "true";
+type u8_arr is array (0 to 3) of unsigned(7 downto 0);
+signal cv_cnt, cv_cnt_sys : u8_arr;
+
begin
SD_TXDIS_OUT <= (others =>'0'); --not (rx_allow_q or not IS_SLAVE); --slave only switches on when RX is ready
DEBUG_RX_CONTROL => debug_rx_control_i(i*32+31 downto i*32),
STAT_RESET => stat_fsm_reset_i(i*32+31 downto i*32)
);
+
+ cv_cnt(i) <= cv_cnt(i) + 1 when rx_error(i) = '1' and rising_edge(clk_rx_full(i));
end generate;
gen_not_used : if IS_USED(i) = c_NO generate
MEDIA_MED2INT(i).tx_read <= '1';
MEDIA_MED2INT(i).stat_op <= x"0007";
end generate;
+
end generate;
THE_SCI_READER : entity work.sci_reader
MEDIA_STATUS_REG_IN(31 downto 0) => stat_rx_control_i(31 downto 0),
MEDIA_STATUS_REG_IN(63 downto 32) => stat_tx_control_i(31 downto 0),
MEDIA_STATUS_REG_IN(191 downto 64) => stat_fsm_reset_i(127 downto 0),
- MEDIA_STATUS_REG_IN(255 downto 192) => (others => '0'),
+ MEDIA_STATUS_REG_IN(199 downto 192) => cv_cnt_sys(0),
+ MEDIA_STATUS_REG_IN(207 downto 200) => cv_cnt_sys(1),
+ MEDIA_STATUS_REG_IN(215 downto 208) => cv_cnt_sys(2),
+ MEDIA_STATUS_REG_IN(223 downto 216) => cv_cnt_sys(3),
+
+ MEDIA_STATUS_REG_IN(255 downto 224) => (others => '0'),
DEBUG_OUT => open
);
+cv_cnt_sys <= cv_cnt when rising_edge(SYSCLK);
+
wa_position <= (others => '0');
STAT_DEBUG(13 downto 0) <= debug_tx_control_i(13 downto 0);