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

Subversion Repositories xucpu

[/] [xucpu/] [trunk/] [src/] [components/] [components.vhdl] - Blame information for rev 29

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

Line No. Rev Author Line
1 2 lcdsgmtr
-- Copyright 2015, Jürgen Defurne
2
--
3
-- This file is part of the Experimental Unstable CPU System.
4
--
5
-- The Experimental Unstable CPU System Is free software: you can redistribute
6
-- it and/or modify it under the terms of the GNU Lesser General Public License
7
-- as published by the Free Software Foundation, either version 3 of the
8
-- License, or (at your option) any later version.
9
--
10
-- The Experimental Unstable CPU System is distributed in the hope that it will
11
-- be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
13
-- General Public License for more details.
14
--
15
-- You should have received a copy of the GNU Lesser General Public License
16
-- along with Experimental Unstable CPU System. If not, see
17
-- http://www.gnu.org/licenses/lgpl.txt.
18
 
19
 
20
LIBRARY IEEE;
21
USE IEEE.STD_LOGIC_1164.ALL;
22
USE IEEE.numeric_std.ALL;
23
 
24
PACKAGE components IS
25
 
26
  COMPONENT data_reg
27
    GENERIC(
28
      w_data      : NATURAL RANGE 1 TO 32 := 16;
29
      reset_value : NATURAL               := 0);
30
    PORT (RST : IN  STD_LOGIC;
31
          CLK : IN  STD_LOGIC;
32
          ENA : IN  STD_LOGIC;
33
          D   : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
34
          Q   : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0));
35
  END COMPONENT;
36
 
37 9 lcdsgmtr
  COMPONENT data_reg_2 IS
38
 
39
    GENERIC (
40
      w_data      : NATURAL := 16;
41
      reset_value : NATURAL := 0);
42
 
43
    PORT (
44
      CLK : IN  STD_LOGIC;
45
      D   : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
46
      Q   : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0));
47
 
48
  END COMPONENT data_reg_2;
49
 
50 2 lcdsgmtr
  COMPONENT queue IS
51
    GENERIC (
52
      w_data : NATURAL RANGE 1 TO 32 := 16);
53
    PORT (
54
      rst   : IN  STD_LOGIC;
55
      clk   : IN  STD_LOGIC;
56
      we    : IN  STD_LOGIC;
57
      sh    : IN  STD_LOGIC;
58
      clear : IN  STD_LOGIC;
59
      full  : OUT STD_LOGIC;
60
      empty : OUT STD_LOGIC;
61
      d     : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
62
      q     : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0));
63
  END COMPONENT queue;
64
 
65
  COMPONENT regf IS
66
    GENERIC (
67
      w_data : NATURAL RANGE 1 TO 32 := 16;
68
      w_addr : NATURAL               := 4);
69
    PORT (clk : IN  STD_LOGIC;
70
          we  : IN  STD_LOGIC;
71
          a1  : IN  STD_LOGIC_VECTOR(w_addr - 1 DOWNTO 0);
72
          a2  : IN  STD_LOGIC_VECTOR(w_addr - 1 DOWNTO 0);
73
          d   : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
74
          q1  : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
75
          q2  : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0));
76
  END COMPONENT;
77
 
78
  COMPONENT alu IS
79
    GENERIC(
80
      w_data : NATURAL RANGE 1 TO 32 := 16);
81
    PORT(
82
      clk : IN  STD_LOGIC;
83
      op  : IN  STD_LOGIC_VECTOR(3 DOWNTO 0);
84
      A   : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
85
      B   : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
86
      Y   : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0));
87
  END COMPONENT;
88
 
89
  COMPONENT incr
90
    GENERIC(
91
      w_data : NATURAL RANGE 1 TO 32 := 16);
92
    PORT(
93
      A : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
94
      Y : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0));
95
  END COMPONENT;
96
 
97 28 lcdsgmtr
  --COMPONENT memory IS
98
  --  GENERIC(
99
  --    w_data : NATURAL RANGE 1 TO 32 := 16);
100
  --  PORT(clk : IN  STD_LOGIC;
101
  --       A1  : IN  STD_LOGIC_VECTOR(14 DOWNTO 0);
102
  --       B1  : IN  STD_LOGIC_VECTOR(14 DOWNTO 0);
103
  --       we  : IN  STD_LOGIC;
104
  --       D   : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
105
  --       A   : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
106
  --       B   : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0));
107
  --END COMPONENT;
108 2 lcdsgmtr
 
109
  COMPONENT gpio_in
110
    GENERIC(
111
      w_data : NATURAL RANGE 1 TO 32 := 16;
112
      w_port : NATURAL RANGE 1 TO 32 := 16);
113
    PORT (rst     : IN  STD_LOGIC;
114
          clk     : IN  STD_LOGIC;
115
          ena     : IN  STD_LOGIC;
116
          Q       : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
117
          port_in : IN  STD_LOGIC_VECTOR(w_port - 1 DOWNTO 0));
118
  END COMPONENT;
119
 
120
  COMPONENT gpio_out
121
    GENERIC(
122
      w_data : NATURAL RANGE 1 TO 32 := 16;
123
      w_port : NATURAL RANGE 1 TO 32 := 16);
124
    PORT (rst      : IN  STD_LOGIC;
125
          clk      : IN  STD_LOGIC;
126
          ena      : IN  STD_LOGIC;
127
          we       : IN  STD_LOGIC;
128
          D        : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
129
          Q        : OUT STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
130
          port_out : OUT STD_LOGIC_VECTOR(w_port - 1 DOWNTO 0));
131
  END COMPONENT;
132
 
133
  COMPONENT decoder
134
    PORT (
135
      clk     : IN  STD_LOGIC;
136
      ena     : IN  STD_LOGIC;
137
      a1      : IN  STD_LOGIC_VECTOR(14 DOWNTO 0);
138
      gpio_1  : OUT STD_LOGIC;
139
      gpio_2  : OUT STD_LOGIC;
140
      gpio_3  : OUT STD_LOGIC;
141
      bus_sel : OUT STD_LOGIC_VECTOR(2 DOWNTO 0));
142
  END COMPONENT;
143
 
144
  COMPONENT zerof
145
    GENERIC (
146
      w_data : NATURAL RANGE 1 TO 32 := 16);
147
    PORT (
148
      A    : IN  STD_LOGIC_VECTOR(w_data - 1 DOWNTO 0);
149
      zero : OUT STD_LOGIC);
150
  END COMPONENT;
151
 
152
  COMPONENT clock_gen
153
    PORT (
154
      CLK_IN    : IN  STD_LOGIC;
155
      RESET     : IN  STD_LOGIC;
156
      CLK_VALID : OUT STD_LOGIC;
157
      CLK_OUT   : OUT STD_LOGIC
158
      );
159
  END COMPONENT;
160
 
161
  COMPONENT sync_reset
162
    PORT (
163
      async_rst : IN  STD_LOGIC;
164
      clk       : IN  STD_LOGIC;
165
      clk_valid : IN  STD_LOGIC;
166
      rst       : OUT STD_LOGIC);
167
  END COMPONENT;
168
 
169
  COMPONENT control
170
  END COMPONENT;
171
 
172
END components;

powered by: WebSVN 2.1.0

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