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

Subversion Repositories pdp1

[/] [pdp1/] [trunk/] [rtl/] [vhdl/] [vgatest.vhd] - Blame information for rev 16

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

Line No. Rev Author Line
1 3 yannv
--------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:
4
--
5
-- Create Date:   20:11:59 02/13/2011
6
-- Design Name:   
7
-- Module Name:   /home/yann/fpga/work/pdp1/vgatest.vhd
8
-- Project Name:  pdp1-3
9
-- Target Device:  
10
-- Tool versions:  
11
-- Description:   
12
-- 
13
-- VHDL Test Bench Created by ISE for module: vga
14
-- 
15
-- Dependencies:
16
-- 
17
-- Revision:
18
-- Revision 0.01 - File Created
19
-- Additional Comments:
20
--
21
-- Notes: 
22
-- This testbench has been automatically generated using types std_logic and
23
-- std_logic_vector for the ports of the unit under test.  Xilinx recommends
24
-- that these types always be used for the top-level I/O of a design in order
25
-- to guarantee that the testbench will bind correctly to the post-implementation 
26
-- simulation model.
27
--------------------------------------------------------------------------------
28
LIBRARY ieee;
29
USE ieee.std_logic_1164.ALL;
30
USE ieee.std_logic_unsigned.all;
31
USE ieee.numeric_std.ALL;
32
 
33
ENTITY vgatest IS
34
END vgatest;
35
 
36
ARCHITECTURE behavior OF vgatest IS
37
 
38
    -- Component Declaration for the Unit Under Test (UUT)
39
 
40
    COMPONENT vga
41
    PORT(
42
         VGA_R : OUT  std_logic_vector(3 downto 0);
43
         VGA_G : OUT  std_logic_vector(3 downto 0);
44
         VGA_B : OUT  std_logic_vector(3 downto 0);
45
         VGA_HSYNC : OUT  std_logic;
46
         VGA_VSYNC : OUT  std_logic;
47
         CLK_50M : IN  std_logic;
48
         CLK_133M33 : IN  std_logic
49
        );
50
    END COMPONENT;
51
 
52
 
53
   --Inputs
54
   signal CLK_50M : std_logic := '0';
55
   signal CLK_133M33 : std_logic := '0';
56
 
57
        --Outputs
58
   signal VGA_R : std_logic_vector(3 downto 0);
59
   signal VGA_G : std_logic_vector(3 downto 0);
60
   signal VGA_B : std_logic_vector(3 downto 0);
61
   signal VGA_HSYNC : std_logic;
62
   signal VGA_VSYNC : std_logic;
63
 
64
   -- Clock period definitions
65
   constant CLK_50M_period : time := 20ns;
66
   constant CLK_133M33_period : time := 7.5ns;
67
 
68
BEGIN
69
 
70
        -- Instantiate the Unit Under Test (UUT)
71
   uut: vga PORT MAP (
72
          VGA_R => VGA_R,
73
          VGA_G => VGA_G,
74
          VGA_B => VGA_B,
75
          VGA_HSYNC => VGA_HSYNC,
76
          VGA_VSYNC => VGA_VSYNC,
77
          CLK_50M => CLK_50M,
78
          CLK_133M33 => CLK_133M33
79
        );
80
 
81
   -- Clock process definitions
82
   CLK_50M_process :process
83
   begin
84
                CLK_50M <= '0';
85
                wait for CLK_50M_period/2;
86
                CLK_50M <= '1';
87
                wait for CLK_50M_period/2;
88
   end process;
89
 
90
   CLK_133M33_process :process
91
   begin
92
                CLK_133M33 <= '0';
93
                wait for CLK_133M33_period/2;
94
                CLK_133M33 <= '1';
95
                wait for CLK_133M33_period/2;
96
   end process;
97
 
98
 
99
   -- Stimulus process
100
   stim_proc: process
101
   begin
102
      -- hold reset state for 100ms.
103
      wait for 100ms;
104
 
105
      wait for CLK_50M_period*10;
106
 
107
      -- insert stimulus here 
108
 
109
      wait;
110
   end process;
111
 
112
END;

powered by: WebSVN 2.1.0

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