I have a few questions about synchronization between tx_clk and rx_clk:
arp_req_req.lookup_req is launched by tx_clk in IPv4_tx.vhd, and it only keeps for one tx_clk cycle. arp_req_req.lookup_req is latched by rx_clk in arp_req.vhd, i'm not sure if this signal can be correctly latched since tx_clk and rx_clk are asynchronous.
This is a part of arp_sync.vhd:
case ip_entry_state is
when IDLE =>
if arp_nwk_req.req = '1' then
ip_entry_reg <= arp_nwk_req.ip;
ip_entry_state <= HOLD1;
else
ip_entry_reg <= ip_entry_reg;
ip_entry_state <= IDLE;
end if;
Similarly, arp_nwk_req is launched by rx_clk, and latched by tx_clk. when arp_nwk_req.req = '1', arp_nwk_req.ip may not be valid for rx_clk.
You are correct. This stack has only been tested with synchronised rx & tx clocks.
If you can make some changes, test them, and email to me, then I will post an update to the stack.
OK, I will email you later with the modified vhdl
Thanks