Line 47... |
Line 47... |
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
--
|
--
|
-- CVS Revision History
|
-- CVS Revision History
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.2 2005/10/12 19:39:27 mgeng
|
|
-- Buses unconstrained, LGPL header added
|
|
--
|
-- Revision 1.1.1.1 2003/01/14 21:48:11 rpaley_yid
|
-- Revision 1.1.1.1 2003/01/14 21:48:11 rpaley_yid
|
-- initial checkin
|
-- initial checkin
|
--
|
--
|
-- Revision 1.1 2003/01/14 17:49:04 Default
|
-- Revision 1.1 2003/01/14 17:49:04 Default
|
-- Initial revision
|
-- Initial revision
|
Line 78... |
Line 81... |
rnwtQ : TIME := 1 NS);
|
rnwtQ : TIME := 1 NS);
|
PORT (
|
PORT (
|
d : IN STD_LOGIC_VECTOR;
|
d : IN STD_LOGIC_VECTOR;
|
q : OUT STD_LOGIC_VECTOR;
|
q : OUT STD_LOGIC_VECTOR;
|
a : IN STD_LOGIC_VECTOR;
|
a : IN STD_LOGIC_VECTOR;
|
rnw : IN STD_LOGIC;
|
nce : IN STD_LOGIC;
|
|
nwe : IN STD_LOGIC;
|
|
noe : IN STD_LOGIC;
|
dealloc_mem : BOOLEAN);
|
dealloc_mem : BOOLEAN);
|
END COMPONENT single_port;
|
END COMPONENT single_port;
|
|
|
COMPONENT tc_single_port IS
|
COMPONENT tc_single_port IS
|
PORT (
|
PORT (
|
Line 93... |
Line 98... |
CONSTANT ADDR_WIDTH : INTEGER := 16;
|
CONSTANT ADDR_WIDTH : INTEGER := 16;
|
|
|
SIGNAL d : STD_LOGIC_VECTOR(DATA_WIDTH - 1 DOWNTO 0);
|
SIGNAL d : STD_LOGIC_VECTOR(DATA_WIDTH - 1 DOWNTO 0);
|
SIGNAL q : STD_LOGIC_VECTOR(DATA_WIDTH - 1 DOWNTO 0);
|
SIGNAL q : STD_LOGIC_VECTOR(DATA_WIDTH - 1 DOWNTO 0);
|
SIGNAL a : STD_LOGIC_VECTOR(ADDR_WIDTH - 1 DOWNTO 0);
|
SIGNAL a : STD_LOGIC_VECTOR(ADDR_WIDTH - 1 DOWNTO 0);
|
SIGNAL rnw : STD_LOGIC;
|
SIGNAL nce, nwe, noe : STD_LOGIC;
|
SIGNAL dealloc_mem : BOOLEAN;
|
SIGNAL dealloc_mem : BOOLEAN;
|
SIGNAL to_srv : to_srv_typ;
|
SIGNAL to_srv : to_srv_typ;
|
SIGNAL frm_srv : STD_LOGIC_VECTOR(d'RANGE);
|
SIGNAL frm_srv : STD_LOGIC_VECTOR(d'RANGE);
|
SIGNAL tie_vdd : STD_LOGIC := '1';
|
SIGNAL tie_vdd : STD_LOGIC := '1';
|
BEGIN
|
BEGIN
|
dut : single_port
|
dut : single_port
|
PORT MAP (
|
PORT MAP (
|
d => d,
|
d => d,
|
a => a,
|
a => a,
|
q => q,
|
q => q,
|
rnw => rnw,
|
nce => nce,
|
|
nwe => nwe,
|
|
noe => noe,
|
dealloc_mem => dealloc_mem);
|
dealloc_mem => dealloc_mem);
|
|
|
tc : tc_single_port
|
tc : tc_single_port
|
PORT MAP (
|
PORT MAP (
|
to_srv => to_srv,
|
to_srv => to_srv,
|
Line 126... |
Line 133... |
REPORT "initialized"
|
REPORT "initialized"
|
SEVERITY NOTE;
|
SEVERITY NOTE;
|
WHEN read => -- perform memory read
|
WHEN read => -- perform memory read
|
d <= STD_LOGIC_VECTOR(TO_SIGNED(to_srv.data, d'length));
|
d <= STD_LOGIC_VECTOR(TO_SIGNED(to_srv.data, d'length));
|
a <= STD_LOGIC_VECTOR(TO_UNSIGNED(to_srv.addr, a'length));
|
a <= STD_LOGIC_VECTOR(TO_UNSIGNED(to_srv.addr, a'length));
|
rnw <= '1';
|
nce <= '0';
|
|
noe <= '0';
|
|
nwe <= '1';
|
-- Wait for data to appear
|
-- Wait for data to appear
|
WAIT FOR ACCESS_DELAY;
|
WAIT FOR ACCESS_DELAY;
|
WHEN write => -- perform memory write
|
WHEN write => -- perform memory write
|
d <= STD_LOGIC_VECTOR(TO_SIGNED(to_srv.data, d'length));
|
d <= STD_LOGIC_VECTOR(TO_SIGNED(to_srv.data, d'length));
|
a <= STD_LOGIC_VECTOR(TO_UNSIGNED(to_srv.addr, a'length));
|
a <= STD_LOGIC_VECTOR(TO_UNSIGNED(to_srv.addr, a'length));
|
rnw <= '0';
|
nce <= '0';
|
|
noe <= '1';
|
|
nwe <= '0';
|
WAIT FOR ACCESS_DELAY;
|
WAIT FOR ACCESS_DELAY;
|
WHEN dealloc => -- deallocate the linked list for the LL architecture
|
WHEN dealloc => -- deallocate the linked list for the LL architecture
|
dealloc_mem <= true;
|
dealloc_mem <= true;
|
WHEN end_test => -- reached the end of the test case
|
WHEN end_test => -- reached the end of the test case
|
WAIT;
|
WAIT;
|