Memory model VHDL updated for MSW first on wide AVM TX interface
This commit is contained in:
parent
5eb2958f33
commit
48c9bb65a3
1 changed files with 17 additions and 17 deletions
|
|
@ -25,29 +25,29 @@ entity mem_model is
|
|||
AVM_TX_WR_DATA_WIDTH : natural range 32 to 128 := 32
|
||||
);
|
||||
port (
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
clk : in std_logic;
|
||||
rst_n : in std_logic;
|
||||
|
||||
-- Avalon CSR slave interface
|
||||
avs_address : in std_logic_vector(31 downto 0);
|
||||
avs_write : in std_logic;
|
||||
avs_writedata : in std_logic_vector(31 downto 0);
|
||||
avs_read : in std_logic;
|
||||
avs_readdata : out std_logic_vector(31 downto 0);
|
||||
avs_address : in std_logic_vector(31 downto 0) := (others => '0');
|
||||
avs_write : in std_logic := '0';
|
||||
avs_writedata : in std_logic_vector(31 downto 0) := (others => '0');
|
||||
avs_read : in std_logic := '0';
|
||||
avs_readdata : out std_logic_vector(31 downto 0);
|
||||
|
||||
-- Avalon Master interface
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
avm_rx_burstcount : in std_logic_vector(11 downto 0);
|
||||
avm_rx_address : in std_logic_vector(31 downto 0);
|
||||
avm_rx_read : in std_logic;
|
||||
avm_rx_readdata : out std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : out std_logic;
|
||||
avm_rx_waitrequest : out std_logic;
|
||||
avm_rx_burstcount : in std_logic_vector(11 downto 0) := (others => '0');
|
||||
avm_rx_address : in std_logic_vector(31 downto 0) := (others => '0');
|
||||
avm_rx_read : in std_logic := '0';
|
||||
avm_rx_readdata : out std_logic_vector(31 downto 0);
|
||||
avm_rx_readdatavalid : out std_logic;
|
||||
|
||||
avm_tx_waitrequest : out std_logic;
|
||||
avm_tx_burstcount : in std_logic_vector(11 downto 0) := 12x"0";
|
||||
avm_tx_address : in std_logic_vector(31 downto 0) := 32x"0";
|
||||
avm_tx_write : in std_logic := '1';
|
||||
avm_tx_writedata : in std_logic_vector(AVM_TX_WR_DATA_WIDTH-1 downto 0) := 32x"0";
|
||||
avm_tx_writedata : in std_logic_vector(AVM_TX_WR_DATA_WIDTH-1 downto 0) := (others => '0');
|
||||
|
||||
wr_port_valid_0 : in std_logic := '0';
|
||||
wr_port_data_0 : in std_logic_vector(31 downto 0) := 32x"0";
|
||||
|
|
@ -88,9 +88,9 @@ begin
|
|||
|
||||
while true loop
|
||||
|
||||
-- Can't have a sensitivity list for the process and process delta cyclies in VHDL,
|
||||
-- Can't have a sensitivity list for the process and process delta cycles in VHDL,
|
||||
-- so emulate the clock edge with a wait here.
|
||||
wait until Clk'event and Clk = '1';
|
||||
wait until clk'event and clk = '1';
|
||||
|
||||
if rst_n = '0' then
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ begin
|
|||
-- If an active write transfer in progress, transfer data
|
||||
if avm_tx_write = '1' and avm_tx_waitrequest_int = '0' and tx_count /= 0 then
|
||||
|
||||
for i in 0 to AVM_TX_WR_DATA_WIDTH/32-1 loop
|
||||
for i in AVM_TX_WR_DATA_WIDTH/32-1 downto 0 loop
|
||||
|
||||
MemWrite(wr_addr, to_integer(signed(avm_tx_writedata(i*32+31 downto i*32))));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue