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.

can this verilog description be synthesized?

Status
Not open for further replies.

Rainboww

Newbie level 2
Joined
May 3, 2002
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
24
verilog description

always block is embeded a "@ "event,just as:
……
always@(posedge a)
……
if(……)
@(posedge b) ……
……
……

endmodule

this description can be synthesized?why?
 

modulo verilog

The code cann't be synthesised! There is no such device, i think. Why write code like this?
 

can verilog function be synthesized

Mixing clock domains or different clocks in the same module. Cannot be synthesized and really shouldn't after all.
Nor is good practice to write always @(posedge a) and somewhere
in any hierarchy always @(negedge b).
Drive your logic by: always @(posedge a) or negedge a only, to have posedge or negedge triggered ffs or latches.


pene
 

modulo in verilog

you means the code must be written either "always@(posedge a or posedge b)",or "always@(negedge a or negedge b)",right?

but it seems that i have met a case just like:
“always@(posedge clk or negedge reset)
begin
if(!reset)
……
……
end
……”

how to interpret this situation???

3x a lot
 

how is verilog negedge synthesized

The statements inside "always@(posedge a)" must be strictly combinatorial.

regards,
Buzkiller.
 

what codes cannot be synthesized in verilog

Agree with buzkiller. Anything inside the clocking statement
should be pure combie, of course in either VHDL or Verilog.

Rainboww, you infer doing combinational functions on clocking
signals. That is very bad, and in reality it shall suffer from phase shifts
and other stuff (noise, unecessary transitions).

NEVER PERFORM COMB-FUNCTIONS ON CLOCK. If you want to generate another clock from existing one, e.g. divide clock by modulo-N counter. Take registered output.

pene
 

modulo function in verilog

It is perfectly valid to write :

always @ ( negedge RESETN or posedge CLK ) begin
if ( !RESETN )
COUNT<= 0;
else
COUNT<= COUNT + 1;
end

This the implementation of synchronous counter with asynchromnous active-low reset.
 

clock divider cliff cummins

It is good idea to consult "Reuse Methodology Manual" book and OpenMORE Assesment program (Synopsys/Menthor Graphics) about general coding style (not only for reusability).

A few basic rules:
1. Never mix combinational and sequential logic in same process (always statement)
2. Only one clock per module
3. Clearly define clock domains and develop synchronization strategy between them
4. Put clock generation logic in separate module. Try to use clock gating for clock generation (if duty cycle isn't important). If you must use clock divider, output must be registered (use generated clock in DC for synthesis purpose).

Very interesting document about this topic (and datapath synchronization) is:
"Synthesis and Scripting Techniques for Designing Multi-Asynchronous Clock Design" from Clifford E. Cummings (SNUG San Jose 2001)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top