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.

how can i use matlab to aid to do a FPGA simulation?

Status
Not open for further replies.

ddt694

Full Member level 3
Joined
Dec 12, 2002
Messages
170
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Activity points
1,400
I want to use matlab to general the test bench code or some complex signal wave file, the simulator, for example, altera's quartusii or xilinx's ise(in fact modelsim) then use the wave file to simulate. The simulation result can be send to matlab to view the wave or the frequency spectrum.

when design a digital filter the method may be useful, but until now , i donot know how to do.
 

I have not used matlab to design a true fpga, but I joined one matlab lab. if you want to use matlab to generate DSP netlist, only one channel can supported. all the simulation you have to do in matlab, it is your job to make sure the simulation is correct in matlab, which need some of your work. the tool is not for simulation in vhdl/verilog simulator
 

hi, friend, i donot want to use matlab to do the simulation.

what the matlab to do is:
before simulation, generate the complex signal wave file and send it to simulation tools like altera's quartusII or xilinx's ise.

after the simulation has completed by the simulation tool, the result can be read by matlab and veiw the graphic result.

like this:
 

I believ that all that you have to do is saving the signal generated using matlab to a file, read it from your testbench and writing the output of your design to another file.
 

hi, zape
you are right. in addtion, matlab read the file generated from the testbench, then matlab can analysis it.
is it doable?
 

Perfectly, you will only need a small application to convert between formats. I guess it is quite simple so you only need a minimum knowledge of "c" programming or other language.
 

in test bench you can use Text I/O library to read or write to TEXT file. and in matlab you can write MFile to read or write text files also, by this mean you can translat data between test bench and matlab.
 

When i did my first modem design, i used this way. It served me well. I suggest you to build two component. One for read data from text file, the other write your result into text file. Then you can use matlab to manipulate the data.

Initially i tried sysgen, but it turns out to be a little bit overkill. So i find this method quite straitforward and simple.


regards
 

dll_embed said:
When i did my first modem design, i used this way. It served me well. I suggest you to build two component. One for read data from text file, the other write your result into text file. Then you can use matlab to manipulate the data.
regards

Hi,dll_embed
Could you please share your design?
Please excuse for my abrupt manner.

Regards
 

I believ that all that you have to do is saving the signal generated using matlab to a file, read it from your testbench and writing the output of your design to another file.

Hello zape,
I read u'r solution on data translation between Matlab and xilinx ISE simulator. exactly same i am looking for. but my problem is that i have written testbench for reading file which contains matlab data and result of simulation i stored in again text file that i read in matlab. My problem is matlab works with floating point and ISE with fixed point . I want to read .wav file from matlab into ISE simulator. pl. tell me how to convert floating point(double)values of .wav file into fixed point(binary string) so as to store it in text file and again how to convert fixed point(binary string) into floating point(double)values for matlab analysis. I need solution very argently.
thank u. in advance.
anuja
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top