Jump to content

cwerner77

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cwerner77's Achievements

Newbie

Newbie (1/4)

1

Reputation

  1. Hello Luke, basically you have to design some sort of communication protocol for your specific application and integrate that into the networking stacks of your systems. For example, if you want to transfer a matrix A from your Matlab host to your FPGA board, do some calculations there resulting in a new matrix B, and transfer matrix B back to your Matlab host, do the following: Read about TCP/IP communication in Matlab: https://de.mathworks.com/help/matlab/import_export/create-a-tcpip-connection.html Write a TCP client in Matlab Write a corresponding TCP server for your FPGA-Boards (the "LwIP TCP Perf Server" is a good starting point). Call the TCP server from your Matlab TCP client Maybe it is a good idea to implement your server code also on your PC first, because this is easier to debug. For example, you could can start with a Matlab-to-Matlab TCP/IP connection, then go over to Matlab-to-"C-Programm on your PC" TCP/IP connection and finally, you can run your well-tested C server code on your FPGA board. The TCP implementations of your operating system, respectively the lwIP-Stack of your FPGA-Board, will automatically care for a reliable network connection: TCP is a protocol, that allows you to establish a connection from a client to a server, and then exchange a bidirectional byte stream. TCP will automatically care for the completeness as well as the correct order of the transferred data (using acknowledgements). It will also ensure the integrity of the transferred data (using checksums) and provides congestion control. These mechanisms protect your communication against lost or corrupted data on the network; lost or corrupted data will be resent automatically. However, these features do not protect your communication against man-in-the-middle attacks or similar. If you need that, you have to implement additional protocol layers like TLS: https://en.wikipedia.org/wiki/Transport_Layer_Security If your project does not need all those fancy TCP features, you should have a look at UDP: https://en.wikipedia.org/wiki/User_Datagram_Protocol. Best regards, Christian
×
×
  • Create New...