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.

combo logic /latch inference

Status
Not open for further replies.

kil

Member level 5
Joined
Feb 15, 2006
Messages
89
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Location
banglore
Activity points
2,032
always @(posedge clk)
begin

a = b;
b = c;
c = a;

end

what logic it will get in the hardware. i think as it happening with respect to clk but list it may function as latch / some combo logic. i am confused can any one help in this regard.

regards
kil

Added after 10 minutes:


hi,

it may not infer as latch as latch will be infered if else part is missing in the if else statment with respect to clock. it will infer as combo logic but but what the actual hardware implementation of it is what i excaly looking for...

Thanks
KIL
 

It will infer Flip Flop..

Synthesis ur example and check.
 

hi
it will infer flops only but that is bad coding style.

use non blocking statements and u can change order of those assignments

if u want to use blocking then u have to aware of sequence of the assignments to be write
 

hey it will infer ffs.........since code is sensitive to clk......use nonblocking staements to avoid this case........
 

always @(posedge clk)
begin
a = b;
b = c;
c = a;
end
It will infer 3 ffs ..
if coding like this
always @(posedge clk)
begin
c = a;
b = c;
a = b;
end
It will infer 1 ffs ..
but use nonblocking staements
always @(posedge clk)
begin
c <= a;
b <= c;
a <= b;
end
It will infer 3 ffs ..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top