为什么输出信号 post-synthesis 不能正常工作?

Why does the output signals post-synthesis not work as usual?

我写了一个小的 VHD 文件来模拟正交解码器的行为,附在下面。使用通用测试台模拟设计按预期工作。但是在使用 Quartus 生成可综合设计后,我 运行 陷入了两个问题之一(例如,在使用 unsigned 时)
1. positiondirection 信号在整个 post-综合模拟过程中始终处于恒定的 0 值。
2. position 值似乎每 3-4 个时钟周期跳 10 个值,我将其归因于数据中的一些抖动。
有没有人有解决这个问题的建议?这主要是时间问题还是我的设计存在重大缺陷?

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.NUMERIC_STD.ALL;

entity quad_decoder is
  port(rst   : in  std_logic;
       clk   : in  std_logic;
       a    : in  std_logic;
       b    : in  std_logic;
       direction : out std_logic;
       position : out std_logic_vector(8 DOWNTO 0));
end quad_decoder;


architecture behavioral of quad_decoder is
begin
    process(clk)
        variable counter : integer range 0 to 360 := 0;
        variable chanA,chanB : std_logic;
        variable int_direction : std_logic; 
            begin
                if (rst = '0') then 
                    int_direction := '0';
                    counter := 0;
                elsif (rising_edge(clk)) then                   
                    chanA := a;
                    chanB := b;
                    if (chanA = '1') and (chanB = '0') then
                        if (counter = 360) then
                            counter := 0;
                        else
                            counter:= counter + 1;
                        end if;
                        int_direction := '1';
                    elsif (chanA = '0') and (chanB = '1') then
                        if (counter = 0) then 
                            counter := 360; 
                        else 
                            counter := counter-1;
                        end if;
                        int_direction := '0';
                    else
                        counter := counter;
                        int_direction := int_direction;
                    end if;
                    position <= std_logic_vector(to_unsigned(counter,9));
                    direction <= int_direction;
                end if;
    end process;
end behavioral;

预期的预合成快照是 here。

我已经链接了 post-合成模拟 here 的示例快照。如所见,在多个时钟周期中 positiondirection 都没有变化。

如果有人好奇的话,在时钟边沿进行赋值以及将复位信号调高证明会引入各种时序问题,它通过了多角时序分析测试,但未通过 Quartus 中的其他测试我没有注意到。

如果我的回答含糊不清,我可以详细说明。