Arrays 敏感度列表中记录数组的记录工作不正常

Arrays 敏感度列表中记录数组的记录工作不正常,arrays,vhdl,fpga,xilinx,Arrays,Vhdl,Fpga,Xilinx,当我尝试合成一个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

当我尝试合成一个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;
这种类型结构给了我一个tetromino,它有4对符号表示4个块的位置,还有一个std_逻辑_向量表示应该使用哪个块来绘制tetromino。这里唯一奇怪的是,tetromino_类型是一个记录,其数组tetromino_shape_类型为记录对类型

我假设所有人都会很好地将这种类型用于某些用作寄存器的信号:

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;
所以,我做了一个设置寄存器的过程:

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;
Xilinx ISE非网页包使用的合成器会给我以下警告:

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_逻辑向量数组的各个std_逻辑成员一样。同样明显的错误是current_tetromino_reg.block,它进一步告诉我,引起问题的只是数组的记录成员

我的问题:

我做错了什么?我可以将这些个人成员添加到敏感度列表中,但这似乎很乏味。 这是虫子吗?我不是VHDL方面的专家,我甚至还没有完全掌握这种语言,但我想不出为什么会发生这种情况。也许有一个特殊的例外规则是什么自动包含在敏感度列表中,我不知道?
听起来你没有做错什么

请参阅10.1 XST-警告:XST:819-当我将所有信号包括在过程灵敏度列表中时,为什么会收到此消息

如果您的一个信号是另一个记录类型的记录类型,这是XST的一个已知问题


请看这个问题:-似乎这只是XST的一个小缺点。使用单进程状态机的另一个原因!只要把所有的下一个状态逻辑放在与状态寄存器相同的时钟过程中。@MartinThompson我觉得两段式设计更具可读性。它是否不像我的教授希望我想的那么普遍?他们似乎对把所有东西都放在一起持相当消极的看法process@LosFrijoles-这是一场持续的辩论,双方都有想法。这里有一个这样的问题和答案:。随着工具的改进,两个流程似乎没有那么纯粹的技术原因,但正如您所说,一些人发现两个流程形式更具可读性。