2014-04-04 58 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一个已知的问题,如果你的一个信号是另一个记录类型的记录类型