]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
DHCP works now with ne frame receiver. Bug fixed: pauses in MAC data stream not handled.
authorMichael Boehmer <mboehmer@ph.tum.de>
Mon, 7 Nov 2022 19:41:40 +0000 (20:41 +0100)
committerMichael Boehmer <mboehmer@ph.tum.de>
Mon, 7 Nov 2022 19:41:40 +0000 (20:41 +0100)
gbe_trb/base/gbe_frame_receiver.vhd
gbe_trb/base/gbe_logic_wrapper.vhd
gbe_trb/base/gbe_main_control.vhd
gbe_trb/base/gbe_protocol_selector.vhd
gbe_trb/protocols/gbe_response_constructor_DHCP.vhd
gbe_trb/protocols/gbe_response_constructor_Forward.vhd

index c2120581839b913fe3ae60249a7897a5d594ff8e..a805030eb56c6f3d39f81599c9cebc25c3e9b422 100644 (file)
@@ -83,7 +83,7 @@ architecture gbe_frame_receiver_arch of gbe_frame_receiver is
   signal stored_src_port                     : std_logic_vector(15 downto 0);\r
   signal stored_dst_port                     : std_logic_vector(15 downto 0);\r
 \r
-  signal fifo_pl_wr_x                        : std_logic;\r
+--  signal fifo_pl_wr_x                        : std_logic;\r
   signal fifo_pl_wr                          : std_logic;\r
   signal fifo_hd_wr_x                        : std_logic;\r
   signal fifo_hd_wr                          : std_logic;\r
@@ -117,6 +117,8 @@ architecture gbe_frame_receiver_arch of gbe_frame_receiver is
   signal drop_frame_x                        : std_logic;\r
   signal drop_frame                          : std_logic;\r
 \r
+  signal fifo_wr_en                          : std_logic;\r
+\r
 begin\r
 \r
   -- buffer incoming signals\r
@@ -132,13 +134,13 @@ begin
   begin\r
     if   ( RESET = '1' ) then\r
       DECODE_CS <= IDLE;\r
-        fifo_pl_wr <= '0';\r
+--        fifo_pl_wr <= '0';\r
         fifo_hd_wr <= '0';\r
         drop_frame <= '0';\r
         rst_bytes  <= '1';\r
     elsif( rising_edge(CLK) ) then\r
       DECODE_CS <= DECODE_NS;\r
-      fifo_pl_wr <= fifo_pl_wr_x;\r
+--      fifo_pl_wr <= fifo_pl_wr_x;\r
       fifo_hd_wr <= fifo_hd_wr_x;\r
       drop_frame <= drop_frame_x;\r
       rst_bytes  <= rst_bytes_x;\r
@@ -149,7 +151,7 @@ begin
                                      is_my_mac_x, is_broadcast_x, is_arp_x, is_ipv4_x, is_udp_x,\r
                                      is_version_x, is_sctrl_x, is_icmp_x )\r
   begin\r
-    fifo_pl_wr_x <= '0';\r
+--    fifo_pl_wr_x <= '0';\r
     fifo_hd_wr_x <= '0';\r
     drop_frame_x <= '0';\r
     rst_bytes_x <= '0';\r
@@ -181,7 +183,7 @@ begin
               if( (mac_rx_eof_q = '0') ) then\r
                 -- payload available, store it\r
                 DECODE_NS <= STORE_FRAME;\r
-                fifo_pl_wr_x <= '1';\r
+--                fifo_pl_wr_x <= '1';\r
               else\r
                 -- empty payload, must never happen with ARP, so we drop it\r
                 DECODE_NS <= LAST_BYTE;\r
@@ -196,7 +198,7 @@ begin
                 if( (mac_rx_eof_q = '0') ) then\r
                   -- payload available\r
                   DECODE_NS <= STORE_FRAME;\r
-                  fifo_pl_wr_x <= '1';\r
+--                  fifo_pl_wr_x <= '1';\r
                 else\r
                   -- empty payload, must never happen with ICMP, so we drop it\r
                   DECODE_NS <= LAST_BYTE;\r
@@ -214,7 +216,7 @@ begin
                   if( (mac_rx_eof_q = '0') ) then\r
                     -- payload available\r
                     DECODE_NS <= STORE_FRAME;\r
