Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > I've got a case of the latches....

Reply
Thread Tools

I've got a case of the latches....

 
 
Shannon
Guest
Posts: n/a
 
      06-29-2009
Ok, I know how latches can be inferred from missing assignments. Here
is what I have:

process(clk, reset)
begin
if reset = '1' then
...
x < = '0';
...
elsif rising_edge clk then
x <= '0';
case state is
when....
when....
when....
if something then
x <= '1';
elsif something_else then
....
else
....
end if;
end case;
end if;
end process;

why is 'x' a latch?

Shannon
 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      06-29-2009
Shannon wrote:
> Ok, I know how latches can be inferred from missing assignments.


Only in an unclocked process.

> Here is what I have:
> ...
> why is 'x' a latch?


I don't see how it could be.
Post a complete entity.

-- Mike Treseler
 
Reply With Quote
 
 
 
 
Shannon
Guest
Posts: n/a
 
      06-29-2009
On Jun 29, 9:21*am, Mike Treseler <mtrese...@gmail.com> wrote:
> Shannon wrote:
> > Ok, I know how latches can be inferred from missing assignments.

>
> Only in an unclocked process.
>
> > *Here is what I have:
> > * * ...
> > why is 'x' a latch?

>
> I don't see how it could be.
> Post a complete entity.
>
> * * * -- Mike Treseler


I think I misunderstood the error message. I was getting (from
Quartus) the message: "analyzing combinational loop as a latch: "x" is
a latch"
What this error means is that 'x' is not a latch but how I'm using it
is.

The offending statement was where I was using 'x' outside of a clocked
process:

y <= z or x; (or some such thing). The point being y was being
assigned outside of the clocked process (mistakenly). It was THAT
that was forming the combinational loop. Moving the 'y' assignment
inside the clocked process fixed it.

Shannon
 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      06-29-2009
Shannon wrote:

> The offending statement was where I was using 'x' outside of a clocked
> process:
> y <= z or x; (or some such thing). The point being y was being
> assigned outside of the clocked process (mistakenly). It was THAT
> that was forming the combinational loop. Moving the 'y' assignment
> inside the clocked process fixed it.


That's it.
An assignment 'outside' of a process
is in fact, an asynchronous process.
 
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
If you Got Questions? I bet We got Answers Leisure.201@gmail.com Javascript 1 04-28-2007 11:04 PM
lower case to upper case Janice C Programming 17 12-14-2004 02:35 PM
how to case select with case-insensitive string ? Tee ASP .Net 3 06-23-2004 07:40 PM
Possible to turn on/off cookieless sessions dynamically on a case by case basis at run-time? Steve Franks ASP .Net 2 06-10-2004 02:04 PM
Scorsese Collection: Keep case vs Snap case Ray DVD Video 0 05-30-2004 04:04 AM



Advertisments