Alosevskoy
Member level 3
- Joined
- Oct 11, 2011
- Messages
- 55
- Helped
- 19
- Reputation
- 38
- Reaction score
- 19
- Trophy points
- 1,288
- Location
- Zelenograd (Moscow)
- Activity points
- 1,634
Hello, guys!
I'm using Tcl udp extension to communicate between PC and FPGA through Ethernet.
I designed transmission part (UDP/IP stack + MAC) in FPGA and tried to send udp packets from FPGA to PC. It's all Ok - I see packages on PC side using Wireshark packet analyzer with no errors.
After that I tried to send packets from PC to FPGA. In FPGA I created a simple loop - information from RXD output of PHY is sent back to PC through designed transmission part.
In Wireshark I see that instead of udp packets PC sends Arp packets! I don't understand why it happens. I use the following Tcl code to establish communication...
And send packets using puts:
After one execution of the command above I get 2 or 3 identical Arp packets with no data ("hello"):
0x55555555555555d5ffffffffffff082e5f0d677908060001080006040001082e5f0d6779a9fec110000000000000
a9fec1110000000000000000000000000000000000007b7faad6
ffffffffffff - FPGA MAC adress
082e5f0d6779 - PC MAC adress
0806 - Arp protocol
a9fec110 - PC IP
a9fec111 - FPGA IP
But I expect only one UDP packet with "hello" in it...
Any suggestions please?
I'm using Tcl udp extension to communicate between PC and FPGA through Ethernet.
I designed transmission part (UDP/IP stack + MAC) in FPGA and tried to send udp packets from FPGA to PC. It's all Ok - I see packages on PC side using Wireshark packet analyzer with no errors.
After that I tried to send packets from PC to FPGA. In FPGA I created a simple loop - information from RXD output of PHY is sent back to PC through designed transmission part.
In Wireshark I see that instead of udp packets PC sends Arp packets! I don't understand why it happens. I use the following Tcl code to establish communication...
Code:
package require udp
set fpga_soc [udp_open 21846] ; # PC port!
fconfigure $fpga_soc -buffering none -translation binary -encoding binary -broadcast 1
fconfigure $fpga_soc -remote [list 169.254.193.17 21844] ; # FPGA IP & port
proc fpga_soc__getdata {__channel} {
set return_value "" ; # clean variable
binary scan [read $__channel] H* hex_data ; # convert data to hex format
append return_value "0x" $hex_data ; # add 0x prefix
puts "fpga: $return_value"
}
fileevent $fpga_soc readable [list fpga_soc__getdata $fpga_soc]
vwait forever
close $fpga_soc
And send packets using puts:
Code:
puts -nonewline $fpga_soc "hello"
After one execution of the command above I get 2 or 3 identical Arp packets with no data ("hello"):
0x55555555555555d5ffffffffffff082e5f0d677908060001080006040001082e5f0d6779a9fec110000000000000
a9fec1110000000000000000000000000000000000007b7faad6
ffffffffffff - FPGA MAC adress
082e5f0d6779 - PC MAC adress
0806 - Arp protocol
a9fec110 - PC IP
a9fec111 - FPGA IP
But I expect only one UDP packet with "hello" in it...
Any suggestions please?