The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 13th, 2024, 11:38am
Pages: 1
Send Topic Print
Model for a clocked comp compatible with Spectre (Read 2605 times)
Gabriel
New Member
*
Offline



Posts: 1

Model for a clocked comp compatible with Spectre
Jul 30th, 2007, 3:56am
 
Hi,
I am new to Verilog-A modeling.
I've been trying to write a model for a clocked comparator, but it seems that my code has a hidden state.

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

module comp (inp, inm, set, en, out);
input en, set, inp, inm;
output out;
electrical inp, inm, en, out, set;
parameter real vlogic_high=5,vlogic_low=0;
parameter real vtrans=(vlogic_high+vlogic_low)/2;
parameter real tdel = 2u from [0:inf);
parameter real trise = 1u from (0:inf);
parameter real tfall = 1u from (0:inf);
real out_val;
analog begin
   @(cross( V(en)-vtrans,+1 ))
   out_val = (V(inp) > V(inm)) ? vlogic_high : vlogic_low;
   V(out) <+ transition( out_val, tdel, trise, tfall);
end
endmodule

Can anybody give me some help in removing this hidden state from my model?
Many thanks,
Gabriel
Back to top
 
 
View Profile   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Model for a clocked comp compatible with Spect
Reply #1 - Jul 30th, 2007, 7:29am
 
Back to top
 
 
View Profile WWW   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.