-                    fifo_pl_wr_x <= '1';\r
+--                    fifo_pl_wr_x <= '1';\r
                   else\r
                     -- empty payload, store raw frame, check that later?\r
                     DECODE_NS <= LAST_BYTE;\r
@@ -255,7 +257,7 @@ begin
 \r
       when STORE_FRAME =>\r
         decode_fsm <= x"3";\r
-        fifo_pl_wr_x <= '1';\r
+--        fifo_pl_wr_x <= '1';\r
         if( MAC_RX_EOF_IN = '1' ) then\r
           DECODE_NS <= LAST_BYTE;\r
           fifo_hd_wr_x <= '1';\r
@@ -285,19 +287,51 @@ begin
     end case;\r
   end process PROC_DECODE_TRANSITIONS;\r
 \r
-  -- counter for decoding the byte stream\r
-  PROC_DECODE_CTR: process( CLK, RESET )\r
-  begin\r
-    if   ( RESET = '1' ) then\r
-      decode_ctr <= (others => '0');\r
+--  -- counter for decoding the byte stream\r
+--  PROC_DECODE_CTR: process( CLK, RESET )\r
+--  begin\r
+--    if   ( RESET = '1' ) then\r
+--      decode_ctr <= (others => '0');\r
+--    elsif( rising_edge(CLK) ) then\r
+--      if( (DECODE_CS = STORE_HEADER) or (DECODE_CS = STORE_FRAME) ) then\r
+--        decode_ctr <= decode_ctr + 1;\r
+--      else\r
+--        decode_ctr <= (others => '0');\r
+--      end if;\r
+--    end if;\r
+--  end process PROC_DECODE_CTR;\r
+\r
+  -- counter for decoding the byte stream
+  PROC_DECODE_CTR: process( CLK, RESET )
+  begin
+    if   ( RESET = '1' ) then
+      decode_ctr <= (others => '0');
     elsif( rising_edge(CLK) ) then\r
-      if( (DECODE_CS = STORE_HEADER) or (DECODE_CS = STORE_FRAME) ) then\r
-        decode_ctr <= decode_ctr + 1;\r
-      else\r
-        decode_ctr <= (others => '0');\r
-      end if;\r
-    end if;\r
-  end process PROC_DECODE_CTR;\r
+      if   ( (DECODE_CS /= STORE_HEADER) and (DECODE_CS /= STORE_FRAME) ) then\r
+        decode_ctr <= (others => '0');
+      elsif( ((DECODE_CS = STORE_HEADER) or (DECODE_CS = STORE_FRAME)) and (MAC_RX_EN_IN = '1') ) then
+        decode_ctr <= decode_ctr + 1;
+      end if;
+    end if;
+  end process PROC_DECODE_CTR;
+\r
+  -- write only if data stream is available!\r
+  PROC_RX_FIFO_SYNC: process( CLK )
+  begin
+    if( rising_edge(CLK) ) then
+      if( MAC_RX_EN_IN = '1' ) then
+        if   ( DECODE_NS = STORE_FRAME ) then
+          fifo_pl_wr <= '1';
+        elsif( (DECODE_CS = STORE_FRAME) and (DECODE_NS = LAST_BYTE) ) then
+          fifo_pl_wr <= '1';
+        else
+          fifo_pl_wr <= '0';
+        end if;
+      else
+        fifo_pl_wr <= '0';
+      end if;
+    end if;
+  end process PROC_RX_FIFO_SYNC;\r
 \r
   -- storing the relevant parts of headers for decision and further usage\r
   PROC_STORE_INFO: process( CLK, RESET )\r
@@ -313,13 +347,14 @@ begin
       stored_src_port <= (others => '0');\r
       stored_dst_port <= (others => '0');\r
     elsif( rising_edge(CLK) ) then\r
