嵌入式
嵌入式以太网,发送代码如下:
when Copy01=> --destination mac address ffff ffff ffff
HD<=X"FFFFFFFF";
when Copy02=>
HD<=X"1111FFFF"; -- source mac address 1111 1111 1111
when Copy03=>
HD<=X"11111111";
when Copy04=>
HD<=X"00450008"; --type IP, IPv4=0100 ,
when Copy05=>
HD<=X"00004800";--package size 72 bytes total
when Copy06=>
HD<=X"00001140";
when Copy07=>
HD<=X"CC01A8C0"; --source ip 192.168.1.204
when Copy08=>
HD<=X"FFFFFFFF"; --destination ip address
when Copy09=>
HD<=X"70177017"; -- port number
when Copy10=>
HD<=X"00001c00";-- 28 bytes data
when Copy11=>
HD<=X"11111111";
when Copy12=>
HD<=X"1111FFFF";
when Copy13=>
HD<=X"11111111";
when Copy14=>
HD<=X"11111111";
when Copy15=>
HD<=X"FFFFFFFF";
when Copy16=>
HD<=X"1111FFFF";
when Copy17=>
HD<=X"11111111";
when Copy18=>
HD<=X"1111FFFF";
when Copy19=>
HD<=X"11111111";
实际上就发送了一个很小的IP帧。