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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [vhdl/] [tbench.vhd] - Blame information for rev 265

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 139 rhoads
   "TRI_PORT_X";
22
--   "DUAL_PORT_";
23
--   "ALTERA_LPM";
24
--   "XILINX_16X";
25 48 rhoads
 
26
   constant log_file  : string :=
27 139 rhoads
--   "UNUSED";
28 48 rhoads
   "output.txt";
29
 
30 7 rhoads
   signal clk         : std_logic := '1';
31
   signal reset       : std_logic := '1';
32 2 rhoads
   signal interrupt   : std_logic := '0';
33
   signal mem_write   : std_logic;
34 139 rhoads
   signal mem_address : std_logic_vector(31 downto 2);
35 47 rhoads
   signal mem_data    : std_logic_vector(31 downto 0);
36
   signal mem_pause   : std_logic := '0';
37 2 rhoads
   signal mem_byte_sel: std_logic_vector(3 downto 0);
38 139 rhoads
   --signal uart_read   : std_logic;
39 48 rhoads
   signal uart_write  : std_logic;
40 139 rhoads
   signal data_read   : std_logic_vector(31 downto 0);
41 2 rhoads
begin  --architecture
42 139 rhoads
   --Uncomment the line below to test interrupts
43
   interrupt <= '1' after 20 us when interrupt = '0' else '0' after 445 ns;
44
 
45
   clk   <= not clk after 50 ns;
46 48 rhoads
   reset <= '0' after 500 ns;
47 139 rhoads
   --mem_pause <= not mem_pause after 100 ns;
48
   --uart_read <= '0';
49
   data_read <= interrupt & ZERO(30 downto 0);
50 2 rhoads
 
51 139 rhoads
   u1_plasma: plasma
52 48 rhoads
      generic map (memory_type => memory_type,
53
                   log_file    => log_file)
54 47 rhoads
      PORT MAP (
55 139 rhoads
         clk               => clk,
56
         reset             => reset,
57
         uart_read         => uart_write,
58
         uart_write        => uart_write,
59 47 rhoads
 
60 139 rhoads
         address           => mem_address,
61 265 rhoads
         byte_we           => mem_byte_sel,
62 139 rhoads
         data_write        => mem_data,
63
         data_read         => data_read,
64
         mem_pause_in      => mem_pause,
65
 
66
         gpio0_out         => open,
67
         gpioA_in          => data_read);
68 2 rhoads
 
69
end; --architecture logic

powered by: WebSVN 2.1.0

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