-      if( (MAC_RX_EN_IN = '1') and (mac_rx_en_q = '0') ) then\r
-        -- early bird\r
-        stored_dst_mac(7 downto 0) <= MAC_RXD_IN;\r
-      end if;\r
+--      if( (MAC_RX_EN_IN = '1') and (mac_rx_en_q = '0') ) then\r
+--        -- early bird\r
+--        stored_dst_mac(7 downto 0) <= MAC_RXD_IN; -- FUCKING BUG!!!!\r
+--      end if;\r
       if( (mac_rx_en_q = '1') and (DECODE_CS = STORE_HEADER) ) then\r
         case decode_ctr is\r
           when x"00" => stored_dst_mac(15 downto 8)   <= MAC_RXD_IN;\r
+                        stored_dst_mac(7 downto 0)    <= mac_rxd_q;\r
           when x"01" => stored_dst_mac(23 downto 16)  <= MAC_RXD_IN;\r
           when x"02" => stored_dst_mac(31 downto 24)  <= MAC_RXD_IN;\r
           when x"03" => stored_dst_mac(39 downto 32)  <= MAC_RXD_IN;\r
@@ -425,7 +460,7 @@ begin
   -- CAVEAT: writing to FIFO and reading needs some clock cycles?\r
   -- Three is fine, two fails - data arrives late.\r
   -- Happens when main control tries to read a frame directly when it was written.\r
