2010-05-10 23:08:00 +03:00
|
|
|
---------------------------------------------------------------------
|
|
|
|
-- TITLE: Test Bench
|
|
|
|
-- AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
|
|
|
|
-- DATE CREATED: 4/21/01
|
|
|
|
-- FILENAME: tbench.vhd
|
|
|
|
-- PROJECT: Plasma CPU core
|
|
|
|
-- COPYRIGHT: Software placed into the public domain by the author.
|
|
|
|
-- Software 'as is' without warranty. Author liable for nothing.
|
|
|
|
-- DESCRIPTION:
|
|
|
|
-- This entity provides a test bench for testing the Plasma CPU core.
|
|
|
|
---------------------------------------------------------------------
|
|
|
|
library ieee;
|
|
|
|
use ieee.std_logic_1164.all;
|
|
|
|
use work.mlite_pack.all;
|
|
|
|
use ieee.std_logic_unsigned.all;
|
|
|
|
|
|
|
|
entity tbench is
|
|
|
|
end; --entity tbench
|
|
|
|
|
|
|
|
architecture logic of tbench is
|
|
|
|
constant memory_type : string :=
|
|
|
|
"TRI_PORT_X";
|
|
|
|
|
|
|
|
signal clk : std_logic := '1';
|
2010-05-26 05:49:58 +03:00
|
|
|
signal reset : std_logic := '0';
|
|
|
|
signal addr : std_logic_vector(12 downto 0);
|
|
|
|
signal sram_data : std_logic_vector(7 downto 0);
|
|
|
|
signal nwe : std_logic;
|
|
|
|
signal noe : std_logic;
|
|
|
|
signal ncs : std_logic;
|
|
|
|
signal led : std_logic;
|
2010-05-10 23:08:00 +03:00
|
|
|
|
2010-05-26 05:49:58 +03:00
|
|
|
signal TxD : std_logic;
|
|
|
|
begin --architecture
|
2010-05-10 23:08:00 +03:00
|
|
|
clk <= not clk after 50 ns;
|
2010-05-26 05:49:58 +03:00
|
|
|
reset <= '1' after 500 ns;
|
|
|
|
|
2010-05-10 23:08:00 +03:00
|
|
|
|
|
|
|
u1_plasma: plasma
|
2010-05-26 05:49:58 +03:00
|
|
|
generic map (memory_type => memory_type)
|
2010-05-10 23:08:00 +03:00
|
|
|
PORT MAP (
|
|
|
|
clk => clk,
|
|
|
|
reset => reset,
|
2010-05-26 05:49:58 +03:00
|
|
|
U_RxD => TxD,
|
|
|
|
U_TxD => TxD,
|
|
|
|
addr => addr,
|
|
|
|
sram_data => sram_data,
|
|
|
|
nwe => nwe,
|
|
|
|
noe => noe,
|
|
|
|
ncs => ncs,
|
|
|
|
led => led
|
2010-05-10 23:08:00 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
end; --architecture logic
|