signal tsm_hwrite_n : std_logic;
signal tsm_hread_n : std_logic;
- type link_states is (INACTIVE, ACTIVE, ENABLE_MAC, TIMEOUT, FINALIZE, WAIT_FOR_BOOT, GET_ADDRESS);
+ type link_states is (INACTIVE, ACTIVE, ENABLE_MAC, TIMEOUT, FINALIZE, WAIT_FOR_BOOT); --, GET_ADDRESS);
signal link_current_state, link_next_state : link_states;
attribute syn_encoding of link_current_state : signal is "onehot";
if (RESET = '1') then
disable_redirect <= '0';
elsif (redirect_current_state = CHECK_TYPE) then
- if (link_current_state /= ACTIVE and link_current_state /= GET_ADDRESS) then
- disable_redirect <= '1';
- elsif (link_current_state = GET_ADDRESS and RC_FRAME_PROTO_IN /= "10") then
- disable_redirect <= '1';
- else
- disable_redirect <= '0';
+ if (link_current_state = ACTIVE) then
+ disable_redirect <= '0';
+ else
+ disable_redirect <= '1';
end if;
+-- if (link_current_state /= ACTIVE and link_current_state /= GET_ADDRESS) then
+-- disable_redirect <= '1';
+-- elsif (link_current_state = GET_ADDRESS and RC_FRAME_PROTO_IN /= "10") then
+-- disable_redirect <= '1';
+-- else
+-- disable_redirect <= '0';
+-- end if;
else
disable_redirect <= disable_redirect;
end if;
redirect_state <= x"2";
if (link_current_state = ACTIVE) then
redirect_next_state <= CHECK_BUSY;
- elsif (link_current_state = GET_ADDRESS and RC_FRAME_PROTO_IN = "10") then
- redirect_next_state <= CHECK_BUSY;
+-- elsif (link_current_state = GET_ADDRESS and RC_FRAME_PROTO_IN = "10") then
+-- redirect_next_state <= CHECK_BUSY;
else
redirect_next_state <= DROP;
end if;
lsm_impl_gen : if DO_SIMULATION = 0 generate
LINK_STATE_MACHINE_PROC : process(MC_RESET_LINK_IN, CLK)
begin
- if MC_RESET_LINK_IN = '1' then
- link_current_state <= INACTIVE;
- elsif rising_edge(CLK) then
- if RX_PATH_ENABLE = 1 then
- link_current_state <= link_next_state;
- else
- link_current_state <= INACTIVE;
- end if;
- end if;
+ --if MC_RESET_LINK_IN = '1' then
+ -- link_current_state <= INACTIVE;
+ --elsif rising_edge(CLK) then
+ if rising_edge(CLK) then
+ if (RESET = '1' or MC_RESET_LINK_IN = '1') then
+ link_current_state <= INACTIVE;
+ else
+ if RX_PATH_ENABLE = 1 then
+ link_current_state <= link_next_state;
+ else
+ link_current_state <= INACTIVE;
+ end if;
+ end if;
end process;
end generate lsm_impl_gen;
lsm_sim_gen : if DO_SIMULATION = 1 generate
- LINK_STATE_MACHINE_PROC : process(MC_RESET_LINK_IN, CLK)
- begin
- if MC_RESET_LINK_IN = '1' then
- link_current_state <= GET_ADDRESS;
- elsif rising_edge(CLK) then
- if RX_PATH_ENABLE = 1 then
- link_current_state <= link_next_state;
- else
- link_current_state <= ACTIVE;
- end if;
- end if;
- end process;
+-- LINK_STATE_MACHINE_PROC : process(MC_RESET_LINK_IN, CLK)
+-- begin
+-- if MC_RESET_LINK_IN = '1' then
+-- link_current_state <= GET_ADDRESS;
+-- elsif rising_edge(CLK) then
+-- if RX_PATH_ENABLE = 1 then
+-- link_current_state <= link_next_state;
+-- else
+-- link_current_state <= ACTIVE;
+-- end if;
+-- end if;
+-- end process;
end generate lsm_sim_gen;
incl_dhcp_gen : if (INCLUDE_DHCP = '1') generate
end if;
end if;
- when GET_ADDRESS =>
- link_state <= x"6";
- if (PCS_AN_COMPLETE_IN = '0') then
- link_next_state <= INACTIVE;
- else
- if (dhcp_done = '1') then
- link_next_state <= ACTIVE;
- else
- link_next_state <= GET_ADDRESS;
- end if;
- end if;
+-- when GET_ADDRESS =>
+-- link_state <= x"6";
+-- if (PCS_AN_COMPLETE_IN = '0') then
+-- link_next_state <= INACTIVE;
+-- else
+-- if (dhcp_done = '1') then
+-- link_next_state <= ACTIVE;
+-- else
+-- link_next_state <= GET_ADDRESS;
+-- end if;
+-- end if;
when ACTIVE =>
link_state <= x"7";
-- end if;
--if (link_current_state = GET_ADDRESS) then
- if (incl_dhcp = '1') then
+ if (incl_dhcp = '1' and link_current_state = ACTIVE) then
dhcp_start <= '1';
else
dhcp_start <= '0';