-  \r
+\r
   -- FIFO for header information\r
   THE_FIRST_FIFO: entity work.fifo_512x72\r
   port map(\r
index deab0cfca026b30820816fb651fe66a0ca527911..5fa5cc86b552ea9d48097b2147367ac56d4b5367 100644 (file)
@@ -162,24 +162,25 @@ architecture gbe_logic_wrapper_arch of gbe_logic_wrapper is
 
 ---------------------------------------------------------------------------------------------------
 ---------------------------------------------------------------------------------------------------
---  DEBUG_OUT(31 downto 0)  <= (others => '0');
-  DEBUG_OUT(31 downto 28) <= debug_fr(31 downto 28); -- frame receiver state
-  DEBUG_OUT(27 downto 24) <= debug_rc(3 downto 0); -- receive control state
-  DEBUG_OUT(23 downto 20) <= debug_main(23 downto 20); -- redirect state
-  DEBUG_OUT(19 downto 16) <= fr_ps_int(3 downto 0); --debug_main(27 downto 24); -- link state
-  DEBUG_OUT(15)           <= rc_loading_done;
-  DEBUG_OUT(14)           <= rc_frame_ready;
-  DEBUG_OUT(13)           <= fr_ps_int(4); --rc_frame_proto(4); -- ICMP
-  DEBUG_OUT(12)           <= fr_ps_int(1); --rc_frame_proto(1); -- DHCP
-  DEBUG_OUT(11)           <= fr_ps_int(0); --rc_frame_proto(0); -- ARP
-  DEBUG_OUT(10)           <= fr_get_frame;
-  DEBUG_OUT(9)            <= fr_frame_valid;
-  DEBUG_OUT(8)            <= fr_rd_en;
-  DEBUG_OUT(7 downto 0)   <= rc_q(7 downto 0);
+----  DEBUG_OUT(31 downto 0)  <= (others => '0');
+--  DEBUG_OUT(31 downto 28) <= debug_fr(31 downto 28); -- frame receiver state
+--  DEBUG_OUT(27 downto 24) <= debug_rc(3 downto 0); -- receive control state
+--  DEBUG_OUT(23 downto 20) <= debug_main(23 downto 20); -- redirect state
+--  DEBUG_OUT(19 downto 16) <= fr_ps_int(3 downto 0); --debug_main(27 downto 24); -- link state
+--  DEBUG_OUT(15)           <= rc_loading_done;
+--  DEBUG_OUT(14)           <= rc_frame_ready;
+--  DEBUG_OUT(13)           <= fr_ps_int(4); --rc_frame_proto(4); -- ICMP
+--  DEBUG_OUT(12)           <= fr_ps_int(1); --rc_frame_proto(1); -- DHCP
+--  DEBUG_OUT(11)           <= fr_ps_int(0); --rc_frame_proto(0); -- ARP
+--  DEBUG_OUT(10)           <= fr_get_frame;
+--  DEBUG_OUT(9)            <= fr_frame_valid;
+--  DEBUG_OUT(8)            <= fr_rd_en;
+--  DEBUG_OUT(7 downto 0)   <= rc_q(7 downto 0);
 ---------------------------------------------------------------------------------------------------
 ---------------------------------------------------------------------------------------------------
 --  DEBUG_OUT(31 downto 28)  <= debug_fr(31 downto 28); 
 --  DEBUG_OUT(27 downto 0)   <= debug_main(27 downto 0);
+  DEBUG_OUT(31 downto 0)   <= debug_main(31 downto 0);
 ---------------------------------------------------------------------------------------------------
 ---------------------------------------------------------------------------------------------------
 
index 2d668f4b7bdae1eca46580d4aceb07c4093b4a31..bc611436149535d4e7a0325bf1959b9ca2a5e447 100644 (file)
@@ -149,12 +149,13 @@ begin
   -----------------------------------------------------------------------\r
   -- Debug signals\r
   -----------------------------------------------------------------------\r
-  DEBUG_OUT(63 downto 28)  <= (others => '0');\r
-\r
-  DEBUG_OUT(27 downto 24) <= link_state;\r
-  DEBUG_OUT(23 downto 20) <= redirect_state;\r
-  DEBUG_OUT(19 downto 16) <= flow_state;\r
-  DEBUG_OUT(15 downto 0)  <= selector_debug(15 downto 0);\r
+--  DEBUG_OUT(63 downto 28)  <= (others => '0');\r
+--  DEBUG_OUT(27 downto 24) <= link_state;\r
+--  DEBUG_OUT(23 downto 20) <= redirect_state;\r
+--  DEBUG_OUT(19 downto 16) <= flow_state;\r
+--  DEBUG_OUT(15 downto 0)  <= selector_debug(15 downto 0);\r
+  DEBUG_OUT(63 downto 32) <= (others => '0');\r
+  DEBUG_OUT(31 downto 0)  <= selector_debug(31 downto 0);\r
 \r
   -----------------------------------------------------------------------\r
   -- Link state machine, high level. Handles DHCP basically\r
index 27cb48ae588685317003ada2983e22e5d932361c..86b6c6d311ed3fedc22cbc551544d23669d82c81 100644 (file)
@@ -133,9 +133,11 @@ begin
   MY_IP_OUT <= my_ip;
 
   -- Debug lines
-  DEBUG_OUT(63 downto 16) <= (others => '0');
-  DEBUG_OUT(15 downto 12) <= state; -- selector state
-  DEBUG_OUT(11 downto 0)  <= debug_dhcp(11 downto 0); -- FSM states DHCP
+--  DEBUG_OUT(63 downto 16) <= (others => '0');
+--  DEBUG_OUT(15 downto 12) <= state; -- selector state
+--  DEBUG_OUT(11 downto 0)  <= debug_dhcp(11 downto 0); -- FSM states DHCP
+  DEBUG_OUT(63 downto 32) <= (others => '0');
+  DEBUG_OUT(31 downto 0)  <= debug_dhcp(31 downto 0);
 
   ARP_GEN: if( INCLUDE_ARP = '1' ) generate
     -- protocol Nr. 1 ARP
index f7c82c9c1f232e953545a19875e28e83d88fd429..55ea20e2e4dad028db5fa0512b771f8be0b4562e 100644 (file)
@@ -63,11 +63,7 @@ architecture gbe_response_constructor_DHCP_arch of gbe_response_constructor_DHCP
   signal CONSTRUCT_CS, CONSTRUCT_NS : discover_states;\r
   attribute syn_encoding of CONSTRUCT_CS: signal is "onehot";\r
 \r
---  type stats_states is (IDLE, LOAD_SENT, LOAD_RECEIVED, LOAD_DISCARDED, CLEANUP);\r
---  signal STATS_CS, STATS_NS : stats_states;\r
---  attribute syn_encoding of STATS_CS : signal is "onehot";\r
-\r
-  signal state                    : std_logic_vector(3 downto 0);\r
+  signal cons_state               : std_logic_vector(3 downto 0);\r
   signal rec_frames               : std_logic_vector(15 downto 0);\r
   signal sent_frames              : unsigned(15 downto 0);\r
 \r
@@ -88,8 +84,8 @@ architecture gbe_response_constructor_DHCP_arch of gbe_response_constructor_DHCP
   signal your_ip_reg              : std_logic_vector(31 downto 0);\r
   signal saved_server_mac         : std_logic_vector(47 downto 0);\r
   signal saved_server_ip          : std_logic_vector(31 downto 0);\r
-  signal state2                   : std_logic_vector(3 downto 0);\r
-  signal state3                   : std_logic_vector(3 downto 0);\r
+  signal main_state               : std_logic_vector(3 downto 0);\r
+  signal recv_state               : std_logic_vector(3 downto 0);\r
   signal vendor_values2           : std_logic_vector(47 downto 0);\r
 \r
   signal discarded_ctr            : std_logic_vector(15 downto 0);\r
@@ -98,13 +94,22 @@ architecture gbe_response_constructor_DHCP_arch of gbe_response_constructor_DHCP
 \r
   attribute syn_preserve : boolean;\r
   attribute syn_keep : boolean;\r
-  attribute syn_keep of state, state2 : signal is true;\r
-  attribute syn_preserve of state, state2 : signal is true;\r
+  attribute syn_keep of cons_state, main_state, recv_state : signal is true;\r
+  attribute syn_preserve of cons_state, main_state, recv_state : signal is true;\r
 \r
   signal wait_value : unsigned(31 downto 0);\r
 \r
 begin\r
 \r
+  DEBUG_OUT(31 downto 28) <= main_state;\r
+  DEBUG_OUT(27 downto 24) <= recv_state;\r
+  DEBUG_OUT(23 downto 20) <= cons_state;\r
+  DEBUG_OUT(19 downto 12) <= PS_DEST_MAC_ADDRESS_IN(7 downto 0);\r
+  DEBUG_OUT(11)           <= '0';\r
+  DEBUG_OUT(10)           <= PS_WR_EN_IN;\r
+  DEBUG_OUT(9)            <= PS_ACTIVATE_IN;\r
+  DEBUG_OUT(8 downto 0)   <= PS_DATA_IN;\r
+\r
   -- ****\r
   -- fixing the constant values for DHCP request headers\r
   TC_DEST_MAC_OUT               <= x"ffffffffffff" when (MAIN_CS = BOOTING or MAIN_CS = SENDING_DISCOVER) else saved_server_mac;\r
@@ -165,12 +170,12 @@ begin
 \r
   PROC_MAIN_TRANSITIONS : process( MAIN_CS, DHCP_START_IN, CONSTRUCT_CS, wait_ctr, RECEIVE_CS, PS_DATA_IN, wait_value )\r
   begin\r
-    state2 <= x"0";\r
+    main_state <= x"0";\r
 \r
     case (MAIN_CS) is\r
 \r
       when BOOTING =>\r
-        state2 <= x"1";\r
+        main_state <= x"1";\r
         if( DHCP_START_IN = '1' ) then\r
           MAIN_NS <= DELAY;\r
         else\r
@@ -178,7 +183,7 @@ begin
         end if;\r
 \r
       when DELAY =>\r
-        state2 <= x"2";\r
+        main_state <= x"2";\r
         if( wait_ctr = wait_value ) then\r
           MAIN_NS <= SENDING_DISCOVER;\r
         else\r
@@ -186,7 +191,7 @@ begin
         end if;\r
 \r
       when SENDING_DISCOVER =>\r
-        state2 <= x"3";\r
+        main_state <= x"3";\r
         if( CONSTRUCT_CS = CLEANUP ) then\r
           MAIN_NS <= WAITING_FOR_OFFER;\r
         else\r
@@ -194,7 +199,7 @@ begin
         end if;\r
 \r
       when WAITING_FOR_OFFER =>\r
-        state2 <= x"4";\r
+        main_state <= x"4";\r
         if( (RECEIVE_CS = SAVE_VALUES) and (PS_DATA_IN(8) = '1') ) then\r
           MAIN_NS <= SENDING_REQUEST;\r
         elsif( wait_ctr = x"2000_0000" ) then\r
@@ -204,7 +209,7 @@ begin
         end if;\r
 \r
       when SENDING_REQUEST =>\r
-        state2 <= x"5";\r
+        main_state <= x"5";\r
         if( CONSTRUCT_CS = CLEANUP ) then\r
           MAIN_NS <= WAITING_FOR_ACK;\r
         else\r
@@ -212,7 +217,7 @@ begin
         end if;\r
 \r
       when WAITING_FOR_ACK =>\r
-        state2 <= x"6";\r
+        main_state <= x"6";\r
         if( (RECEIVE_CS = SAVE_VALUES) and (PS_DATA_IN(8) = '1') ) then\r
           MAIN_NS <= ESTABLISHED;\r
         elsif( wait_ctr = x"2000_0000" ) then\r
@@ -222,7 +227,7 @@ begin
         end if;\r
 \r
       when ESTABLISHED =>\r
-        state2 <= x"7";\r
+        main_state <= x"7";\r
           if( DHCP_START_IN = '0' ) then\r
             MAIN_NS <= BOOTING;\r
           else\r
@@ -265,12 +270,12 @@ begin
   PROC_RECEIVE_TRANSITIONS: process( RECEIVE_CS, MAIN_CS, bootp_hdr, saved_dhcp_type, saved_transaction_id,\r
                                      PS_DATA_IN, PS_DEST_MAC_ADDRESS_IN, MY_MAC_IN, PS_ACTIVATE_IN, PS_WR_EN_IN, save_ctr )\r
   begin\r
-    state3 <= x"0";\r
+    recv_state <= x"0";\r
 \r
     case RECEIVE_CS is\r
 \r
       when IDLE =>\r
-        state3 <= x"1";\r
+        recv_state <= x"1";\r
         if( (PS_ACTIVATE_IN = '1') and (PS_WR_EN_IN = '1') ) then\r
           if( (MAIN_CS = WAITING_FOR_OFFER) or (MAIN_CS = WAITING_FOR_ACK) ) then  -- ready to receive dhcp frame\r
             if( PS_DEST_MAC_ADDRESS_IN = MY_MAC_IN ) then -- check if i'm the addressee (discards broadcasts also)\r
@@ -286,7 +291,7 @@ begin
         end if;\r
 \r
       when SAVE_VALUES =>\r
-        state3 <= x"2";\r
+        recv_state <= x"2";\r
         if   ( PS_DATA_IN(8) = '1' ) then\r
           RECEIVE_NS <= CLEANUP;\r
         -- check if the same transaction\r
@@ -303,7 +308,7 @@ begin
         end if;\r
 \r
       when DISCARD =>\r
-        state3 <= x"3";\r
+        recv_state <= x"3";\r
         if( PS_DATA_IN(8) = '1' ) then\r
           RECEIVE_NS <= CLEANUP;\r
         else\r
@@ -311,7 +316,7 @@ begin
         end if;\r
 \r
       when CLEANUP =>\r
-        state3 <= x"4";\r
+        recv_state <= x"4";\r
         RECEIVE_NS <= IDLE;\r
 \r
       when others => \r
@@ -450,12 +455,12 @@ begin
 \r
   PROC_CONSTRUCT_TRANSITIONS: process( CONSTRUCT_CS, MAIN_CS, load_ctr, PS_SELECTED_IN )\r
   begin\r
-    state <= x"0";\r
+    cons_state <= x"0";\r
 \r
     case CONSTRUCT_CS is\r
 \r
       when IDLE =>\r
-        state <= x"1";\r
+        cons_state <= x"1";\r
         if( (MAIN_CS = SENDING_DISCOVER) or (MAIN_CS = SENDING_REQUEST) ) then\r
           CONSTRUCT_NS <= WAIT_FOR_LOAD;\r
         else\r
@@ -463,7 +468,7 @@ begin
         end if;\r
 \r
       when WAIT_FOR_LOAD =>\r
-        state <= x"2";\r
+        cons_state <= x"2";\r
         if( PS_SELECTED_IN = '1' ) then\r
           CONSTRUCT_NS <= BOOTP_HEADERS;\r
         else\r
@@ -471,7 +476,7 @@ begin
         end if;\r
 \r
       when BOOTP_HEADERS =>\r
-        state <= x"3";\r
+        cons_state <= x"3";\r
         if( load_ctr = 11 ) then\r
           CONSTRUCT_NS <= CLIENT_IP;\r
         else\r
@@ -479,7 +484,7 @@ begin
         end if;\r
 \r
       when CLIENT_IP =>\r
-        state <= x"4";\r
+        cons_state <= x"4";\r
         if( load_ctr = 15 ) then\r
           CONSTRUCT_NS <= YOUR_IP;\r
         else\r
@@ -487,7 +492,7 @@ begin
         end if;\r
 \r
       when YOUR_IP =>\r
-        state <= x"5";\r
+        cons_state <= x"5";\r
         if( load_ctr = 19 ) then\r
           CONSTRUCT_NS <= ZEROS1;\r
         else\r
@@ -495,7 +500,7 @@ begin
         end if;\r
 \r
       when ZEROS1 =>\r
-        state <= x"6";\r
+        cons_state <= x"6";\r
         if( load_ctr = 27 ) then\r
           CONSTRUCT_NS <= MY_MAC;\r
         else\r
@@ -503,7 +508,7 @@ begin
         end if;\r
 \r
       when MY_MAC =>\r
-        state <= x"7";\r
+        cons_state <= x"7";\r
         if( load_ctr = 33 ) then\r
           CONSTRUCT_NS <= ZEROS2;\r
         else\r
@@ -511,7 +516,7 @@ begin
         end if;\r
 \r
       when ZEROS2 =>\r
-        state <= x"8";\r
+        cons_state <= x"8";\r
         if( load_ctr = 235 ) then\r
           CONSTRUCT_NS <= VENDOR_VALS;\r
         else\r
@@ -519,7 +524,7 @@ begin
         end if;\r
 \r
       when VENDOR_VALS =>\r
-        state <= x"9";\r
+        cons_state <= x"9";\r
         if( load_ctr = 257 ) then\r
           -- for discover it's enough of values\r
           if( MAIN_CS = SENDING_DISCOVER ) then\r
@@ -533,7 +538,7 @@ begin
         end if;\r
 \r
       when VENDOR_VALS2 =>\r
-        state <= x"a";\r
+        cons_state <= x"a";\r
         if( load_ctr = 263 ) then\r
           CONSTRUCT_NS <= TERMINATION;\r
         else\r
@@ -541,11 +546,11 @@ begin
         end if;\r
 \r
       when TERMINATION =>\r
-        state <= x"b";\r
+        cons_state <= x"b";\r
         CONSTRUCT_NS <= CLEANUP;\r
 \r
       when CLEANUP =>\r
-        state <= x"c";\r
+        cons_state <= x"c";\r
         CONSTRUCT_NS <= IDLE;\r
 \r
       when others => \r
@@ -669,9 +674,9 @@ begin
 --  PROC_DEBUG: process( CLK )\r
 --  begin\r
 --    if( rising_edge(CLK) ) then\r
-      DEBUG_OUT(3 downto 0)   <= state;\r
-      DEBUG_OUT(7 downto 4)   <= state2;\r
-      DEBUG_OUT(11 downto 8)  <= state3;\r
+--      DEBUG_OUT(3 downto 0)   <= cons_state;\r
+--      DEBUG_OUT(7 downto 4)   <= main_state;\r
+--      DEBUG_OUT(11 downto 8)  <= recv_state;\r
 --    end if;\r
 --  end process PROC_DEBUG;\r
 \r
index 62bb918d95ec450381072ff984467c7ac54c75e2..fbc41fccea4d0af3af5119642c50211f6156426d 100644 (file)
@@ -57,7 +57,7 @@ entity gbe_response_constructor_Forward is
     FWD_READY_OUT           : out std_logic;
     FWD_FULL_OUT            : out std_logic;
     -- debug
-    DEBUG_OUT               : out std_logic_vector(31 downto 0)
+    DEBUG_OUT               : out std_logic_vector(63 downto 0)
   );
 end gbe_response_constructor_Forward;
 
@@ -242,7 +242,7 @@ architecture gbe_response_constructor_Forward_arch of gbe_response_constructor_F
   DEBUG_OUT(15 downto 8)  <= ff_q(7 downto 0);
   DEBUG_OUT(16)           <= ff_q(8);
   DEBUG_OUT(17)           <= local_eop;
-  DEBUG_OUT(31 downto 18) <= (others => '0');
+  DEBUG_OUT(63 downto 18) <= (others => '0');
   -- ****
 
 end gbe_response_constructor_Forward_arch;