The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 25th, 2024, 5:12am
Pages: 1
Send Topic Print
Frequency response for verilog A models (Read 4986 times)
Voldemort
Junior Member
**
Offline



Posts: 12

Frequency response for verilog A models
Oct 17th, 2004, 6:14pm
 
Hi
What is the procedure for obtaining the frequency response of a second order system designed using verilog a. The verilog model I am using is as follows

`include "discipline.h"
`include "constants.h"

//  model strans

//   S-domain in Numerator-Denominator form
//   Filter order is:  1 / 3

module strans (vin, vout) ;
 input vin;
 output vout;
 electrical vin, vout;

//               nxN  is  numerator of degree N.
//               dxN  is  denominator of degree N.
 parameter real nx0 = 1.0;
 parameter real dx0 = 202.2;
 parameter real dx1 = 1.202e5;
 parameter real dx2 = 1.67e-10;

   analog begin
       V(vout) <+  laplace_nd( V(vin), [ nx0 ],
                [ dx0, dx1, dx2 ]);
   end

endmodule



I created a symbol for this model and I connected a vsin source at the vin node and a 1k resistor at the vout node to ground. I ran an ac simulation in spectre. The ac magnitude I obtain is just some really low constant value (-6.7k).
The system is a second order system with a resonant frequency around 180kHz.

Can someone explain the correct way to do this ?

Thank You
Back to top
 
 
View Profile   IP Logged
Mighty Mouse
Community Member
***
Offline

Here I come to save
the day!

Posts: 75
Fantasyland
Re: Frequency response for verilog A models
Reply #1 - Oct 17th, 2004, 10:20pm
 
You must specify the AC magnitude of the input source. Using a value of 1 is usually the most convienent.

- MM -
Back to top
 
 
View Profile   IP Logged
Voldemort
Junior Member
**
Offline



Posts: 12

Re: Frequency response for verilog A models
Reply #2 - Oct 18th, 2004, 8:38am
 
Mighty Mouse,

Thank you for your help/
I did include the AC magnitude and amplitude in my simulation
Here is my netliist.

-------------------------------
//Genenerated for: spectre
// Generated on: Oct 18 11:21:25 2004
// Design library name: clloop
// Design cell name: cf_uphone
// Design view name: schematic
simulator lang=spectre
global 0

// Library name: clloop
// Cell name: cf_uphone
// View name: schematic
V0 (net3 0) vsource type=sine mag=1 ampl=1 freq=1K
R0 (net6 0) resistor r=1K m=1
I0 (net3 net6) strans nx0=10000 dx0=1 dx1=100 dx2=10000
simulatorOptions options reltol=1e-3 vabstol=1e-6 iabstol=1e-12 temp=27 \
   tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 maxnotes=5 maxwarns=5 \
   digits=5 cols=80 pivrel=1e-3 ckptclock=1800 \
   sensfile="../psf/sens.output"
ac ac start=1 stop=1G annotate=status
modelParameter info what=models where=rawfile
element info what=inst where=rawfile
outputParameter info what=output where=rawfile
designParamVals info what=parameters where=rawfile
saveOptions options save=allpub
ahdl_include "/home/users/2/xxxxxx/clloop/uphonel/veriloga/veriloga.va"
----------------------------

I did change the parameters of my second order system to a simpler one in this. The system has a gain of 1, with a resonant frequency at 100Hz and a damping ratio of 0.5

Thanks


Back to top
 
 
View Profile   IP Logged
Voldemort
Junior Member
**
Offline



Posts: 12

Re: Frequency response for verilog A models
Reply #3 - Oct 18th, 2004, 11:57am
 
Hi

I figured out the problem. It was my model Sad

I had my s domain coefficients reversed and another mistake I made was that the s domain coef are in radians and not in Hz. Hence the screw up.

Thanks for your reply mighty mouse
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.