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

Subversion Repositories graphicsaccelerator

[/] [graphicsaccelerator/] [trunk/] [Bresenhammer_Sim.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 OmarMokhta
--------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:
4
--
5
-- Create Date:   19:52:32 05/14/2011
6
-- Design Name:   
7
-- Module Name:   /home/omar/LineFPGA/Bresenhammer_Sim.vhd
8
-- Project Name:  LineFPGA
9
-- Target Device:  
10
-- Tool versions:  
11
-- Description:   
12
-- 
13
-- VHDL Test Bench Created by ISE for module: Bresenhamer
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
 
31
-- Uncomment the following library declaration if using
32
-- arithmetic functions with Signed or Unsigned values
33
--USE ieee.numeric_std.ALL;
34
 
35
ENTITY Bresenhammer_Sim IS
36
END Bresenhammer_Sim;
37
 
38
ARCHITECTURE behavior OF Bresenhammer_Sim IS
39
 
40
    -- Component Declaration for the Unit Under Test (UUT)
41
 
42
    COMPONENT Bresenhamer
43
    PORT(
44
         WriteEnable : OUT  std_logic;
45
         X : OUT  std_logic_vector(9 downto 0);
46
         Y : OUT  std_logic_vector(8 downto 0);
47
         X1 : IN  std_logic_vector(9 downto 0);
48
         Y1 : IN  std_logic_vector(8 downto 0);
49
         X2 : IN  std_logic_vector(9 downto 0);
50
         Y2 : IN  std_logic_vector(8 downto 0);
51
         SS : OUT  std_logic_vector(3 downto 0);
52
         Clk : IN  std_logic;
53
         StartDraw : IN  std_logic;
54
                        dbg : out  STD_LOGIC_VECTOR (10 downto 0);
55
         Reset : IN  std_logic
56
        );
57
    END COMPONENT;
58
 
59
 
60
   --Inputs
61
   signal X1 : std_logic_vector(9 downto 0) := (others => '0');
62
   signal Y1 : std_logic_vector(8 downto 0) := (others => '0');
63
   signal X2 : std_logic_vector(9 downto 0) := (others => '0');
64
   signal Y2 : std_logic_vector(8 downto 0) := (others => '0');
65
   signal Clk : std_logic := '0';
66
   signal StartDraw : std_logic := '0';
67
   signal Reset : std_logic := '0';
68
 
69
        --Outputs
70
   signal WriteEnable : std_logic;
71
   signal X : std_logic_vector(9 downto 0);
72
   signal Y : std_logic_vector(8 downto 0);
73
   signal SS : std_logic_vector(3 downto 0);
74
        signal dbg : STD_LOGIC_VECTOR (10 downto 0);
75
 
76
   -- Clock period definitions
77
   constant Clk_period : time := 10 ns;
78
 
79
BEGIN
80
 
81
        -- Instantiate the Unit Under Test (UUT)
82
   uut: Bresenhamer PORT MAP (
83
          WriteEnable => WriteEnable,
84
          X => X,
85
          Y => Y,
86
          X1 => X1,
87
          Y1 => Y1,
88
          X2 => X2,
89
          Y2 => Y2,
90
          SS => SS,
91
          Clk => Clk,
92
          StartDraw => StartDraw,
93
                         dbg => dbg,
94
          Reset => Reset
95
        );
96
 
97
   -- Clock process definitions
98
   Clk_process :process
99
   begin
100
                Clk <= '0';
101
                wait for Clk_period/2;
102
                Clk <= '1';
103
                wait for Clk_period/2;
104
   end process;
105
 
106
 
107
   -- Stimulus process
108
   stim_proc: process
109
   begin
110
      -- hold reset state for 100 ns.
111
      StartDraw <= '1';
112
                X1 <= "0100000000";
113
                Y1 <= "010000111";
114
                X2 <= "0101001100";
115
                Y2 <= "010000000";
116
                Reset <= '0';
117
                wait for Clk_period*2;
118
                StartDraw <= '0';
119
      wait;
120
   end process;
121
 
122
END;

powered by: WebSVN 2.1.0

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