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

Subversion Repositories risc5x

[/] [risc5x/] [trunk/] [pkg_prims.vhd] - Blame information for rev 5

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

Line No. Rev Author Line
1 2 mikej
--
2
-- Risc5x
3
-- www.OpenCores.Org - November 2001
4
--
5
--
6
-- This library is free software; you can distribute it and/or modify it
7
-- under the terms of the GNU Lesser General Public License as published
8
-- by the Free Software Foundation; either version 2.1 of the License, or
9
-- (at your option) any later version.
10
--
11
-- This library is distributed in the hope that it will be useful, but
12
-- WITHOUT ANY WARRANTY; without even the implied warranty of
13
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
-- See the GNU Lesser General Public License for more details.
15
--
16
-- A RISC CPU core.
17
--
18
-- (c) Mike Johnson 2001. All Rights Reserved.
19
-- mikej@opencores.org for support or any other issues.
20
--
21
-- Revision list
22
--
23
-- version 1.0 initial opencores release
24
--
25
 
26
library ieee;
27
  use ieee.std_logic_1164.all;
28
 
29
package pkg_prims is
30
 
31
  component MUX8
32
    generic (
33
      WIDTH         : in  natural;
34
      OP_REG        : in  boolean
35
      );
36
    port (
37
      DIN7          : in  std_logic_vector(WIDTH-1 downto 0);
38
      DIN6          : in  std_logic_vector(WIDTH-1 downto 0);
39
      DIN5          : in  std_logic_vector(WIDTH-1 downto 0);
40
      DIN4          : in  std_logic_vector(WIDTH-1 downto 0);
41
      DIN3          : in  std_logic_vector(WIDTH-1 downto 0);
42
      DIN2          : in  std_logic_vector(WIDTH-1 downto 0);
43
      DIN1          : in  std_logic_vector(WIDTH-1 downto 0);
44
      DIN0          : in  std_logic_vector(WIDTH-1 downto 0);
45
 
46
      SEL           : in  std_logic_vector(2 downto 0);
47
      ENA           : in  std_logic;
48
      CLK           : in  std_logic;
49
 
50
      DOUT          : out std_logic_vector(WIDTH-1 downto 0)
51
      );
52
  end component;
53
 
54
  component MUX4
55
    generic (
56
      WIDTH         : in  natural;
57
      SLICE         : in  natural;
58
      OP_REG        : in  boolean
59
      );
60
    port (
61
      DIN3          : in  std_logic_vector(WIDTH-1 downto 0);
62
      DIN2          : in  std_logic_vector(WIDTH-1 downto 0);
63
      DIN1          : in  std_logic_vector(WIDTH-1 downto 0);
64
      DIN0          : in  std_logic_vector(WIDTH-1 downto 0);
65
 
66
      SEL           : in  std_logic_vector(1 downto 0);
67
      ENA           : in  std_logic;
68
      CLK           : in  std_logic;
69
 
70
      DOUT          : out std_logic_vector(WIDTH-1 downto 0)
71
      );
72
  end component;
73
 
74
  component MUX2
75
    generic (
76
      WIDTH         : in  natural;
77
      SLICE         : in  natural;
78
      OP_REG        : in  boolean
79
      );
80
    port (
81
      DIN1          : in  std_logic_vector(WIDTH-1 downto 0);
82
      DIN0          : in  std_logic_vector(WIDTH-1 downto 0);
83
 
84
      SEL           : in  std_logic;
85
      ENA           : in  std_logic;
86
      CLK           : in  std_logic;
87
 
88
      DOUT          : out std_logic_vector(WIDTH-1 downto 0)
89
      );
90
  end component;
91
 
92
  component MUX2_ADD_REG
93
    generic (
94
      WIDTH         : in  natural
95
      );
96
    port (
97
      ADD_VAL       : in  std_logic_vector(WIDTH-1 downto 0);
98
      LOAD_VAL      : in  std_logic_vector(WIDTH-1 downto 0);
99
 
100
      ADD           : in  std_logic;
101
 
102
      PRESET        : in  std_logic; -- async
103
      ENA           : in  std_logic;
104
      CLK           : in  std_logic;
105
 
106
      DOUT          : out std_logic_vector(WIDTH-1 downto 0);
107
      REG_DOUT      : out std_logic_vector(WIDTH-1 downto 0)
108
      );
109
  end component;
110
 
111
  component ADD_SUB
112
    generic (
113
      WIDTH         : in  natural
114
      );
115
    port (
116
      A             : in  std_logic_vector(WIDTH-1 downto 0);
117
      B             : in  std_logic_vector(WIDTH-1 downto 0);
118
 
119
      ADD_OR_SUB    : in  std_logic; -- high for DOUT <= A +/- B, low for DOUT <= A
120
      DO_SUB        : in  std_logic; -- high for DOUT <= A   - B, low for DOUT <= A + B
121
 
122
      CARRY_OUT     : out std_logic_vector(WIDTH-1 downto 0);
123
      DOUT          : out std_logic_vector(WIDTH-1 downto 0)
124
      );
125
  end component;
126
 
127
  component ALUBIT
128
    generic (
129
      WIDTH         : in  natural
130
      );
131
    port (
132
      A             : in  std_logic_vector(WIDTH-1 downto 0);
133
      B             : in  std_logic_vector(WIDTH-1 downto 0);
134
      OP            : in  std_logic_vector(1 downto 0);
135
 
136
      DOUT          : out std_logic_vector(WIDTH-1 downto 0)
137
      );
138
  end component;
139
 
140
end;

powered by: WebSVN 2.1.0

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