Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

About Verilog and MATLAB

Status
Not open for further replies.

Taison37

Newbie level 1
Joined
May 7, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
Hi,
1. Is there any way to convert Verilog code to MATLAB code?


2. My program requires the following processes:
- A verilog module is constructed in Xilinx
- The requirement is to give input through MATLAB to the verilog code.
- Then the outputs are got and waveform plots are to be done in MATLAB.
How this can be done? I have already searched and found that Xilinx system generator is used to link simulink with xilinx... Can u clarify me with this?
 

The Matlab code can be converted in Simulink and using the function makehdl() in MATLAB, this can be converted to vhdl coding. You can refer the Matlab help and i hope you will get some information.
 

Check the "Importing HDL Modules" chapter in "System Generator for DSP User Guide" below. (By the way, download Xilinx Document Navigator to manage all Xilinx documents) :

https://www.xilinx.com/support/documentation/sw_manuals/xilinx14_1/sysgen_user.pdf


Hi,
1. Is there any way to convert Verilog code to MATLAB code?


2. My program requires the following processes:
- A verilog module is constructed in Xilinx
- The requirement is to give input through MATLAB to the verilog code.
- Then the outputs are got and waveform plots are to be done in MATLAB.
How this can be done? I have already searched and found that Xilinx system generator is used to link simulink with xilinx... Can u clarify me with this?
 

use the file operations (fopen, fscanf) etc in Matlab to read and write the file in text
and then use similarly file operations in Verilog to read and write from verilog ( readmemb= read from memory in binary); fopen ; fprintf etc...

The way would be this...
1) Matlab->write data to a text file(dnt exactly remember the command, search on google)
2) Read from that text file and store to a memory in Verilog testbench using either readmemb or readmemh command
3) then using clocks read from memory location
4) after operation store in the text file using fdisplay command
5) read from matlab..(google it :) ) ( i guess fscanf is used

for verilog www.testbench.in is really good. go there and search for file read and write in verilog examples...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top