Hi,
warum erzeugt der folgende Code die Warnung
"Warning (10631): VHDL Process Statement warning at E_Register.vhd(23):
inferring latch(es) for signal or variable "Q", which holds its previous
value in one or more paths through the process"
1 | Save: process(D, Reset, Clk)
|
2 | begin
|
3 |
|
4 | if(Reset = '1') then
|
5 | Q <= (others=>'0');
|
6 | elsif (Clk'Event and Clk = '1') then
|
7 |
|
8 | for i in n-1 downto 0 loop
|
9 | Q(i) <= D(i);
|
10 | end loop;
|
11 | end if;
|
12 |
|
13 | end process;
|
Was ist an der for-Schleife so schlimm? Kann ich sie einfach weglassen?
Die Zuweisung Q <= D; sollte das gleiche machen, oder...?