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.

Simple verilog question. - are nested loops synthesizable?

Status
Not open for further replies.

adgjl40112

Newbie level 5
Joined
Mar 26, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,349
Simple verilog question.

Hey guys, I just get a little confused about if it is acceptable to write verilog code like

Code:
reg [3:0] z;

always@(z)
begin
   if (z == 4'd3)
      z = 4'd0;
   else
      z = z;
end

BTW, are nested loops synthesizable?
 

Simple verilog question.

That is acceptable, although i would synthesize into a latch.
For loops are synthesizable.
 

Re: Simple verilog question.

Thx for ur reply.
Still have another question. Is it abnormal that I intend to use latch in the circuit? I am really lack of hardware component.

ANother thing is I use a multidimensional memory to store something.
For eg.
reg[5:0] a[0:5][0:5];
I just want if array any index j of a[1][j] != 5'b00000, then output 1;
else output zero.

How can I achieve this?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top