The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> Stiumlus for a thermometer encoder using Spectre
https://designers-guide.org/forum/YaBB.pl?num=1175871232

Message started by ywguo on Apr 6th, 2007, 7:53am

Title: Stiumlus for a thermometer encoder using Spectre
Post by ywguo on Apr 6th, 2007, 7:53am

Hi, Guys,

I simulate a thermormeter encoder using Spectre. I wonder if there is any convenient solution to apply stimulus to the unit under test (UUT). The UUT is a thermormeter encoder for a current-steering encoder.

I want to apply a sinusoidal signal or a triangular signal to check the function of the UUT using Analog Design Environment or standalone spectre simulator.


Thanks
Yawei

Title: Re: Stiumlus for a thermometer encoder using Spect
Post by Andrew Beckett on Apr 11th, 2007, 7:39am

You didn't really say what the inputs to your encoder look like - I'm guessing they are some kind of bus? You could use something like a verilog-a model of an ADC to convert the sine wave to a bus (e.g. adc_8bit_ideal in ahdlLib). I did this for writing my instructions for my response to your create bus question just now:


Code:
//
R0 (vd0 0) resistor r=1k
R1 (vd1 0) resistor r=1k
R2 (vd2 0) resistor r=1k
R3 (vd3 0) resistor r=1k
R4 (vd4 0) resistor r=1k
R5 (vd5 0) resistor r=1k
R6 (vd6 0) resistor r=1k
R7 (vd7 0) resistor r=1k
Vclk (vclk 0) vsource type=pulse val0=0 val1=5 rise=1n fall=1n width=50n period=
100n
Vsin (vin 0) vsource type=sine freq=1/30u ampl=0.5 dc=0.5
I1 (vd7 vd6 vd5 vd4 vd3 vd2 vd1 vd0 vin vclk) adc_8bit_ideal

tran tran stop=30u

ahdl_include "adc_8bit_ideal.va"


Regards,

Andrew.

Title: Re: Stiumlus for a thermometer encoder using Spect
Post by Andrew Beckett on Apr 11th, 2007, 7:39am

Whoops, the Vclk line got wrapped when I cut and paste it - you'd have spotted that, I'm sure  :-/

Andrew.

Title: Re: Stiumlus for a thermometer encoder using Spect
Post by ywguo on Apr 12th, 2007, 3:40am

Hi, Andrew,

Thank you. I am not familiar with the verilog-A language. However, I instantiated an adc_8bit_ideal in ahdlLib in the schematic and simulated using Spectre in Analog Artist. It's great.


Yawei

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