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.

Problem on SystemC using Modelsim

Status
Not open for further replies.

fanqimeng

Newbie level 3
Joined
Mar 25, 2007
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,312
systemc crashes modelsim

Hello guys,

I got a problem on systemc using modelsim. I designed an adder and was trying to simulate. however, the program terminated at 20ns and quited to windows from modelsim. I guess there must be something wrong with my code on simulation time but i cannot fix it. does anyone can help me please? cheers.:?:

Here are some of the test bench code.

void TestAdder4bit::process(){
A_p.write("0000");
B_p.write("0001");
CIN_p.write(SC_LOGIC_0);
wait (5, SC_NS);

assert(SUM_p.read() == "0001");
assert(COUT_p == SC_LOGIC_0);
wait(10, SC_NS);
print();

A_p.write("0011");
B_p.write("1100");
CIN_p.write(SC_LOGIC_0);
wait (5, SC_NS);

assert(SUM_p.read() == "1111");
assert(COUT_p == SC_LOGIC_0 );
wait(10, SC_NS);
print();

A_p.write("0011");
B_p.write("1100");
CIN_p.write(SC_LOGIC_1);
wait (5, SC_NS);

assert(SUM_p.read() == "0000");
assert(COUT_p == SC_LOGIC_1 );
wait (10, SC_NS);
print();


wait(100, SC_NS);
sc_stop(); //End Simulation
}
 

system c using modelsim

Did ModelSim crash and close all its windows? If so, this is common problem. This can usually be fixed by opening the design again and re-implementing it. ModelSim seems to crash after "some number" of design changes. Usually, I get my design set up, save it and then exit and restart. That way, there are fewer changes seen by that instance of ModelSim.

Also, try decreasing your time step. I sometimes have to use fempto sec resolution. If the steps are too coarse, it crashes because too many things are changing at the same time.

Make sure you are using the latest simulation models for your FPGA, this could be a known issue. The Xilinx models can be found on their web site. These model updates are NOT part of the Xilinx tool updates. This leads lots of people to assume that they have the latest models when they do not.

Finally, there are log files that Model can use to track down what exactly happened. If all else fails, open a support case with Model and supply then the log files.

P.S. If it continually crashes at 20nS, then simulate to 19.9 nS and make sure that all signals are at known states. If you have signals at 'X', then the ripple effect of these unknown signals propagating due to an event at 20nS could be your problem.
 

    fanqimeng

    Points: 2
    Helpful Answer Positive Rating
dealing with unknown signals systemc

cheers mate, your information is quite helpful. many thanks!!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top