Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

integer in verilog synthesize to

Status
Not open for further replies.

rknmahesh

Newbie level 5
Joined
Apr 4, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,339
Generally if I declare a variable as integer in verilog.. What hardware element the synthesis tool will take that variable.


Thanks in advance
 

As far as I'm aware of, integer will be used only for variables that don't infer hardware register, e.g. an iteration loop variable. In some cases, an integer variable will be assigned to a signed or unsigned vector, but it doesn't infer hardware elements on it's own. If you know cases that are sugesting hardware use, please tell.
 

If not initialized in a iteration loop or even in a iteration loop it should remember its own previous value which infers as a memory. So I think it may be inferred as register only may be... As I also dont know some one help...
 

An iteration loop isn't actually "executed" at runtime. It's just a method to describe parallel logic. In so far loop variables aren't hardware objects.
 
Ya I too agree but what if its not a iteration loop lets say a counter incrementing evry posedge of clock
 

In case of doubt, presume a 32 bit register. You're possibly able to constrain it to a specific bit width in the assignment. Check the result with your synthesis tool.
Code:
 if (i < 7)
   begin
     i<= (i + 1) & 7;
     q <= 0;
   end
 else
   begin
     i<=0;
     q <= 1;
   end;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top