FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-05-2005, 04:02 PM
Olivier FAURAX
Guest
 
Posts: n/a
Default [NCsim] How to force re-computation ?

Hello,

I use a register (DF3 from AMS).
When I simulate it, with ncsim, it works well : at each clock tick, i
get the input value copied on the output pin.

However, I tried to deposit a value on the output pin. As long as the
input pin value doesn't change, the output pin is stuck, even if clock
tick should make the output pin value to update.

I suspect that this behaviour is due to the fact that ncsim is
event-oriented : "if inputs don't change, we don't compute output".

How can i force real behaviour, i.e. computation even if the input
doesn't change ?

Thanks a lot in advance.
Olivier

PS : thanks to [email protected] for the solution about escaping signal
names.
Reply With Quote
  #2 (permalink)  
Old 10-06-2005, 02:39 AM
[email protected]
Guest
 
Posts: n/a
Default Re: How to force re-computation ?


Olivier FAURAX wrote:
> However, I tried to deposit a value on the output pin. As long as the
> input pin value doesn't change, the output pin is stuck, even if clock
> tick should make the output pin value to update.


If I understand you correctly, you are using $deposit, the user
interface, or PLI to deposit a value on a net (not a reg).

> I suspect that this behaviour is due to the fact that ncsim is
> event-oriented : "if inputs don't change, we don't compute output".
>
> How can i force real behaviour, i.e. computation even if the input
> doesn't change ?


I am afraid that "deposit a value on a pin" and "real behavior" are not
compatible concepts :-).

A deposit on a net doesn't correspond to anything real. You have set a
net to a value that does not correspond to the value being driven on
it, and are trying to rely on how long it will remain in that
physically unreal state.

A force can be viewed as something real, like an overpowering driver,
or disconnecting the old drivers and connecting a new driver. A
deposit cannot. The concept of setting the value until the simulator
updates it again has no meaning in a real circuit, or the definition of
the Verilog language, only in a particular simulator implementation.

The point at which the simulator will update that value is undefined by
the language, and could be any time between the deposit and an actual
change to the value driving the net (which is not same as the value on
the net, because you did the deposit). In this case, it is not
updating the value until the value being driven changes, which is very
efficient and predictable behavior (even if it isn't what you
expected). Verilog-XL does the same thing, and I would expect the same
thing from most simulators. But a simulator could update it earlier,
and you would have no valid complaint. If you cause an actual value
change at the driver (which you haven't), then it should be propagated.
Otherwise, nothing is guaranteed.

I would suggest that you avoid using deposit on nets. Perhaps if you
explained what you are trying to accomplish, someone could propose a
better way of doing it.


> PS : thanks to [email protected] for the solution about escaping signal
> names.


You're welcome.

Reply With Quote
  #3 (permalink)  
Old 10-06-2005, 07:10 PM
[email protected]
Guest
 
Posts: n/a
Default Re: How to force re-computation ?

Assuming that this is a behavioral model of a register, rather than a
UDP, you can probably do what you are trying to do by depositing the
value into the reg that holds the state, rather than depositing it on
the pin.

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OT] bit-flip with NCSim Olivier FAURAX Verilog 2 09-12-2005 11:35 PM
equivalent of -G to vsim for ncsim kk Verilog 6 04-30-2005 06:12 PM
force statement execution in verilog [email protected] Verilog 4 04-02-2005 10:10 PM
how to force DC to use a specific cell ? whizkid Verilog 5 11-09-2004 08:23 AM
ncsim and signal labeling andy Verilog 1 10-26-2004 10:40 AM


All times are GMT +1. The time now is 04:34 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved