paradbird
Newbie level 2
I want to do asynchronism write, but this program can't work after synthesis, I don't know why. Please give me some advise. Thanks a lot.
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity ioInput is
port(
D_out1 : out std_logic_vector(255 downto 0);
D_out2 : out std_logic_vector(127 downto 0);
cs : in std_logic;
wr : in std_logic;
addr : in std_logic_vector(3 downto 0);
D_in : in std_logic_vector(31 downto 0)
);
end ioInput;
architecture arch_ioInput of ioInput is
subtype SLV32 is std_logic_vector(31 downto 0);
type tmp_Data_in_type is array (11 downto 0) of SLV32;
signal tmp_Data_in : tmp_Data_in_type;
begin
process(cs,addr,wr,D_in)
begin
if cs = '0' and wr = '0' then
case addr is
when "0000" => tmp_Data_in(0) <= D_in;
when "0001" => tmp_Data_in(1) <= D_in;
when "0010" => tmp_Data_in(2) <= D_in;
when "0011" => tmp_Data_in(3) <= D_in;
when "0100" => tmp_Data_in(4) <= D_in;
when "0101" => tmp_Data_in(5) <= D_in;
when "0110" => tmp_Data_in(6) <= D_in;
when "0111" => tmp_Data_in(7) <= D_in;
when "1000" => tmp_Data_in(8) <= D_in;
when "1001" => tmp_Data_in(9) <= D_in;
when "1010" => tmp_Data_in(10) <= D_in;
when "1011" => tmp_Data_in(11) <= D_in;
when others => null;
end case;
end if;
end process;
D_out2 <= tmp_Data_in(3) & tmp_Data_in(2) & tmp_Data_in(1) & tmp_Data_in(0);
D_out1 <= tmp_Data_in(11) & tmp_Data_in(10) & tmp_Data_in(9) & tmp_Data_in(8) &
tmp_Data_in(7) & tmp_Data_in(6) & tmp_Data_in(5) & tmp_Data_in(4);
end arch_ioInput;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity ioInput is
port(
D_out1 : out std_logic_vector(255 downto 0);
D_out2 : out std_logic_vector(127 downto 0);
cs : in std_logic;
wr : in std_logic;
addr : in std_logic_vector(3 downto 0);
D_in : in std_logic_vector(31 downto 0)
);
end ioInput;
architecture arch_ioInput of ioInput is
subtype SLV32 is std_logic_vector(31 downto 0);
type tmp_Data_in_type is array (11 downto 0) of SLV32;
signal tmp_Data_in : tmp_Data_in_type;
begin
process(cs,addr,wr,D_in)
begin
if cs = '0' and wr = '0' then
case addr is
when "0000" => tmp_Data_in(0) <= D_in;
when "0001" => tmp_Data_in(1) <= D_in;
when "0010" => tmp_Data_in(2) <= D_in;
when "0011" => tmp_Data_in(3) <= D_in;
when "0100" => tmp_Data_in(4) <= D_in;
when "0101" => tmp_Data_in(5) <= D_in;
when "0110" => tmp_Data_in(6) <= D_in;
when "0111" => tmp_Data_in(7) <= D_in;
when "1000" => tmp_Data_in(8) <= D_in;
when "1001" => tmp_Data_in(9) <= D_in;
when "1010" => tmp_Data_in(10) <= D_in;
when "1011" => tmp_Data_in(11) <= D_in;
when others => null;
end case;
end if;
end process;
D_out2 <= tmp_Data_in(3) & tmp_Data_in(2) & tmp_Data_in(1) & tmp_Data_in(0);
D_out1 <= tmp_Data_in(11) & tmp_Data_in(10) & tmp_Data_in(9) & tmp_Data_in(8) &
tmp_Data_in(7) & tmp_Data_in(6) & tmp_Data_in(5) & tmp_Data_in(4);
end arch_ioInput;