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.

Are this verilog codes synthesizable?

Status
Not open for further replies.

krishanu007

Member level 2
Joined
Apr 8, 2010
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore,India
Activity points
1,594
1.always @(c1,c2)
begin
a1 <= a2; // triggering variables are totally different
end

2.@(posedge ready) //...no always,actually inside any always block.
///code/////
 

always @(c1,c2)
begin
a1 <= a2;
end
Here is a combinational logic and it will not be triggering any variable. Actually it's just a buffer, but It's not recommended to use such syntax.
Design Compiler generates warning "a2 is being read, but doesn't appear in sensitivity list of the block".


@(posedge ready) //...no always,actually inside any always block.
///code/////

always@(posedge ... - is a trigger. You can't use another trigger inside existing trigger!
 

always@(posedge ... - is a trigger. You can't use another trigger inside existing trigger!

It works as a trigger if I want to do things..
But Is it synthesizable?
can u tell some tools which can directly tell me any codes synthesizablity?
 

I meant that you can't use Flip-flop inside another flip-flop schematically.
If you want to know is this code synthesizable, just use some synthesize tool (like Design Compiler, RTL Compiler, Quartus...).
 
1) always @(c1,c2)
begin
a1 <= a2;
end

It is synthesizable but it will lead to synthesis-simulation mismatch.
Synthesis tool will infer a simple buffer as it ignores the sensitivity list.
But, this type of coding is not recommended at all.

2) @(posedge ready) //...no always,actually inside any always block.
This type of code is generally used in testbench to wait for a particular signal but it is not supported by the synthesis tools.

regards,
Varun
 

1.always @(c1,c2)
begin
a1 <= a2; // triggering variables are totally different
end

This code is synthesisable creating a buffer but is not good way of writing rtl as in some other scenarios it might cause synthesis simulation mismatch

2..@(posedge ready) //...no always,actually inside any always block.
///code/////

code is synthesisable but it will slow down the simulation

Hope it helps
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top