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

Subversion Repositories udp_ip_stack

[/] [udp_ip_stack/] [trunk/] [rtl/] [vhdl/] [arp_RX.vhd] - Diff between revs 28 and 33

Show entire file | Details | Blame | View Log

Rev 28 Rev 33
Line 211... Line 211...
              rx_count_mode <= RST;
              rx_count_mode <= RST;
              set_rx_state  <= '1';
              set_rx_state  <= '1';
            --else
            --else
            end if;
            end if;
                                        -- check for end of frame. Also, detect and discard if not our frame
                                        -- check for end of frame. Also, detect and discard if not our frame
              if rx_count = 41 then     -- TB 2013-01-14 15:09:45 was 42
            if not_our_arp(data_in, rx_count, our_ip_address) = '1' then
                next_rx_state <= PROCESS_ARP;
 
                set_rx_state  <= '1';
 
              elsif not_our_arp(data_in, rx_count, our_ip_address) = '1' then
 
                dataval       <= data_in;
                dataval       <= data_in;
                set_err_data  <= '1';
                set_err_data  <= '1';
                next_rx_state <= WAIT_END;
                next_rx_state <= WAIT_END;
                set_rx_state  <= '1';
                set_rx_state  <= '1';
              elsif rx_count = 21 then
 
                                        -- capture ARP operation
            else
                case data_in is
              case (to_integer(rx_count)) is
 
                when 41 =>
 
                  next_rx_state <= PROCESS_ARP;
 
                  set_rx_state  <= '1';
 
                when 21 =>       -- capture ARP operation
 
                  case (data_in) is
                  when x"01" =>
                  when x"01" =>
                    arp_oper_set_val <= REQUEST;
                    arp_oper_set_val <= REQUEST;
                    set_arp_oper     <= '1';
                    set_arp_oper     <= '1';
                  when x"02" =>
                  when x"02" =>
                    arp_oper_set_val <= REPLY;
                    arp_oper_set_val <= REPLY;
                    set_arp_oper     <= '1';
                    set_arp_oper     <= '1';
                  when others =>        -- ignore other values
                  when others =>        -- ignore other values
                end case;
                end case;
                                        -- capture source mac addr
                                        -- capture source mac addr
              elsif rx_count = 22 then
                when 22 =>
                set_mac5 <= '1';
                set_mac5 <= '1';
                dataval  <= data_in;
                dataval  <= data_in;
              elsif rx_count = 23 then
                when 23 =>
                set_mac4 <= '1';
                set_mac4 <= '1';
                dataval  <= data_in;
                dataval  <= data_in;
              elsif rx_count = 24 then
                when 24 =>
                set_mac3 <= '1';
                set_mac3 <= '1';
                dataval  <= data_in;
                dataval  <= data_in;
              elsif rx_count = 25 then
                when 25 =>
                set_mac2 <= '1';
                set_mac2 <= '1';
                dataval  <= data_in;
                dataval  <= data_in;
              elsif rx_count = 26 then
                when 26 =>
                set_mac1 <= '1';
                set_mac1 <= '1';
                dataval  <= data_in;
                dataval  <= data_in;
              elsif rx_count = 27 then
                when 27 =>
                set_mac0 <= '1';
                set_mac0 <= '1';
                dataval  <= data_in;
                dataval  <= data_in;
                                        -- capture source ip addr
                when 28 =>              -- capture source ip addr
              elsif rx_count = 28 then
 
                set_ip3 <= '1';
                set_ip3 <= '1';
                dataval <= data_in;
                dataval <= data_in;
              elsif rx_count = 29 then
                when 29 =>
                set_ip2 <= '1';
                set_ip2 <= '1';
                dataval <= data_in;
                dataval <= data_in;
              elsif rx_count = 30 then
                when 30 =>
                set_ip1 <= '1';
                set_ip1 <= '1';
                dataval <= data_in;
                dataval <= data_in;
              elsif rx_count = 31 then
                when 31 =>
                set_ip0 <= '1';
                set_ip0 <= '1';
                dataval <= data_in;
                dataval <= data_in;
 
                when others =>  -- do nothing
 
              end case;
              end if;
              end if;
--            end if;
--            end if;
        end case;
        end case;
 
 
      when PROCESS_ARP =>
      when PROCESS_ARP =>

powered by: WebSVN 2.1.0

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