Hello, I'm competing this problem - I have to write an architecture for a register file (while the entity is given below), but I totally don't know how to do this.. If you are able to post some helpy post, I'd be very glad, thanks.
-- rf.vhd : Register file
library ieee;
use ieee.std_logic_1164.all;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- ----------------------------------------------------------------------------
-- Entity declaration
-- ----------------------------------------------------------------------------
entity rf is
generic (
DATA_WIDTH : integer := 16;
ADDR_WIDTH : integer := 2
);
port (
RESET : in std_logic; -- reset
CLK : in std_logic; -- clock
-- Write port
WR_DATA : in std_logic_vector(DATA_WIDTH-1 downto 0);
WR_ADDR : in std_logic_vector(ADDR_WIDTH-1 downto 0);
WR_WE : in std_logic;
-- Read port A
RDA_ADDR : in std_logic_vector(ADDR_WIDTH-1 downto 0);
RDA_DATA : out std_logic_vector(DATA_WIDTH-1 downto 0);
-- Read port B
RDB_ADDR : in std_logic_vector(ADDR_WIDTH-1 downto 0);
RDB_DATA : out std_logic_vector(DATA_WIDTH-1 downto 0)
);
end rf;
-- ----------------------------------------------------------------------------
-- Architecture declaration
-- ----------------------------------------------------------------------------
architecture behavioral of rf is
-- SIGNALS
begin
-- IMPLEMENTATION
end behavioral;
-- rf.vhd : Register file
library ieee;
use ieee.std_logic_1164.all;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- ----------------------------------------------------------------------------
-- Entity declaration
-- ----------------------------------------------------------------------------
entity rf is
generic (
DATA_WIDTH : integer := 16;
ADDR_WIDTH : integer := 2
);
port (
RESET : in std_logic; -- reset
CLK : in std_logic; -- clock
-- Write port
WR_DATA : in std_logic_vector(DATA_WIDTH-1 downto 0);
WR_ADDR : in std_logic_vector(ADDR_WIDTH-1 downto 0);
WR_WE : in std_logic;
-- Read port A
RDA_ADDR : in std_logic_vector(ADDR_WIDTH-1 downto 0);
RDA_DATA : out std_logic_vector(DATA_WIDTH-1 downto 0);
-- Read port B
RDB_ADDR : in std_logic_vector(ADDR_WIDTH-1 downto 0);
RDB_DATA : out std_logic_vector(DATA_WIDTH-1 downto 0)
);
end rf;
-- ----------------------------------------------------------------------------
-- Architecture declaration
-- ----------------------------------------------------------------------------
architecture behavioral of rf is
-- SIGNALS
begin
-- IMPLEMENTATION
end behavioral;