Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > The latch in Synthesis?Thanks

Reply
Thread Tools

The latch in Synthesis?Thanks

 
 
Lee
Guest
Posts: n/a
 
      05-06-2004
Hi,

I got the following rules. I am wondering what is wrong if I don't
follow them. Just latch is produced?So what is wrong with the latch
produced?The synthesized circuit is still working, right?Why do I need
to care of the latch?Thanks,

Golden Rule 1:

To synthesize combinational logic using a process, all inputs to
the design must appear in the sensitivity list.


Golden Rule 2:

To synthesize combinational logic using a process, all objects
must be assigned under all conditions.
 
Reply With Quote
 
 
 
 
Eyck Jentzsch
Guest
Posts: n/a
 
      05-06-2004
Lee wrote:
> Hi,
>
> I got the following rules. I am wondering what is wrong if I don't
> follow them. Just latch is produced?So what is wrong with the latch
> produced?The synthesized circuit is still working, right?Why do I need
> to care of the latch?Thanks,
>
> Golden Rule 1:
>
> To synthesize combinational logic using a process, all inputs to
> the design must appear in the sensitivity list.
>

If you dont follow this rule you may have mismatches in behavior for
your RTL and your synthesized netlist. This is simply because the
simulator activates your (RTL) process upon changes of the signals in
the sensitivity list while the gate level netlist runs 'continous'.
>
> Golden Rule 2:
>
> To synthesize combinational logic using a process, all objects
> must be assigned under all conditions.

Violating this rule leads to latches. In general this is not bad but
there are target technologies not supporting latches (e.g. some FPGA's)
and you allways have trouble with static timing analysis and/or DFT
(scan chains).

-Eyck

 
Reply With Quote
 
 
 
 
Ralf Hildebrandt
Guest
Posts: n/a
 
      05-06-2004
Lee wrote:

> Just latch is produced?So what is wrong with the latch
> produced?The synthesized circuit is still working, right?Why do I need
> to care of the latch?


Latches a as half as big as flipflops and consume less power (no
clock-in, that switches permanently). For low-power design they are a
good choice.
You have to take care about the asyncronous behavior - e.g.: If you
design a "muxed latch" (latch that has more than one input that is
selected by select signal(s)), make shure, that mux-switch and
latch-enable are not the same. Otherwise your latch may buffer the wrong
value (when mux-switch changes short before latch-enable turns off).

Latches often have glitches at output, that have to be filtered (e.g. by
a flipflop buffer). No scan path is possible with latches and some
target libraries do not support them (well), e.g. FGPAs.

It depends on you requirements, what is "bad". Flipflops a bad for
low-power designs, latches are bad for fully syncronous designs.


Ralf

 
Reply With Quote
 
Joe
Guest
Posts: n/a
 
      05-07-2004
Lee wrote:

> Hi,
>
> I got the following rules. I am wondering what is wrong if I don't
> follow them. Just latch is produced?So what is wrong with the latch
> produced?The synthesized circuit is still working, right?Why do I need
> to care of the latch?Thanks,
>
> Golden Rule 1:
>
> To synthesize combinational logic using a process, all inputs to
> the design must appear in the sensitivity list.
>
>
> Golden Rule 2:
>
> To synthesize combinational logic using a process, all objects
> must be assigned under all conditions.


Having latches in your design can be risky. It might not work if the
enable pin of your latch have glitches. Consider the following case
(sorry for writing in verilog, working on a project in verilog at this
moment and forgot how to write VHDL

assign latch_en = A ^ B;

// Rule 2 (data_in not assigned when latch_en is 0)
always @(latch_en or data_in)
begin
if (latch_en)
Q <= data_in;
end

Now if A and B toggle at the same time, you can get a glitch on
latch_en. Will the data_in be latched in real circuit?
It could be latched in simulation, depends on whether A change
first or B change first, but in real circuit the glitch pulse
might be too narrow to trigger the latch.

Another problem with latches is that automatic test pattern generation
(ATPG) tools doesn't like it. Therefore it "can" reduce test coverage in
scan tests. (not always true if handled carefully)

Joe






 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Battery door latch on Coolpix 990 broken AGAIN! Andrew McDonald Digital Photography 6 07-06-2007 09:43 PM
SPI serial output counter or latch? bob VHDL 1 02-15-2005 09:32 PM
Beginner: Simple D latch M.A.Khader VHDL 3 08-19-2004 03:18 PM
Glitchs at the output of a latch Patrick VHDL 5 05-28-2004 06:35 AM
logical left shifter or latch ?? dangerlee VHDL 4 05-07-2004 07:38 AM



Advertisments