UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
15,022 Views
Registered: ‎02-28-2014

Ethernet communication between MATLAB and FPGA

Jump to solution

Hi, 

I want to make a simulink model which uses  TCP/IP Send and TCP/IP Recieve  modules of  Instrument Control Toolbox and send/recieve data to/from FPGA i.e. establishing an ethernet communication between MATLAB and FPGA 

 

can anyone help me to find a SIMPLE scheme in which data travels from MATLAB via ethernet to FPGA ?

 

Thank you !

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
19,640 Views
Registered: ‎07-11-2011

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

Hi,

 

Please visit below UGs and go through Using Hardware Co-Simulation chapter

http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_7/sysgen_user.pdf

 

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2013_4/ug897-vivado-sysgen-user.pdf

 

One is for Vivado and the other is ISE, but Ethernt Co-Sim is supported only for few boards, you can find the list in UGs.

If your board doesn't have teh support you may try custom baord Jtag HW Co-Simulation.

 

Hope this helps

 

Regards,

Vanitha

---------------------------------------------------------------------------------------------
Please do google search before posting, you may find relavant information.
Mark the post - "Accept as solution" and give kudos if information provided is helpful and reply oriented

View solution in original post

0 Kudos
11 Replies
Xilinx Employee
Xilinx Employee
19,641 Views
Registered: ‎07-11-2011

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

Hi,

 

Please visit below UGs and go through Using Hardware Co-Simulation chapter

http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_7/sysgen_user.pdf

 

http://www.xilinx.com/support/documentation/sw_manuals/xilinx2013_4/ug897-vivado-sysgen-user.pdf

 

One is for Vivado and the other is ISE, but Ethernt Co-Sim is supported only for few boards, you can find the list in UGs.

If your board doesn't have teh support you may try custom baord Jtag HW Co-Simulation.

 

Hope this helps

 

Regards,

Vanitha

---------------------------------------------------------------------------------------------
Please do google search before posting, you may find relavant information.
Mark the post - "Accept as solution" and give kudos if information provided is helpful and reply oriented

View solution in original post

0 Kudos
14,989 Views
Registered: ‎02-28-2014

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

that seems to be helpful but is there another method without using Simulink and System Generator .i.e. sending directly from command window ?

 

0 Kudos
Xilinx Employee
Xilinx Employee
14,954 Views
Registered: ‎08-01-2008

Re: Ethernet communication between MATLAB and FPGA

Jump to solution
you may looking for hw_cosim with isim simulator

www.xilinx.com/tools/feature/14_1_isim_hw_cosim_qrg.pdf
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
14,915 Views
Registered: ‎02-28-2014

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

Okay i will

Thank you 

0 Kudos
Advisor eilert
Advisor
14,911 Views
Registered: ‎08-14-2007

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

Hi,

the mentioned HW-Cosim features al involve sysgen or ISE tools to run alongside your Matlab setup.

I doubt that this is what you intend to do. (Not to mention that the sysgen HW-cosim via LAN is limited to 7 hours runtime due to licensing limitations of the trimac-IP core)

 

Ethernet communication with FPGAs is hardly to be done in a simple way.

Besides the MAC (as IP-Core or part of the FPGA HW) you also need some controll structure to handle the packets.

This normally involves some CPU (except for very simple UDP communications) .

With the EDK you can set up some embedded computing system with ethernet interfacing capabilities.

It depends on your application and software skills wether you implement some small solution special for your needs or set up some full grown linux system.

 

You didn't mention the target device, but in your case it might be usefull to use some solution with a ZYNQ device.

 

Have a nice synthesis

  Eilert

 

0 Kudos
14,898 Views
Registered: ‎02-28-2014

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

I have a Spartan 3E xc3s500e and i want to use matlab to send a stream of bits to FPGA via ethernet cable and the FPGA do some processes on these bits then send it again to matlab 

can i do it with a simple method ? if yes can you recommend a helpful resources to me ?

0 Kudos
Advisor eilert
Advisor
14,882 Views
Registered: ‎08-14-2007

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

Hi,

You just mention the FPGA device, but not the board you are using.

I assume that you are using the S3E Starter Kit..

Maybe you find some Microblaze based reference design with ethernet.

Then you just need to change the software for first tests.

 

Later on you might think about expanding the design with additional hardware modules for the intended application.

 

Have a nice synthesis

  Eilert

0 Kudos
Xilinx Employee
Xilinx Employee
14,872 Views
Registered: ‎08-01-2008

Re: Ethernet communication between MATLAB and FPGA

Jump to solution
You can use Hardware co-simuation through Ethernet if your supported for hardware co-simulation.

There are some standard Ethernet design available which you can use for your application
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Advisor eilert
Advisor
14,847 Views
Registered: ‎08-14-2007

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

Hi Balkris

 read this:

http://forums.xilinx.com/t5/DSP-Tools/Ethernet-communication-between-MATLAB-and-FPGA/m-p/423399#M7789

 

If you positively know about useful reference designs that are applicable for the OPs board,
 please be so kind to provide links.

 

Kind regards

  Eilert

Highlighted
Visitor webphy
Visitor
6,887 Views
Registered: ‎06-06-2013

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

You can download a free demo of the WebPHY DATABUS IP core from http://www.webphyfpga.com to transfer data between MATLAB and FPGA using the HTTP protocol and the MATLAB 'urlread' command. Physical Ethernet connection to the FPGA is done via standard LVDS IO and a RJ-45 jack as shown in the photo below.

There's also an online demo that allows you to transfer data over the internet with an actual FPGA running the IP core, using the MATLAB code below. To try it, navigate to http://webphyfpga.ddns.net in your browser and log onto the online-FPGA. In the MATLAB code, set 'fpga_ip' = the resolved IP address (e.g. http://173.76.169.42:8080/) from your browser's URL box. Use the embedded webcam to view the board live as you move the servo motor and illuminate LEDs.

% IP address of FPGA

fpga_ip = "http://173.76.169.42:8080/";

% Write 8 bytes to BRAM address 0x1002 and read them back.

s = urlread (strcat(fpga_ip,'wr_0x1002_0x0123456789ABCDEF'),'post',{'',''});

s = urlread (strcat(fpga_ip,'rd_0x1002_0x8'),'post',{'',''});

fprintf('read 0x%s from FPGA\n',s);

% Move servo motor and write to 7 segment display.

s = urlread (strcat(fpga_ip,'wr_0x0_0x1234'),'post',{'',''});

 

webphy_onlinedemo.png

0 Kudos
Visitor grafarts
Visitor
5,839 Views
Registered: ‎02-04-2015

Re: Ethernet communication between MATLAB and FPGA

Jump to solution

HI, I also facing the same situation.  I want communicate my pc to a SDR kit having Realtek ethernet port and Spartan3 board. I want stream some video datat to the SDR to process further in FPGA and back to PC throuth ethernet. Please help me with your suggestions

0 Kudos