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: 
Highlighted
Visitor huybui90
Visitor
100 Views
Registered: ‎06-12-2017

ethernet communication between matlab and Virtex ultrascale plus

Hi all,

I'm working on VCU118 dev kit. Is there any way to make ethernet communication from Matlab, i.e transmit/receive data packets to/from FPGA storage elements (BRAM, FIFO) via ethernet connection.

many thanks,

Huy

0 Kudos
1 Reply
Observer phifred
Observer
68 Views
Registered: ‎11-20-2017

Re: ethernet communication between matlab and Virtex ultrascale plus

Hi @huybui90 

I have used these Ethernet FPGA Cores. The port is standard AXI4 Stream.

On the FPGA side I use AXI4 Stream width converters from 8->16 and 16->8. The byte order will be correct signed(15 downto 0). 

Here is a very simple Matlab example to test a FIR filter.

 

% --- Create the signal ---
n = 20000; % Number of samples
x = sin((1:n)/5)*1000; % Create a sin wave
x = x + 1000*rand(size(x))-500; % Add some noise
x16 = int16(x); % Make it signed 16 for the FPGA

% --- Send signal to the FPGA ---
t = tcpclient('192.168.1.232',39029); % open TCP socket
write(t,x16); % Write data to TCP
r16 = read(t,n,'int16'); % Read result
clear tr; % close TCP

% --- Plot the result ---
clf;hold; % clear and hold
plot(x16,'blue'); % plot original signal
plot(r16,'red'); % plot filtered

0 Kudos