OpenCores
URL https://opencores.org/ocsvn/mlite/mlite/trunk

Subversion Repositories mlite

[/] [mlite/] [trunk/] [vhdl/] [tbench.vhd] - Blame information for rev 102

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rhoads
---------------------------------------------------------------------
2
-- TITLE: Test Bench
3
-- AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
4
-- DATE CREATED: 4/21/01
5
-- FILENAME: tbench.vhd
6 43 rhoads
-- PROJECT: Plasma CPU core
7 2 rhoads
-- COPYRIGHT: Software placed into the public domain by the author.
8
--    Software 'as is' without warranty.  Author liable for nothing.
9
-- DESCRIPTION:
10 43 rhoads
--    This entity provides a test bench for testing the Plasma CPU core.
11 2 rhoads
---------------------------------------------------------------------
12
library ieee;
13
use ieee.std_logic_1164.all;
14 39 rhoads
use work.mlite_pack.all;
15 2 rhoads
 
16
entity tbench is
17
end; --entity tbench
18
 
19
architecture logic of tbench is
20 48 rhoads
   constant memory_type : string :=
21 51 rhoads
   "GENERIC";
22
--   "ALTERA";
23 48 rhoads
--   "XILINX";
24
 
25
   constant log_file  : string :=
26
--   "UNUSED"
27
   "output.txt";
28
 
29 7 rhoads
   signal clk         : std_logic := '1';
30
   signal reset       : std_logic := '1';
31 2 rhoads
   signal interrupt   : std_logic := '0';
32
   signal mem_write   : std_logic;
33
   signal mem_address : std_logic_vector(31 downto 0);
34 47 rhoads
   signal mem_data    : std_logic_vector(31 downto 0);
35
   signal mem_pause   : std_logic := '0';
36 2 rhoads
   signal mem_byte_sel: std_logic_vector(3 downto 0);
37 48 rhoads
   signal uart_read   : std_logic;
38
   signal uart_write  : std_logic;
39 2 rhoads
begin  --architecture
40
   clk <= not clk after 50 ns;
41 48 rhoads
   reset <= '0' after 500 ns;
42 2 rhoads
 
43 6 rhoads
   --Uncomment the line below to test interrupts
44 39 rhoads
--   interrupt <= '1' after 20 us when interrupt = '0' else '0' after 400 ns;
45 102 rhoads
   --Uncomment the line below to test mem_pause
46
--   mem_pause <= '1' after 500 ns when mem_pause = '0' else '0' after 200 ns;
47 6 rhoads
 
48 55 rhoads
   u1: plasma
49 48 rhoads
      generic map (memory_type => memory_type,
50
                   log_file    => log_file)
51 47 rhoads
      PORT MAP (
52 48 rhoads
         clk_in       => clk,
53 47 rhoads
         reset_in     => reset,
54
         intr_in      => interrupt,
55 48 rhoads
 
56
         uart_read    => uart_read,
57
         uart_write   => uart_write,
58 47 rhoads
 
59 48 rhoads
         mem_address_out  => mem_address,
60
         mem_data         => mem_data,
61
         mem_byte_sel_out => mem_byte_sel,
62
         mem_write_out    => mem_write,
63
         mem_pause_in     => mem_pause);
64 2 rhoads
 
65
end; --architecture logic
66 55 rhoads
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.