The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 8:26pm
Pages: 1
Send Topic Print
Sample and Hold without Hidden State but with External Clock Input (Read 4215 times)
mardukeyo
New Member
*
Offline



Posts: 2

Sample and Hold without Hidden State but with External Clock Input
Aug 17th, 2012, 11:33am
 
Below is a version of Sample and Hold Model with External Clock Input That functions in Cadence Virtuoso Transient Simulation properly. I have simulated it with Cadence PSS and PAC, and  the simulator does not complain of any hidden states. However, the PAC simulation result does not generate the sinc function frequency response and instead simply has no out put (zero).

Can someone give me some hints on how to go about debug this??

Thanks
Marduke


`include "disciplines.vams"
`include "constants.vams"


//  Sample & Hold with Extrernal Clock and No Hidden State
//

module SH_NHS_EXCLK (pout, nout,clk,pin, nin);

   input clk, pin, nin;
   output pout, nout;
   electrical clk, pin, nin, pout, nout;

   parameter real clk_thresh =  1/2 from (-inf:inf);
   parameter integer clk_dir =  1 from [-1:+1] exclude 0;
                                   // if dir=+1, rising clock edge triggers
                                   // if dir=-1, falling clock edge triggers
                                                                 
                                     
   parameter real tclkd = 10p from [0:inf);            // output delay (s)
   parameter real trf   = 10p from [0:inf);            // output transition time (s)
   
   real out;
   integer sampleNow;


   analog begin
       
       sampleNow=0;
       
     @(initial_step or cross(V(clk) - clk_thresh, clk_dir))
           sampleNow=1;

       out = idt(0,V(pin,nin),sampleNow);
     
     V(pout,nout) <+ transition( out, tclkd, trf,trf );



   end
   
endmodule
Back to top
 
 
View Profile   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Sample and Hold without Hidden State but with External Clock Input
Reply #1 - Aug 19th, 2012, 3:35am
 
Back to top
 
 
View Profile WWW   IP Logged
mardukeyo
New Member
*
Offline



Posts: 2

Re: Sample and Hold without Hidden State but with External Clock Input
Reply #2 - Aug 21st, 2012, 10:07pm
 
Thank you Frank, that site did help me understand the issue better...
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.