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.

[ncsim] stop -> force -> run error?

Status
Not open for further replies.

davyzhu

Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
ncsim force

Hi all,

I want to write a Tcl in ncsim to do below work.
1. stop when $signal is 1
2. set the lock to force stop only stop once
3. force $other_signal
4. continue run
5. force $other_signal back
6 continue run

But ncsim said "cannot run command executed from a stop -execute script".

Any suggestions, thanks!

Code:
#----- Tcl begin ---
set lock 0
stop -silent -name stop_name -cont -cond { [value $CLK] == 1 && $signal ==1 && $lock == 0} -exec {
    set lock 1
    force other_signal = 8'b10010000
    run 50us
    force other_signal = 8'b10001010
}
run 50us
#----- Tcl end ---
Best regards,
Davy
 

Shurik

Full Member level 3
Joined
Jul 15, 2004
Messages
167
Helped
16
Reputation
32
Reaction score
4
Trophy points
1,298
Activity points
842
forces in ncsim.log

Is it for simulation of verilog code?
 

aji_vlsi

Advanced Member level 2
Joined
Sep 10, 2004
Messages
646
Helped
85
Reputation
170
Reaction score
12
Trophy points
1,298
Location
Bangalore, India
Activity points
4,946
force ncsim

Hi,
Not sure if stop inside a stop is allowed, if so the following should work:

Code:
#----- Tcl begin ---
set lock 0
stop -silent -name stop_name -cont -cond { [value $CLK] == 1 && $signal ==1 && $lock == 0} -exec {
    set lock 1
    force other_signal = 8'b10010000
    stop -time -relative 50 us -cont -exec {  force other_signal = 8'b10001010}
}
run 50us
#----- Tcl end ---

If this doesn't work let me know, we can find some thing else.

Regards
Ajeetha, CVC
Contemporary Verification Consultants Pvt Ltd. https://www.noveldv.com
* A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5 https://www.systemverilog.us/
* SystemVerilog Assertions Handbook
* Using PSL/Sugar
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating

davyzhu

Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
ncsim stop simulation

Hi aji_vlsi,

Thanks a lot, and I will try your method next week :)

Hi Shurik,

Yes, it's Verilog simulation.

Best regards,
Davy
 

Shurik

Full Member level 3
Joined
Jul 15, 2004
Messages
167
Helped
16
Reputation
32
Reaction score
4
Trophy points
1,298
Activity points
842
force ncsim

Hi davyzhu!

I am not using the Tcl script for simulation.
I write testbench which control the simulation.

Best regards.
 

yln2k2

Member level 5
Joined
Sep 22, 2006
Messages
89
Helped
13
Reputation
26
Reaction score
3
Trophy points
1,288
Activity points
1,822
force value ncsim

Hi ,

If possible try to do the same in testbench ( if you have visibility of the signal ...) .
This will increase perfomance than using Tcl .


Thanks & Regards
yln
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating

aji_vlsi

Advanced Member level 2
Joined
Sep 10, 2004
Messages
646
Helped
85
Reputation
170
Reaction score
12
Trophy points
1,298
Location
Bangalore, India
Activity points
4,946
ncsim assertions

yln2k2 said:
Hi ,

If possible try to do the same in testbench ( if you have visibility of the signal ...) .
This will increase perfomance than using Tcl .


Thanks & Regards
yln
Good point. Given that it is Verilog, visibility is not an issue at all. EVen if you were using VHDL, one can use signal_spy/nc_mirror/hdl_xmr feature to achieve the same.

Ajeetha, CVC
www.noveldv.com
Contemporary Verification Consultants Pvt Ltd. https://www.noveldv.com
* A Pragmatic Approach to VMM Adoption 2006 ISBN 0-9705394-9-5 https://www.systemverilog.us/
* SystemVerilog Assertions Handbook
* Using PSL/Sugar
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top