The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:12am
Pages: 1
Send Topic Print
Compatibility with Hspice (Read 2634 times)
mohammadfawaz
New Member
*
Offline



Posts: 4

Compatibility with Hspice
Mar 22nd, 2010, 2:07pm
 
Hello all,

I'm new to Verlilog A, and I'm having a problem when trying to compile models that are clock depending such as a counter. How can I use a clock in a model and still be able to use the model in HSPICE?

Thank you
Back to top
 
 
View Profile   IP Logged
Marq Kole
Senior Member
****
Offline

Hmmm. That's
weird...

Posts: 122
Eindhoven, The Netherlands
Re: Compatibility with Hspice
Reply #1 - Mar 23rd, 2010, 2:29am
 
1. Define an input for the clock signal

Code:
inout clk;
electrical clk; 



2. Create an event that checks for the clock's edges:

Code:
@(cross(V(clk) - thresh, +1)) begin
  count = (count > max_count) ? 0 : count + 1;
  outval = (count == 0);
end 



3. Contribute a value calculated in the event statement to the output

Code:
V(out) <+ outval; 



Hope this helps,
Marq
Back to top
 
 
View Profile   IP Logged
mohammadfawaz
New Member
*
Offline



Posts: 4

Re: Compatibility with Hspice
Reply #2 - Mar 23rd, 2010, 2:56pm
 
Hello,

When I try to compile this using HSPICE, I'm getting an error at "@".
I have HSPICE A-2008.03. Should I have a new version?

Thank you
Back to top
 
 
View Profile   IP Logged
mohammadfawaz
New Member
*
Offline



Posts: 4

Re: Compatibility with Hspice
Reply #3 - Mar 23rd, 2010, 3:09pm
 
Problem solved. I have a problem with includes..
thanx
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.