Subject: Re: VOTE - Deprecating assign (use force)
From: Clifford E. Cummings (cliffc@sunburst-design.com)
Date: Tue Apr 16 2002 - 16:13:39 PDT
At 03:09 PM 4/16/02 -0700, Kevin Cameron x3251 wrote:
> > From (Mac) Tue Apr 16 14:19:23 2002
> >
> > ...
> >
> > Just a comment: I implemented the force/release and assign/deassign
> > features in VCS, and they use the exact same mechanism, and the same
> > speed.
> >
> > There is nothing you can do with assign/deassign that you can't do
> > with force/release; but there is much you can do with force/release
> > that can not be done with assign/deassign.
>
>Stu pointed out that force/release is more often used for debugging than
>design, so you might run into a problem if you try and use it for both.
I disagree with Stu concerning force being primarily used for debug.
Force was used more with debug back in the days of interactive simulators
using $grwaves (the better than nothing graphics display package). Most
debugging is done these days by running a batch-mode simulation and using
much nicer commercial waveform viewers. I can't remember the last time I
used a force command to do debugging.
On the other hand, there are notable behavioral coding exceptions that lend
themselves well to the use of the force-release command. I gave two
examples in another email message.
Mac - I'm guessing that another difference between assign-deassign and
force-release is that assign and deassign must both check to see if a force
is active since force-release is basically a higher priority assign-deassign?
>Also (correct me if I'm wrong) an assign only applies to one driver (reg)
>and will be resolved, but the driver from a force isn't resolved at all.
Depends on how you define "driver."
I think of continuous assign statements as setting up drivers on a common
net, where the simulator must resolve logic value and strength differences.
I think of procedural assignments as modifications of a behavioral variable
where the last procedural assignment wins (except when an assign or force
are active). With procedural assign statements, last assign takes control
of the reg-variable (in the absence of a force command) until the next
assign or deassign is executed. Similarly, last force command wins until a
new force command is issued or a release command is issued. I don't think
of that as resolving. Did I misunderstand your statement above?
>If you want to use force/release to replace assign/deassign I would
>suggest adding a strength level and changing the semantics to allow
>resolution within a strength level. E.g.:
>
> BNF:
> force [(<strength expression>)] <net_or_reg> = <expression>
>
> force x = y; // replaces assign
>
> force (Strong + 0.1) x = y;
> // overrides any drivers of normal strength.
>
>
>This is useful functionality if you want to resolve different types
>on a net since you can automatically discard the results of lower strength
>types in user-defined resolution functions. Strength being real makes
>it easier create new strength levels if you assign fixed numbers to
>the standard ones:
>
> Supply = 7.0
> Strong = 6.0
> ...
> Z = 0.0
>
> Debug = 8.0 ?
>
>The resolution function for the standard strength values 0.0,..,7.0
>would be pre-defined (as is) other levels would require a user-defined
>resolution function.
>
>
>Note: this is (to some extent) required functionality for AMS, but is
>still not well defined in the AMS LRM.
Was it Verilog-XL with the +switchxl switch that permitted 256 levels of
strength? Does Verilog-AMS have more than 8 strength levels?
I have modeled ECL board simulations using different strength levels for
series termination, parallel termination and pullup resistors with
standards strengths. It seems that you can accomplish the above for 99.9%
of all designs with the following:
assign (supply1, supply0) x = setforce ? y : 'bz;
Turning setforce on overrides the x signal and turning it off just hangs
another HiZ driver on the x-net.
>Kev.
From my experience, force is rarely used in design, never used in debug
(any more) and I have never had to employ multiple levels of force on a
common variable. If I did need multiple levels of force priority, I would
handle it with if-else-if statements to assign the different levels of
force priority and I believe the intent would be more clear since all of
the force commands would be co-located in my code.
Regards - Cliff
//*****************************************************************//
// Cliff Cummings Phone: 503-641-8446 //
// Sunburst Design, Inc. FAX: 503-641-8486 //
// 14314 SW Allen Blvd. E-mail: cliffc@sunburst-design.com //
// PMB 501 Web: www.sunburst-design.com //
// Beaverton, OR 97005 //
// //
// Expert Verilog, Synthesis and Verification Training //
//*****************************************************************//
This archive was generated by hypermail 2b28 : Tue Apr 16 2002 - 16:15:04 PDT