OpenCores
URL https://opencores.org/ocsvn/udp_ip_stack/udp_ip_stack/trunk

Subversion Repositories udp_ip_stack

[/] [udp_ip_stack/] [trunk/] [rtl/] [vhdl/] [IPv4_TX.vhd] - Diff between revs 2 and 4

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 4
Line 16... Line 16...
-- Dependencies: 
-- Dependencies: 
--
--
-- Revision: 
-- Revision: 
-- Revision 0.01 - File Created
-- Revision 0.01 - File Created
-- Revision 0.02 - fixed up setting of tx_result control defaults
-- Revision 0.02 - fixed up setting of tx_result control defaults
 
-- Revision 0.03 - Added data_out_first
-- Additional Comments: 
-- Additional Comments: 
--
--
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
library IEEE;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_1164.ALL;
Line 47... Line 48...
                        -- MAC layer TX signals
                        -- MAC layer TX signals
                        mac_tx_req                              : out std_logic;                                                                        -- indicates that ip wants access to channel (stays up for as long as tx)
                        mac_tx_req                              : out std_logic;                                                                        -- indicates that ip wants access to channel (stays up for as long as tx)
                        mac_tx_granted                  : in std_logic;                                                                 -- indicates that access to channel has been granted            
                        mac_tx_granted                  : in std_logic;                                                                 -- indicates that access to channel has been granted            
                        mac_data_out_ready      : in std_logic;                                                                 -- indicates system ready to consume data
                        mac_data_out_ready      : in std_logic;                                                                 -- indicates system ready to consume data
                        mac_data_out_valid      : out std_logic;                                                                -- indicates data out is valid
                        mac_data_out_valid      : out std_logic;                                                                -- indicates data out is valid
 
                        mac_data_out_first      : out std_logic;                                                                        -- with data out valid indicates the first byte of a frame
                        mac_data_out_last               : out std_logic;                                                                        -- with data out valid indicates the last byte of a frame
                        mac_data_out_last               : out std_logic;                                                                        -- with data out valid indicates the last byte of a frame
                        mac_data_out                    : out std_logic_vector (7 downto 0)              -- ethernet frame (from dst mac addr through to last byte of frame)      
                        mac_data_out                    : out std_logic_vector (7 downto 0)              -- ethernet frame (from dst mac addr through to last byte of frame)      
                        );
                        );
end IPv4_TX;
end IPv4_TX;
 
 
Line 170... Line 172...
                ip_tx_result <= tx_result_reg;
                ip_tx_result <= tx_result_reg;
                mac_tx_req <= tx_mac_chn_reqd;
                mac_tx_req <= tx_mac_chn_reqd;
                arp_req_req.lookup_req <= mac_lookup_req;
                arp_req_req.lookup_req <= mac_lookup_req;
                arp_req_req.ip <= arp_req_ip_reg;
                arp_req_req.ip <= arp_req_ip_reg;
 
 
 
                -- set initial values for combinatorial outputs
 
                mac_data_out_first <= '0';
 
 
                case tx_state is
                case tx_state is
                        when SEND_ETH_HDR | SEND_IP_HDR =>
                        when SEND_ETH_HDR | SEND_IP_HDR =>
                                mac_data_out <= tx_data;
                                mac_data_out <= tx_data;
                                tx_data_valid <= mac_data_out_ready;    -- generated internally
                                tx_data_valid <= mac_data_out_ready;    -- generated internally
                                mac_data_out_last <= set_last;
                                mac_data_out_last <= set_last;
Line 274... Line 279...
                                                set_tx_state <= '1';
                                                set_tx_state <= '1';
                                        else
                                        else
                                                tx_count_mode <= INCR;
                                                tx_count_mode <= INCR;
                                        end if;
                                        end if;
                                        case tx_count is
                                        case tx_count is
                                                when x"000"  => tx_data <= tx_mac (47 downto 40);                       -- trg = mac from ARP lookup
                                                when x"000"  =>
 
                                                        mac_data_out_first <= mac_data_out_ready;
 
                                                        tx_data <= tx_mac (47 downto 40);                       -- trg = mac from ARP lookup                                            
 
 
                                                when x"001"  => tx_data <= tx_mac (39 downto 32);
                                                when x"001"  => tx_data <= tx_mac (39 downto 32);
                                                when x"002"  => tx_data <= tx_mac (31 downto 24);
                                                when x"002"  => tx_data <= tx_mac (31 downto 24);
                                                when x"003"  => tx_data <= tx_mac (23 downto 16);
                                                when x"003"  => tx_data <= tx_mac (23 downto 16);
                                                when x"004"  => tx_data <= tx_mac (15 downto 8);
                                                when x"004"  => tx_data <= tx_mac (15 downto 8);
                                                when x"005"  => tx_data <= tx_mac (7 downto 0);
                                                when x"005"  => tx_data <= tx_mac (7 downto 0);
Line 381... Line 389...
                                tx_state <= IDLE;
                                tx_state <= IDLE;
                                tx_count <= x"000";
                                tx_count <= x"000";
                                tx_result_reg <= IPTX_RESULT_NONE;
                                tx_result_reg <= IPTX_RESULT_NONE;
                                tx_mac <= (others => '0');
                                tx_mac <= (others => '0');
                                tx_mac_chn_reqd <= '0';
                                tx_mac_chn_reqd <= '0';
 
                                mac_lookup_req <= '0';
 
 
                        else
                        else
                                -- Next tx_state processing
                                -- Next tx_state processing
                                if set_tx_state = '1' then
                                if set_tx_state = '1' then
                                        tx_state <= next_tx_state;
                                        tx_state <= next_tx_state;
                                else
                                else

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.