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.

Read external stimuli file in ModelSim...

Status
Not open for further replies.

massive

Member level 2
Member level 2
Joined
Jul 20, 2003
Messages
44
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Sofia, Bulgaria
Activity points
417
Hi to all!

I want to apply many stimuli signals to my simulation. Is it posssible to place them in text file and read it in Model Sim with TCL or other way?
 

massive said:
Hi to all!

I want to apply many stimuli signals to my simulation. Is it posssible to place them in text file and read it in Model Sim with TCL or other way?

this is just a language related question, if you use VHDL, you just use std.text.io lib and then using readline and read statement to read from stimuli file

regards
 

Save wave to file.do, Then you cad load it when you want to run simulation!
 

use ieee.std_logic_textio.all;
use std.textio.all;

file master_file : TEXT is in "E:\??\??\??";

begin
process
variable Lbuf : Line;
readline(master_file, Lbuf);
...
 

some supplement to roger's

after readline statement, you can use read as follow
let take adder as an example, you have operand A and B
and output result
just add the following to roger's code

varialbe opA, opB, result
read(LBuf, opA)
read(LBuf, opB)
read(LBuf, result)

A_i <= opA;
B_i <= opB;

wait for ........
assert result_o = reuslt
...............
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top