hello i am having a problem with the vhdl code i have tried assigning all wires to a value but couldnt solve the latche error
can anyone help me and clarfiy the problem? and how can it be solved?
WARNING:Xst:737 - Found 1-bit latch for signal <ctr_rst>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <ldata>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
WARNING:Xst:737 - Found 1-bit latch for signal <startsort>. Latches may be generated from incomplete case or if statements. We do not recommend the use of latches in FPGA/CPLD designs, as they may lead to timing problems.
here is my statemachin:
Code VHDL - [expand] |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
| -----------------------------------------------------------------
clocked_proc : PROCESS (
clk,
reset
)
-----------------------------------------------------------------
BEGIN
IF (reset = '1') THEN
current_state <= s0;
ELSIF (clk'EVENT AND clk = '1') THEN
current_state <= next_state;
END IF;
END PROCESS clocked_proc;
-----------------------------------------------------------------
nextstate_proc : PROCESS (
current_state,
done_load,
wr_d
)
-----------------------------------------------------------------
BEGIN
CASE current_state IS
WHEN s0 =>
IF (wr_d = '0') THEN
next_state <= s0;
ELSIF (wr_d = '1') THEN
next_state <= s1;
ELSE
next_state <= s0;
END IF;
WHEN s1 =>
IF (done_load = '0') THEN
next_state <= s1;
ELSIF (done_load = '1') THEN
next_state <= s2;
ELSE
next_state <= s1;
END IF;
WHEN s2 =>
next_state <= s2;
WHEN OTHERS =>
next_state <= s0;
END CASE;
END PROCESS nextstate_proc;
-----------------------------------------------------------------
output_proc : PROCESS (
current_state,
done_load,
wr_d, startsort,ldata,ctr_rst
)
-----------------------------------------------------------------
BEGIN
-- Combined Actions
CASE current_state IS
WHEN s0 =>
ldata <= '0' ;
sver_en <='1';
startsort <='0';
ctr_rst <= '0';
IF (wr_d = '0') THEN
sver_en <= '1' ;
startsort <= '0' ;
ldata <= '0';
ctr_rst <='0';
ELSIF (wr_d = '1') THEN
ldata<= '1';
sver_en <= '1' ;
startsort <= '0' ;
ctr_rst <='0';
END IF;
WHEN s1 =>
ldata <= '1';
sver_en <= '1' ;
startsort <= '0' ;
ctr_rst <='0';
IF (done_load = '0') THEN
sver_en<= '1' ;
startsort <= '0' ;
ldata <= '1';
ctr_rst <='0';
ELSIF (done_load = '1') THEN
ldata <= '0' ;
ctr_rst <= '1';
sver_en <= '1' ;
startsort <= '0' ;
END IF;
WHEN s2 =>
startsort<= '1';
sver_en<= '1';
ldata <= '0';
ctr_rst <= '0';
WHEN OTHERS =>
NULL;
END CASE;
END PROCESS output_proc; |