Extracting driving strength (2nd trial) 
Author Message
 Extracting driving strength (2nd trial)

Quote:

> Hi there,

> I have an analog buffer which three voltage levels (5V, 3,3V, 1,67V, 0V).
> These levels are represented in a verilog model by Strong1, Pull1, Weak1 and
> Strong0. Is there a system function which extracts these driving strength ?

> For example, I want to do something like that:

> if (signal == Strong1)
>   do something;
> else if (signal == Pull1)
>   do something else
> else if (signal == Weak1)
>   do something else
> else if (signal == Strong0)
>   do something else
> else
>   display error message

Stefan,

  You need to do this in the PLI. You can create a function that will return the
strength
of it's argument. You can use acc_fetch_value to obtain the strength of a scalar
net (use
%v as the format specifier). You can then use either tf_putp(0, value) to return
the function
value or make it a task and use either tf_putp(n, value) or
acc_set_value(acc_handle_tfarg(n), ...)
to set the return parameter. The issue with tf_putp is that it only works for 32
bit things
(you can use tf_putlongp() to put up to 64 bits). The only way to return function
values is
via the tf_putp() mechanism. If you want to return more than 64 bits or need to
represent
X or Z then you'll need to make this a task. (I once submitted a request to allow
acc_set_value()
to work for returning function value - so you could return arbitrarily sized
objects from functions
and include X and Z but that never got anywhere). Anyway, the other thing you
need to know
is that you can (must) use a function in an expression while a task must appear
by itself (sort
of like a call). Sorry from rambling so much, but if you can sort all this
I think you may find an
answer to your problem in there.

  --Bob

--
Bob Beckwith
To reply, remove NOSPAM. from the email address above.



Mon, 22 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. drive strength and bus contention modeling

2. Evaluating drive strength

3. Syntax for partitioning 2nd IDE drive?

4. REQ: Crack or Reg for Cosmo Worlds 2.0 Trial and Cosmo PageFX 1.0 Trial

5. 2nd CFP: WRS'02 - 2nd WS on Reduction Strategies in Rewriting and Programming

6. 2nd CFP: TAPD2000, 2nd Workshop on Tabulation in Parsing and Deduction

7. Copy file from network drive to local drive?

8. Listing Valid Drives and Drive Types

9. I look for a vi which allows to drive a stepper motor drive

10. Can I use Keithley 2182 drive instead of Keithley 181 drive with slight variations

11. Determining Fixed Drives From Floppy Drives

12. Relation logical drive - physical drive ?

 

 
Powered by phpBB® Forum Software