Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to simulate FFT in HSPICE?

Status
Not open for further replies.

wylee

Full Member level 1
Full Member level 1
Joined
Feb 17, 2004
Messages
98
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,288
Location
Malaysia
Activity points
1,031
hspice fft

I designed a few low pass filters (different order) and I have input a 1Gbps square wave into it

I want to run .FFT from 100us to 200us to probe v(out) and check what are the frequency compenent that passed through the filter

can anyone help me on that?
 

fft in hspice

what's your problem then??just run it.
you've got the statement for it
chosse your window and set the time.
 

fft hspice

I need some example on how to use it coz I have trouble of plotting the power vs freq graph from 1 to 10GHz.

If you know how, can you post a simple example?
 

.fft hspice

A example

.fft v(1,2) np = 1024 start = 0.3m stop = 0.5m freq = 5.0k
+ window = kaiser alfa = 2.5
 

hspice .fft

Ok I tried, and I am not getting what I espected

Here is my netlist, I designed a 20kHz 1st order LPF and I inject a 2GHz square wave into it. If I do FFT at the input waveform I should espect to see a fundalmental component at 2GHz and 1st odd harmonic at 6GHz.

But instead I got this (please refer to the attached GIF)
:cry:

Here is my netlist

* LPF FFT Testing ********************************
.option post

rlpf in out 20k
clpf out gnd 397.89pF

vin in gnd ac=1 dc=1.2 pulse(0.9 1.5 0 100p 100p .9n 2n)

.fft v(out,gnd) np=1024 start = 70u stop = 80u freq = 2G window = kaiser alfa = 2.5
.fft v(in,gnd) np=1024 start = 70u stop = 80u freq = 2G window = kaiser alfa = 2.5

.ic out 1.199
.tran 50p 100u

.ac dec 100 1 10G
.graph par('vdb(out)-vdb(in)')

.end
***********************************************[/img]
 

hspice fft

You can try to input an ideal sin wave, if the FFT is right, you can get the result in *.ft0.
 

fft+lpf

wylee said:
Ok I tried, and I am not getting what I espected

Here is my netlist, I designed a 20kHz 1st order LPF and I inject a 2GHz square wave into it. If I do FFT at the input waveform I should espect to see a fundalmental component at 2GHz and 1st odd harmonic at 6GHz.

But instead I got this (please refer to the attached GIF)
:cry:

Here is my netlist

* LPF FFT Testing ********************************
.option post

rlpf in out 20k
clpf out gnd 397.89pF

vin in gnd ac=1 dc=1.2 pulse(0.9 1.5 0 100p 100p .9n 2n)
~~~~the frequency is 500Mhz not 2G, right?

.fft v(out,gnd) np=1024 start = 70u stop = 80u freq = 2G window = kaiser alfa = 2.5
.fft v(in,gnd) np=1024 start = 70u stop = 80u freq = 2G window = kaiser alfa = 2.5
~~~~~~~~~~~~~~
sim time for fft is 80-70=10u, and your freq bin is 1/10u=100kHz, so your freq range is 100khz*1024/2=50mhz, so you can only see frequency components within 50MHz.
try this:
vin in gnd ac=1 dc=1.2 pulse(0.9 1.5 0 100p 100p .24n 0.5n)
.fft v(in,gnd) np=8192 start = 70u stop = 71u freq = 2G window = kaiser alfa = 2.5

.ic out 1.199
.tran 50p 100u

.ac dec 100 1 10G
.graph par('vdb(out)-vdb(in)')

.end
***********************************************[/img]
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top