Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- The testbench for t8048.
|
-- The testbench for t8048.
|
--
|
--
|
-- $Id: tb_t8048.vhd,v 1.3 2004-04-14 20:57:44 arniml Exp $
|
-- $Id: tb_t8048.vhd,v 1.4 2004-04-18 19:00:58 arniml Exp $
|
--
|
--
|
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
|
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
|
--
|
--
|
-- All rights reserved
|
-- All rights reserved
|
--
|
--
|
Line 89... |
Line 89... |
signal ram_data_to_s : std_logic_vector( 7 downto 0);
|
signal ram_data_to_s : std_logic_vector( 7 downto 0);
|
signal ram_data_from_s : std_logic_vector( 7 downto 0);
|
signal ram_data_from_s : std_logic_vector( 7 downto 0);
|
signal ram_addr_s : std_logic_vector( 7 downto 0);
|
signal ram_addr_s : std_logic_vector( 7 downto 0);
|
signal ram_we_s : std_logic;
|
signal ram_we_s : std_logic;
|
|
|
signal t0_s : std_logic;
|
|
signal t1_s : std_logic;
|
|
signal p1_b : std_logic_vector( 7 downto 0);
|
signal p1_b : std_logic_vector( 7 downto 0);
|
signal p2_b : std_logic_vector( 7 downto 0);
|
signal p2_b : std_logic_vector( 7 downto 0);
|
|
|
signal db_b : std_logic_vector( 7 downto 0);
|
signal db_b : std_logic_vector( 7 downto 0);
|
signal ext_ram_addr_s : std_logic_vector( 7 downto 0);
|
signal ext_ram_addr_s : std_logic_vector( 7 downto 0);
|
Line 109... |
Line 107... |
begin
|
begin
|
|
|
zero_s <= '0';
|
zero_s <= '0';
|
one_s <= '1';
|
one_s <= '1';
|
|
|
t0_s <= 'H';
|
|
t1_s <= 'H';
|
|
p2_b <= (others => 'H');
|
p2_b <= (others => 'H');
|
p1_b <= (others => 'H');
|
p1_b <= (others => 'H');
|
|
|
ext_ram_b : syn_ram
|
ext_ram_b : syn_ram
|
generic map (
|
generic map (
|
Line 131... |
Line 127... |
|
|
t8048_b : t8048
|
t8048_b : t8048
|
port map (
|
port map (
|
xtal_i => xtal_s,
|
xtal_i => xtal_s,
|
reset_n_i => res_n_s,
|
reset_n_i => res_n_s,
|
t0_b => t0_s,
|
t0_b => p1_b(0),
|
int_n_i => int_n_s,
|
int_n_i => int_n_s,
|
ea_i => zero_s,
|
ea_i => zero_s,
|
rd_n_o => rd_n_s,
|
rd_n_o => rd_n_s,
|
psen_n_o => psen_n_s,
|
psen_n_o => psen_n_s,
|
wr_n_o => wr_n_s,
|
wr_n_o => wr_n_s,
|
ale_o => ale_s,
|
ale_o => ale_s,
|
db_b => db_b,
|
db_b => db_b,
|
t1_i => t1_s,
|
t1_i => p1_b(1),
|
p2_b => p2_b,
|
p2_b => p2_b,
|
p1_b => p1_b,
|
p1_b => p1_b,
|
prog_n_o => prog_n_s
|
prog_n_o => prog_n_s
|
);
|
);
|
|
|
Line 151... |
Line 147... |
|
|
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
-- External RAM access signals
|
-- External RAM access signals
|
--
|
--
|
ext_ram: process (wr_n_s,
|
ext_ram: process (wr_n_s,
|
ext_ram_addr_s,
|
|
ale_s,
|
ale_s,
|
db_b)
|
db_b)
|
-- clk_s)
|
|
begin
|
begin
|
if ale_s'event and ale_s = '0' then
|
if ale_s'event and ale_s = '0' then
|
if not is_X(db_b) then
|
if not is_X(db_b) then
|
ext_ram_addr_s <= db_b;
|
ext_ram_addr_s <= db_b;
|
else
|
else
|
Line 263... |
Line 257... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.3 2004/04/14 20:57:44 arniml
|
|
-- wait for instruction strobe after final end-of-simulation detection
|
|
-- this ensures that the last mov instruction is part of the dump and
|
|
-- enables 100% matching with i8039 simulator
|
|
--
|
-- Revision 1.2 2004/03/26 22:39:28 arniml
|
-- Revision 1.2 2004/03/26 22:39:28 arniml
|
-- enhance simulation result string
|
-- enhance simulation result string
|
--
|
--
|
-- Revision 1.1 2004/03/24 21:42:10 arniml
|
-- Revision 1.1 2004/03/24 21:42:10 arniml
|
-- initial check-in
|
-- initial check-in
|