1 |
2 |
joaocarlos |
--
|
2 |
|
|
-- Package File Template
|
3 |
|
|
--
|
4 |
|
|
-- Purpose: This package defines supplemental types, subtypes,
|
5 |
|
|
-- constants, and functions
|
6 |
|
|
--
|
7 |
|
|
-- To use any of the example code shown below, uncomment the lines and modify as necessary
|
8 |
|
|
--
|
9 |
|
|
|
10 |
4 |
joaocarlos |
library ieee;
|
11 |
|
|
use ieee.std_logic_1164.all;
|
12 |
2 |
joaocarlos |
|
13 |
|
|
package Operations is
|
14 |
|
|
constant add: std_logic_vector (4 downto 0) := "00000";
|
15 |
|
|
constant addinc: std_logic_vector (4 downto 0) := "00001";
|
16 |
|
|
constant inca: std_logic_vector (4 downto 0) := "00011";
|
17 |
|
|
constant subdec: std_logic_vector (4 downto 0) := "00100";
|
18 |
|
|
constant sub: std_logic_vector (4 downto 0) := "00101";
|
19 |
|
|
constant deca: std_logic_vector (4 downto 0) := "00110";
|
20 |
|
|
constant lsl: std_logic_vector (4 downto 0) := "01000"; -- Left shift logic
|
21 |
|
|
constant asr: std_logic_vector (4 downto 0) := "01001"; -- Aritmetic shift right
|
22 |
|
|
constant zeros: std_logic_vector (4 downto 0) := "10000";
|
23 |
|
|
constant land: std_logic_vector (4 downto 0) := "10001"; -- Logic and
|
24 |
|
|
constant andnota: std_logic_vector (4 downto 0) := "10010";
|
25 |
|
|
constant passb: std_logic_vector (4 downto 0) := "10011";
|
26 |
|
|
constant andnotb: std_logic_vector (4 downto 0) := "10100";
|
27 |
|
|
constant passa: std_logic_vector (4 downto 0) := "10101";
|
28 |
|
|
constant lxor: std_logic_vector (4 downto 0) := "10110"; -- Logic XOR
|
29 |
|
|
constant lor: std_logic_vector (4 downto 0) := "10111"; -- Logic OR
|
30 |
|
|
constant lnor: std_logic_vector (4 downto 0) := "11000"; -- Logic NOR
|
31 |
|
|
constant lxnor: std_logic_vector (4 downto 0) := "11001"; -- Logic XOR
|
32 |
|
|
constant passnota: std_logic_vector (4 downto 0) := "11010";
|
33 |
|
|
constant ornota: std_logic_vector (4 downto 0) := "11011";
|
34 |
|
|
constant passnotb: std_logic_vector (4 downto 0) := "11100";
|
35 |
|
|
constant ornotb: std_logic_vector (4 downto 0) := "11101";
|
36 |
|
|
constant lnand: std_logic_vector (4 downto 0) := "11110"; -- Logic NAND
|
37 |
|
|
constant ones: std_logic_vector (4 downto 0) := "11111";
|
38 |
|
|
constant lcl: std_logic_vector (4 downto 0) := "00010"; -- Load constant low
|
39 |
|
|
constant lch: std_logic_vector (4 downto 0) := "00111"; -- Load constant high
|
40 |
|
|
end Operations;
|