- added command fifo for xfer unit
- completed first version of receiver Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@811 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -73,8 +73,9 @@ registers_write:
|
||||
if rising_edge(CLK_I) then
|
||||
if_rdy <= '1';
|
||||
tx_ctrl_in.data_vld <= '0';
|
||||
tx_ctrl_in.alloc_req_size_vld <= '0';
|
||||
tx_ctrl_in.alloc_req_en <= '0';
|
||||
tx_ctrl_in.tx_size_vld <= '0';
|
||||
tx_ctrl_in.tx_req_en <= '0';
|
||||
rx_ctrl_in.uncommit <= '0';
|
||||
if RST_I = '1' then
|
||||
rx_int_en <= '0';
|
||||
tx_int_en <= '0';
|
||||
@@ -84,18 +85,19 @@ registers_write:
|
||||
|
||||
when "0000" =>
|
||||
tx_ctrl_in.tx_er <= DAT_I(31);
|
||||
tx_ctrl_in.alloc_req_en <= DAT_I(16);
|
||||
tx_ctrl_in.tx_req_en <= DAT_I(17);
|
||||
rx_ctrl_in.uncommit <= DAT_I(16);
|
||||
tx_int_en <= DAT_I(5);
|
||||
rx_int_en <= DAT_I(4);
|
||||
|
||||
when "0001" =>
|
||||
if_rdy <= '0'; -- allow request size to propagate inside TX module
|
||||
tx_ctrl_in.alloc_req_size_vld <= '1';
|
||||
tx_din <= X"0000" & DAT_I(31 downto 16);
|
||||
tx_ctrl_in.tx_size_vld <= '1';
|
||||
tx_din <= X"0000" & DAT_I(31 downto 16);
|
||||
|
||||
when "0010" =>
|
||||
tx_ctrl_in.data_vld <= '1';
|
||||
tx_din <= DAT_I;
|
||||
tx_ctrl_in.data_vld <= '1';
|
||||
tx_din <= DAT_I;
|
||||
|
||||
when others => null;
|
||||
end case;
|
||||
@@ -107,26 +109,31 @@ registers_read:
|
||||
process(CLK_I)
|
||||
begin
|
||||
if rising_edge(CLK_I) then
|
||||
ACK_O <= '0';
|
||||
rx_ctrl_in.data_read <= '0';
|
||||
ACK_O <= rx_ctrl_out.data_vld;
|
||||
DAT_O <= rx_dout;
|
||||
if (STB_I and CYC_I) = '1' then
|
||||
ACK_O <= not WE_I;
|
||||
DAT_O <= (others => '0');
|
||||
case ADDR_I(5 downto 2) is
|
||||
|
||||
when "0000" =>
|
||||
DAT_O <= (others => '0');
|
||||
ACK_O <= not WE_I;
|
||||
DAT_O(31) <= tx_ctrl_in.tx_er;
|
||||
DAT_O(30) <= mii_rx_er;
|
||||
DAT_O(29) <= mii_col;
|
||||
DAT_O(28) <= mii_crs;
|
||||
DAT_O(16) <= tx_ctrl_out.alloc_req;
|
||||
DAT_O(17) <= tx_ctrl_out.tx_req;
|
||||
DAT_O(16) <= rx_ctrl_out.rx_vld;
|
||||
DAT_O(5) <= tx_int_en;
|
||||
DAT_O(4) <= rx_int_en;
|
||||
|
||||
when "0001" =>
|
||||
DAT_O(31 downto 16) <= tx_ctrl_out.alloc_req_size(15 downto 0);
|
||||
ACK_O <= not WE_I;
|
||||
DAT_O <= tx_ctrl_out.tx_size & rx_ctrl_out.rx_size;
|
||||
|
||||
when "0010" =>
|
||||
|
||||
rx_ctrl_in.data_read <= not WE_I;
|
||||
|
||||
when others => null;
|
||||
end case;
|
||||
end if;
|
||||
|
||||
Reference in New Issue
Block a user