Connect with us

HSPICE question

Discussion in 'General Electronics' started by Sanjayan Vinayagamoorthy, Dec 14, 2003.

Scroll to continue with content
  1. Hello,

    I have a couple of questions regarding hspice and I hope that someone
    would be able to help me out of point me in the right direction.

    When using the measure statement in hspice is there a method of
    determining at what time a certain event occured. For example,
    ..MEASURE TRAN DesiredVal FIND I(Vmeas) WHEN v(1) = 1V.
    This will make DesiredVal be equal to the current throught Vmeas when
    v(1) is 1V. Is it possible to find the time when v(1) is 1V.

    My next question is how does one do a switch in hspice. I assume that
    it would have to be a voltage controlled resistor but I am not sure
    how to do it.

    If someone can help me with the above queries I would really
    appreciate it.


  2. Mike

    Mike Guest

    1. Yes. Leave off the FIND option. Here's an example:

    * HSPICE Test File
    vin vo 0 pwl 0.0n 0.0v 100n 1.0v
    rox vo vx 1k
    rxo vx 0 1k
    * Measure vx when vo = 0.5
    ..measure tran vx1 FIND v(vx) WHEN v(vo)=0.5 TD = 0.0n
    * Measure time when v(vo) = 0.5
    ..measure tran tx1 WHEN v(vo)=0.5 TD = 0.0n
    ..probe tran v(vo) v(vx)
    ..tran 1n 100n

    The measure output is:

    ****** transient analysis tnom= 25.000 temp= 25.000

    tx1= 5.0000E-08
    vx1= 2.5000E-01

    2. There is an element called, appropriately enough, a "Voltage Controlled
    Resistor." It's an extension of the Voltage Controlled Current Source model

    Gres n1 n2 VCR c1 c2 <more parameters required>

    This is all in the HSPICE documentation.

    I accept appreciation through PayPal, or you can just gush uncontrollably
    in a followup post. ;-)

    -- Mike --
  3. Hello,

    In following the grand old tradition of being a poor student, I will
    choose the latter. Your help has been greatly appreciated. It has a
    been a lighthouse, shining brightly through the thick fog of
    uncertainty. Where I once walked in trepidation, I can now step boldly
    into the "spice" storms that await me. I would go on, but my
    vernacular has drastically decreased through university.

    Kidding aside, I appreciate your time.

  4. Mike

    Mike Guest

    Oh, stop, you're making me blush. ;-) Sorry about your vernacular - think
    of it as one of many sacrifices you'll have to make for an education. Just
    wait till you see the humiliating gown they'll make you wear for

    One of my more useful binders is a collection of HSPICE notes. Years ago,
    the HSPICE documentation didn't even include an index, so my notes were
    useful as much for their organization as anything else. Even today, I still
    have my notes, since the current documentation provides a cryptic comment
    that says FIND WHEN can be used to return the time, but gives no examples
    and makes no mention that the FIND portion of FIND WHEN must be left off.
    They even go so far as to state, in a different chapter, that "time" is a
    reserved keyword, making you think that you can use it as the argument to
    FIND. Alas, that is not the case.

    I also have a rather large template file (I have one for HSPICE and another
    for Eldo) that contains various example snippets like the ones above, along
    with copious notes to myself.

    -- Mike --
  5. Oh, stop, you're making me blush. ;-) Sorry about your vernacular - think

    That's cool. I am sort of new to circuits myself, which is why I have
    tonnes of questions regarding hspice. I am appreciative of the fact
    that you oblige me by answering them. Do you by any chance have
    reservations against sending some of those nice snippets of "hspice"
    code along? I completely understand if they are a private collection,
    but I couldn't help asking :).

    Thanks again,

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day