- added WE_I for rom
- registered addr instead of registered output Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@989 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -14,6 +14,8 @@ END rom;
|
|||||||
|
|
||||||
ARCHITECTURE data OF rom IS
|
ARCHITECTURE data OF rom IS
|
||||||
|
|
||||||
|
signal addr_r : unsigned(31 downto 0);
|
||||||
|
|
||||||
subtype word_t is unsigned(31 downto 0);
|
subtype word_t is unsigned(31 downto 0);
|
||||||
type word_array_t is array (0 to 2047) of word_t;
|
type word_array_t is array (0 to 2047) of word_t;
|
||||||
constant word_array : word_array_t :=
|
constant word_array : word_array_t :=
|
||||||
@@ -2071,11 +2073,13 @@ ARCHITECTURE data OF rom IS
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
dout <= word_array(to_integer(addr_r(12 downto 2)));
|
||||||
|
|
||||||
PROM_READ:
|
PROM_READ:
|
||||||
process(clk)
|
process(clk)
|
||||||
begin
|
begin
|
||||||
if rising_edge(clk) and ce = '1' then
|
if rising_edge(clk) and ce = '1' then
|
||||||
dout <= word_array(to_integer(addr(12 downto 2)));
|
addr_r <= addr;
|
||||||
end if;
|
end if;
|
||||||
end process;
|
end process;
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -8,6 +8,7 @@ ENTITY rom_wb IS
|
|||||||
CLK_I : in STD_LOGIC;
|
CLK_I : in STD_LOGIC;
|
||||||
RST_I : in STD_LOGIC;
|
RST_I : in STD_LOGIC;
|
||||||
CYC_I : in STD_LOGIC;
|
CYC_I : in STD_LOGIC;
|
||||||
|
WE_I : in STD_LOGIC;
|
||||||
STB_I : in STD_LOGIC;
|
STB_I : in STD_LOGIC;
|
||||||
ACK_O : out STD_LOGIC;
|
ACK_O : out STD_LOGIC;
|
||||||
MRDY_I : in STD_LOGIC;
|
MRDY_I : in STD_LOGIC;
|
||||||
@@ -43,7 +44,7 @@ data_valid_register:
|
|||||||
if RST_I = '1' then
|
if RST_I = '1' then
|
||||||
ACK_O <= '0';
|
ACK_O <= '0';
|
||||||
else
|
else
|
||||||
ACK_O <= data_en; -- and not WE_I;
|
ACK_O <= data_en and not WE_I;
|
||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end process;
|
end process;
|
||||||
|
|||||||
Reference in New Issue
Block a user