Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > force signals in VHDL

Reply
Thread Tools

force signals in VHDL

 
 
esperan
Guest
Posts: n/a
 
      03-31-2008
I would like to force a signal in VHDL. I know I can use TCL API in
Modelsim to do this. In fact this is exactly what I have been doing.

when -label label3 "($clk'EVENT AND $16clk = '1')" {
....
force -freeze $dummy_signal 16#[lindex $dummy_data_list 0] 0 ns,
10 ns
....
nowhen label3}

This works fine when there is only a few values that should be forced
(using several when...nowhen). But now I have a file with several
thousands of data that should be forced on to the $dummy_signal (every
clk cycle). I have tried to use one "when...nowhen" in a loop but
Modelsim just seems to get stuck and I have force the simulator to an
end.

Does someone have a solution for this problem?





 
Reply With Quote
 
 
 
 
HT-Lab
Guest
Posts: n/a
 
      03-31-2008

"esperan" <> wrote in message
news:c59c8c0d-125f-4c6a-8df4-...
>I would like to force a signal in VHDL. I know I can use TCL API in
> Modelsim to do this. In fact this is exactly what I have been doing.
>
> when -label label3 "($clk'EVENT AND $16clk = '1')" {
> ....
> force -freeze $dummy_signal 16#[lindex $dummy_data_list 0] 0 ns,
> 10 ns
> ....
> nowhen label3}
>
> This works fine when there is only a few values that should be forced
> (using several when...nowhen). But now I have a file with several
> thousands of data that should be forced on to the $dummy_signal (every
> clk cycle). I have tried to use one "when...nowhen" in a loop but
> Modelsim just seems to get stuck and I have force the simulator to an
> end.
>
> Does someone have a solution for this problem?
>


I would use Signalspy in my testbench.

process
begin
signal_force("/testbench/i0/i2/enable", "1",0 ns,freeze, OPEN,1);
....
end process;

FYI, VHDL2008 will support hierarchical references and has a build-in
force/release command, just log an ER with Mentor to get support for it.

Hans.
www.ht-lab.com




 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      03-31-2008

"esperan" <> wrote in message
news:c59c8c0d-125f-4c6a-8df4-...
>I would like to force a signal in VHDL. I know I can use TCL API in
> Modelsim to do this. In fact this is exactly what I have been doing.
>
> when -label label3 "($clk'EVENT AND $16clk = '1')" {
> ....
> force -freeze $dummy_signal 16#[lindex $dummy_data_list 0] 0 ns,
> 10 ns
> ....
> nowhen label3}
>
> This works fine when there is only a few values that should be forced
> (using several when...nowhen). But now I have a file with several
> thousands of data that should be forced on to the $dummy_signal (every
> clk cycle). I have tried to use one "when...nowhen" in a loop but
> Modelsim just seems to get stuck and I have force the simulator to an
> end.
>
> Does someone have a solution for this problem?
>
>


Write testbench code...that is simply additional VHDL code that
- Instantiates the thing you're trying to test.
- Models the input signals with VHDL code
- Checks the output signals to validate that the thing under test is working

KJ


 
Reply With Quote
 
esperan
Guest
Posts: n/a
 
      04-04-2008
On Mar 31, 11:25*am, "HT-Lab" <han...@ht-lab.com> wrote:
> "esperan" <conny...@gmail.com> wrote in message
>
> news:c59c8c0d-125f-4c6a-8df4-...
>
>
>
>
>
> >I would like to force a signal in VHDL. I know I can use TCL API in
> > Modelsim to do this. In fact this is exactly what I have been doing.

>
> > * when -label label3 "($clk'EVENT AND $16clk = '1')" {
> > * *....
> > * * *force -freeze $dummy_signal 16#[lindex $dummy_data_list 0] 0 ns,
> > 10 ns
> > * *....
> > * * nowhen label3}

>
> > This works fine when there is only a few values that should be forced
> > (using several when...nowhen). But now I have a file with several
> > thousands of data that should be forced on to the $dummy_signal (every
> > clk cycle). I have tried to use one "when...nowhen" in a loop but
> > Modelsim just seems to get stuck and I have force the simulator to an
> > end.

>
> > Does someone have a solution for this problem?

>
> I would use Signalspy in my testbench.
>
> process
> * * *begin
> * * * *signal_force("/testbench/i0/i2/enable", "1",0 ns,freeze, OPEN,1);
> * * * * ....
> * end process;
>
> FYI, VHDL2008 will support hierarchical references and has a build-in
> force/release command, just log an ER with Mentor to get support for it.
>
> Hans.www.ht-lab.com- Hide quoted text -
>
> - Show quoted text -


I probably should have mentioned that I would rather not add extra
code to the testbench, but to my testcase (which is separate files in
C and Tcl) instead. But this is not really a problem now, since I have
another solution. Although it was interesting to hear that VHDL2008
will support force/relese.

/Conny

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nike air force one, air force 1, air force one low cut, air force one salewholeta@163.com Digital Photography 3 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57