2014-04-04 67 views
1

當我嘗試綜合VHDL設計時,出現了一個相當奇怪的警告。我試圖構建的俄羅斯方塊等我的模型實體有以下類型定義:靈敏度列表中的記錄數組記錄不正常

constant PAIR_WIDTH: natural := 6; 
type pair_type is 
    record 
     x, y: signed(PAIR_WIDTH - 1 downto 0); 
    end record; 
type tetromino_shape_type is array(0 to 3) of pair_type; 
type tetromino_type is 
    record 
     shape: tetromino_shape_type; 
     color: std_logic_vector(3 downto 0); 
    end record; 

這種類型的結構讓我擁有4對signed代表4塊的位置四格拼板和std_logic_vector它表示應該使用哪個塊來繪製tetromino。這裏唯一的「奇怪」事情是tetromino_type是記錄()的記錄(pair_type)的記錄。

我認爲一切都會很好地使用這種類型的一些信號充當寄存器:

signal current_pos_reg, current_pos_next: pair_type; -- position of the current tetromino in grid coordinates 
signal current_tetromino_reg, current_tetromino_next: tetromino_type; -- current tetromino piece 

所以,我做了一個過程來設置寄存器:

process(clk, rst) 
begin 
    if (rst = '1') then 
     state_reg <= idle; 
    elsif (clk'event and clk = '1') then 
     current_pos_reg <= current_pos_next; 
     current_tetromino_reg <= current_tetromino_next; 
    end if; 
end process; 

而另一進程下一個狀態邏輯:

process(current_pos_reg, current_tetromino_reg) 
begin 
    --even just keeping the same state as before causes this issue I'm about to show 
    current_pos_next <= current_pos_reg; 
    current_tetromino_next <= current_tetromino_reg; 
end process; 

合成器(無論賽靈思ISE(非WebPack)我們ES),然後給了我以下警告:

One or more signals are missing in the process sensitivity list. To enable synthesis of FPGA/CPLD hardware, XST will assume that all necessary signals are present in the sensitivity list. Please note that the result of the synthesis may differ from the initial design specification. The missing signals are: 
<current_tetromino_reg.shape<0>.x>, <current_tetromino_reg.shape<0>.y>, <current_tetromino_reg.shape<1>.x>, <current_tetromino_reg.shape<1>.y>, <current_tetromino_reg.shape<2>.x>, <current_tetromino_reg.shape<2>.y>, <current_tetromino_reg.shape<3>.x>, <current_tetromino_reg.shape<3>.y> 

一些奇怪的原因,沒有被列入敏感列表中記錄陣列內記錄的成員。我本來期望將它們包含在內,與std_logic_vector陣列的個人std_logic成員一樣。此外,顯而易見地缺席的錯誤是current_tetromino_reg.block,進一步告訴我,它只是陣列的記錄成員造成問題。

我的問題

  • 我在做什麼錯?我可以將這些個人成員添加到敏感列表中,但這似乎很乏味。
  • 這是一個錯誤?我不是VHDL的專家(我還沒有完全掌握該語言),但我想不出爲什麼會發生這種情況。也許自動包含在我不知道的敏感列表中的規則存在特定的例外情況?
+0

看到這個問題:http://stackoverflow.com/questions/ 15091766/how-to-fix-xilinx-ise-warning-about-sensitivity-list - 似乎它可能只是一個小小的XST缺點。 – fru1tbat

+0

使用單進程狀態機的另一個原因!只需將狀態寄存器中的所有下一個狀態邏輯置於同一時鐘進程中即可。 –

+0

@MartinThompson我覺得2段設計更具可讀性。它比我的教授想我想象的那麼少使用? (他們似乎對將所有內容放在同一個過程中持有相當不利的看法) –

回答

0

這聽起來不像你做錯了什麼。

請參閱AR# 3218410.1 XST - 警告:Xst:819 - 當我將所有信號包含在過程敏感性列表中時,爲什麼會收到此消息?

這是XST一個已知的問題,如果你的一個信號是另一個記錄類型的記錄類型