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.

Combinational latch?????????

Status
Not open for further replies.
Hi,

Below is an example of combinational latch:

Code:
module com_latch (a, b, c);

input a, b;
output c;

reg c;

always @(a or b)
begin
      if(a) 
            c <= b; // no else statement
end

endmodule

This piece of verilog code will infer a latch or combinational latch.
This is not a good coding style. Unless, u intent to do this.

Hope it helps.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top