![]() |
Network Wizard for VHDL Test Benches
|
The IPv4 library provides functions for creating and manipulation IPv4 packets.
Other libraries in IPv4 are:
More details in nw_ipv4_pkg
Include the libraries:
Assume the variable v_payload contains the IPv4 payload, for example an UDP packet. The variables are defined:
First setup the header, then calculate the total IPv4 packet length before creating the packet.
The variable v_ipv4_pkt is an 8-bit array. This can of course be rearranged to any word width with f_repack .
See further examples in the test bench nw_ipv4_tb.vhd.