Simulink Real Time Ethernet

30 visualizzazioni (ultimi 30 giorni)
Diede Hilhorst
Diede Hilhorst il 23 Feb 2024
Commentato: Hassaan il 26 Feb 2024
Greetings,
I am working on a college project which requires me to build an HIL. Simulink Real Time External would be a viable option for the real time simulation requirement. I am going to design my own output device that connects to the DUT [Device Under Test] through an FPGA. The communication link from my simulation to the FPGA would be ethernet.
This would have me requiring having two ethernet connection, one from host pc to real time target and from real time target to the FPGA.
My question is, how would I setup the simulation model, so that the simulation results gets transferred to the FPGA?
Kind regards,
Diede

Risposta accettata

Hassaan
Hassaan il 25 Feb 2024
Modificato: Hassaan il 25 Feb 2024
  1. Simulation Preparation: Design your Simulink model as per your project requirements. Ensure you incorporate the necessary blocks that can interface with Ethernet, such as UDP Send/Receive blocks for communication.
  2. Ethernet Configuration: Configure two Ethernet connections in your Simulink model. One will be for the connection between the host PC and the real-time target machine, and the other for the communication between the real-time target and the FPGA.
  3. Real-Time Target Setup: Use Simulink Real-Time to set up and build your model for real-time execution. Make sure the target machine's hardware is configured correctly, including Ethernet settings for both connections.
  4. FPGA Interface: Implement an Ethernet protocol on the FPGA that matches the protocol used in the Simulink model (e.g., UDP). This will allow the FPGA to receive and transmit data correctly.
  5. Data Transfer Logic: In the Simulink model, create the logic to send the simulation results over Ethernet. This will typically involve encoding the simulation data into a format suitable for Ethernet transmission.
  6. Testing and Validation: Run the real-time simulation and test the communication link by sending data to the FPGA. Monitor the FPGA's response to ensure the communication is successful.
Consult the documentation for Simulink Real-Time and the specific Ethernet blocks for detailed setup instructions and capabilities. If your project requires precise timing and synchronization, you'll also need to consider the real-time target's capabilities for handling Ethernet communication with minimal latency.
---------------------------------------------------------------------------------------------------------------------------------------------------
If you find the solution helpful and it resolves your issue, it would be greatly appreciated if you could accept the answer. Also, leaving an upvote and a comment are also wonderful ways to provide feedback.
Professional Interests
  • Technical Services and Consulting
  • Embedded Systems | Firmware Developement | Simulations
  • Electrical and Electronics Engineering
Feel free to contact me.
  2 Commenti
Diede Hilhorst
Diede Hilhorst il 26 Feb 2024
Thank you for your guidance!
Hassaan
Hassaan il 26 Feb 2024
@Diede Hilhorst You are welcome!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Multicore Processor Targets in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by