Hallo zusammen,
Beim Synthetisieren des folgenden Code-Abschnitts gibt mir XST immer
folgende Info aus:
1 | INFO:Xst:2117 - HDL ADVISOR - Mux Selector <current_state> of Case statement line 118 was re-encoded using one-hot encoding.
|
2 | The case statement will be optimized (default statement optimization), but this optimization may lead to design initialization problems.
|
3 | To ensure the design works safely, you can:
|
4 | - add an 'INIT' attribute on signal <current_state> (optimization is then done without any risk)
|
5 | - use the attribute 'signal_encoding user' to avoid onehot optimization
|
6 | - use the attribute 'safe_implementation yes' to force XST to perform a safe (but less efficient) optimization
|
Ich gehe davon aus, dass dies behoben werden sollte.
Hier nun also der Code-Abschnitt:
(stark zusammengekürzt, so ohne tieferen Sinn...)
1 |
|
2 | type state_type is (WAIT_ENABLE, WAIT_WINDOW_START, WAIT_MASK_START, WAIT_MASK_END, WAIT_WINDOW_END, WAIT_ENABLE_END );
|
3 | signal current_state : state_type := WAIT_ENABLE;
|
4 | signal next_state : state_type;
|
5 |
|
6 | begin
|
7 | process(INT_CLK,INT_RESET)
|
8 | begin
|
9 | if INT_RESET = '1' then
|
10 | current_state <= WAIT_ENABLE;
|
11 | elsif rising_edge(INT_CLK) then
|
12 | if READ_ENABLE = '1' then
|
13 | current_state <= next_state;
|
14 | else
|
15 | current_state <= WAIT_ENABLE;
|
16 | end if;
|
17 | end if;
|
18 | end process;
|
19 |
|
20 | -- state machine
|
21 | process (current_state, READ_ENABLE, WE_VALID_flag, WS_flag, MS_VALID_flag, MS_flag, ME_flag, WE_flag )
|
22 | begin
|
23 | -- Default-Werte, werden uebernommen wenn sonst nichts zutrifft, z.B. in IDLE
|
24 | BUSY_FLAG <= '0';
|
25 | TRIGGER_FLAG <= '0';
|
26 | next_state <= WAIT_ENABLE;
|
27 |
|
28 | case current_state is
|
29 | when WAIT_ENABLE =>
|
30 | if READ_ENABLE = '1' then
|
31 | next_state <= WAIT_WINDOW_START;
|
32 | end if;
|
33 | when WAIT_WINDOW_START =>
|
34 | if WS_flag = '1' then
|
35 | next_state <= WAIT_WINDOW_END;
|
36 | end if;
|
37 | when WAIT_WINDOW_END =>
|
38 | if WE_flag = '1' then
|
39 | next_state <= WAIT_ENABLE_END;
|
40 | when WAIT_ENABLE_END =>
|
41 | if READ_ENABLE = '0' then
|
42 | next_state <= WAIT_ENABLE;
|
43 | when others =>
|
44 | next_state <= WAIT_ENABLE;
|
45 | end case;
|
46 | end process;
|
In diesem Fred ging es ums gleiche Thema:
Beitrag "folgende HDL ADVISOR Anweisung ?"
Demzufolge hätte ich wohl kein Problem zu erwarten, da ich ja mit Reset
arbeite.
In meinem Code habe ich aber dem current_state bereits einen Initialwert
verpasst. Warum taucht die Info dann immer noch auf?
Weiss da jemand Rat?
Gruss, Martin Kohler
-----------------
Edit: Beitrag in der Breite reduziert, bessere Lesbarkeit...