The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Sep 20th, 2026, 12:08pm
Pages: 1
Send Topic Print
Binary representation in verilogA (Read 1516 times)
parthsv
New Member
*
Offline



Posts: 6

Binary representation in verilogA
Oct 11th, 2005, 3:29pm
 
Hi All,
 I am currently working on digital calibration of ADC. I am presently modelling the algorithm(VerilogA)  for which I need a 7b counter. Is it possible to have a binary counter  like in Verilog (As I do not want to spend time on modelling the counter) say for eg:

 Counter <= Counter + 1'b0; (syntax may not be exact)

Thanks in Advance,

Partha
Back to top
 
 
View Profile   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: Binary representation in verilogA
Reply #1 - Oct 11th, 2005, 11:53pm
 
you can't have binary numbers.. but you can have integer variables and there are bitwise operators for them..  
do you thing this would work for you?
integer counter
analog begin
  @(cross(V(clk,clkb),+1,ttol,vtol) begin
      counter = (counter +1)%(1<<7);
   end
end
---
of course if you'd use Verilog-AMS you could
use your normal Verilog construct for the counter..
Back to top
 
 

jbdavid
Mixed Signal Design Verification
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2026 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 [email protected]. Consider submitting a paper or model.