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.

HDL Simulation in Modelsim from Matlab

Status
Not open for further replies.

rahdirs

Advanced Member level 1
Joined
May 22, 2013
Messages
424
Helped
93
Reputation
192
Reaction score
91
Trophy points
1,308
Location
Mordor
Activity points
4,492
I have generated test cases in matlab.Now from MATLAB,itself i want to invoke modelsim & pass the .do file which has the tcl script to run the functional simulation..

I'm doing this:

Code:
tclstart = 'do C:/Users/Desktop/Matlab_latest/eupsic/iklsfv8.do';
vsim(tclstart,'tclstart');

This opens modelsim but says unable to read macro file. And my simulation in modelsim would take atleast 2-3 hrs.After that how can i return control back to Matlab ?
 

Have you looked into HDL coder? it contains a simulink modelsim block that allows matlab/HDL co-simulation - ie. pass test vectors into your HDL directly from matlab and take the results out.
 

Have you looked into HDL coder? it contains a simulink modelsim block that allows matlab/HDL co-simulation - ie. pass test vectors into your HDL directly from matlab and take the results out.

Yes i know about HDL Coder & Matlab Cosimulation.They are mostly used when you have matlab code & you want it convert it to HDL & quickly check simulation in modelsim.

But my requirement was opposite.I have HDL code & do files which we were using for the past 1 yr.The inputs to the simulation were .txt files which contained samples generated in matlab.I wanted to automate this process,by say develop 500-1000 test cases in matlab & invoke modelsim & pass the do file.

The tcl script will take care of the rest.
 

You can also use it to drive existing HDL and get input driven from Matlab
I havent used it for some years, but we used it in a closed loop control system. Having Matlab drive all the interfaces made the simulation hiddeously slow (it has probably improved in that time). To speed it up it was much easer to have matlab dump an entire array into an HDL wrapper and have the wrapper drive the interfaces when it detected data being input (using the 'transaction attribute in VHDL, as well as a control enable signal). It worked quite well as I could output tons of debug info directly from the VHDL, or view the waveform during the simulink run.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top