Получение неправильных результатов при моделировании после синтеза

Я пишу код для Matrix Transpose в VHDL. Я ввожу ввод в основной строке и один элемент матрицы за каждый такт, и я сохраняю данные в основном формате столбца, после чего я отправляю данные в основном формате столбца поэлементно каждые часы цикл до выхода. Код приведен ниже, он правильно моделируется, но результаты постсинтеза неверны, может ли кто-нибудь помочь, как синтезировать код, чтобы получить правильные результаты

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.numeric_std.ALL;

entity Matrix_Trans_Sysgen is
generic(n: integer :=3);
port (my_clk : in std_logic;
my_ce : in std_logic;
input_matrix : in std_logic_vector(5 downto 0);
output_matrix : out std_logic_vector(5 downto 0)
);
end Matrix_Trans_Sysgen;

architecture Behavioral of Matrix_Trans_Sysgen is

type t1 is array (natural range<>) of std_logic_vector(5 downto 0);

signal a : t1((n*n)-1 downto 0) :=(others => (others =>'0'));

signal output_there : std_logic :='0';

signal x : integer range 0 to 2*n :=0;
signal y : integer range 0 to 2*n :=0;
signal z : integer range 0 to 2*n*n :=0;

begin

----- Process to take all input_matrix into array
process(my_clk,input_matrix,x,y)
begin

if(x < n) then

    if(y < n) then
       if(rising_edge(my_clk)) then 
          a(y*n+x) <= input_matrix;
          y <= y+1;
       end if;
    else
      x<=x+1;
      y<=0;
    end if;
  else
    output_there <= '1';

end if;
end process;


----- Process to send all output elements through port
process(my_clk,z,output_there)
begin

if (output_there = '1') then

    if(z < n*n) then


      if(rising_edge(my_clk)) then


         output_matrix <= a(z);
         z<=z+1;

      end if;

    end if;

end if;

end process;

end Behavioral;

Спасибо и с уважением

Теджа


person Teja    schedule 18.05.2013    source источник


Ответы (1)


Перепишите его, используя обычный шаблон для тактируемых процессов. То есть с

"if rising_edge(clk) then ... "

самый крайний в процессе. Инструменты синтеза ищут эту конструкцию и правильно ее обрабатывают; другие формы процесса могут запутать инструменты.

person user_1818839    schedule 20.05.2013