The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> how to get direct value using spectre
https://designers-guide.org/forum/YaBB.pl?num=1159450635

Message started by kiran123 on Sep 28th, 2006, 6:37am

Title: how to get direct value using spectre
Post by kiran123 on Sep 28th, 2006, 6:37am

Hi Experts,

 I am doing some spectre simulation and i wanted to calculate direct number either with math equation or some option in spectre to PRINT in ASCII format for below points

assume that simulation is done for Transient analysis

1) if i want the delay between  input (at T1 when VIN crosses 0.5*VDD) to output (at T2 when VOUT crosses 0.5*VDD)

2) how to calculate the VIL and VIH (as these are magnitude of input voltage to be calculated based on Output Voltage level )
for ex: VIH-------> is the height or magnitude of VIN at which VOUT will cross or reach VOH (some specific value like 0.5*VDD)

because for these i can use "save IN OUT " statement and can see waveform in wavescan by putting sliding markers, but i wanted simulation to output print  number in ASCII so that it will be more precise

if i wanted to print some ASCII value using some equation, how do  i give the option or save statement in spectre.
let me give an example "Hysteresis = VIH -VIL"

this can be easily done in SPICE using below statement

.print  equ HYS= #VIH-VIL#

provided VIH and VIL are variables holding the simulation values

It would be great help for me if any body of you share your knowledge on this in detail

Thanks
Best Regards
Kiran Kumar

Title: Re: how to get direct value using spectre
Post by John O Donovan on Sep 28th, 2006, 10:06am

Kiran,

If you want to run a stand-alone simulation with Spectre and do these measurements, then you should use MDL for it.

Create a netlist with you design, I'll call the file "input,scs".
Create an MDL file with all the measurements that you want. MDL provides measurements, and control statements( such as foreach, binary search, optimization), so you can do a lot of characterization in MDL without reverting back to Perl, etc. I'll call the MDL file input.mdl. Then run "spectremdl", as follows

 % spectremdl -b input.mdl

This will generate a file "input.measure" with your results.  If you really want to you cant have print statements in the MDL file too, so that you can print the results in whatever format you want.

Here is a sample MDL file for you measurements

Regards,
 John


                                             
alias measurement trippoints {                                                                                
   export real vil, vih
   run dc( dev=Vin, param=dc, start=0, stop=VDD, step=0.1 )
   vil = V(in) @ cross( V(out), thresh=0.8*VDD )
   vih = V(in) @ cross( V(out), thresh=0.2*VDD )
}
                                                                               
alias measurement delays {                                                                            
   export real delay
   run tran( stop=2u, autostop='yes)
   delay = deltax( sig1=V(in), dir1='rise, thresh1=0.5*VDD, \
                   sig2=V(out), dir2='fall, thresh2=0.5*VDD )
}
                                                                               
run trippoints
run delays



The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.