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

Subversion Repositories signed_unsigned_multiplier_and_divider

[/] [signed_unsigned_multiplier_and_divider/] [trunk/] [sys_primegen_package.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 zpekic
--      Package File Template
2
--
3
--      Purpose: This package defines supplemental types, subtypes, 
4
--               constants, and functions 
5
 
6
 
7
library IEEE;
8
use IEEE.STD_LOGIC_1164.all;
9
use IEEE.numeric_std.all;
10
package sys_primegen_package is
11
 
12
-- 1 bit microinstruction fields
13
constant i_nop,         m_nop,  n_nop,  ci_zero, muldiv_nop,    uart_nop: std_logic             := '0';
14
constant i_load,        m_load,         n_load,         ci_one,         muldiv_start,   uart_send: std_logic            := '1';
15
 
16
-- 2 bit microinstruction fields
17
constant mode_umul: std_logic_vector(1 downto 0)                 := "00";
18
constant mode_smul: std_logic_vector(1 downto 0)                 := "01";
19
constant mode_udiv: std_logic_vector(1 downto 0)                 := "10";
20
constant mode_sdiv: std_logic_vector(1 downto 0)                 := "11";
21
 
22
-- 3 bit microinstruction fields
23
constant muxa_zero,     muxb_const, alu_adc,            if_next_else_next               : std_logic_vector(2 downto 0) := "000";
24
constant muxa_m,                muxb_m,         alu_sbc,                if_next_else_repeat     : std_logic_vector(2 downto 0) := "001";
25
constant muxa_arg0,     muxb_two,                                       if_goto_else_next               : std_logic_vector(2 downto 0) := "010";
26
constant muxa_n,                muxb_n,                                         if_gosub_else_next      : std_logic_vector(2 downto 0) := "011";
27
constant muxa_prod,     muxb_four,      alu_asc0,       if_return_else_next     : std_logic_vector(2 downto 0) := "100";
28
constant muxa_ibcd,     muxb_i,         alu_asc1,       if_goto_else_start      : std_logic_vector(2 downto 0) := "101";
29
constant muxa_nbcdh,    muxb_modulo,alu_asc2,   if_gosub_else_repeat    : std_logic_vector(2 downto 0) := "110";
30
constant muxa_nbcdl,    muxb_arg1,      alu_asc3                                                                        : std_logic_vector(2 downto 0) := "111";
31
 
32
-- 4 bit microinstruction fields
33
constant cond_buttonstart               : std_logic_vector(3 downto 0) := "0000";
34
constant cond_uartbusy                  : std_logic_vector(3 downto 0) := "0001";
35
constant cond_alugreaterthan    : std_logic_vector(3 downto 0) := "0010";
36
constant cond_alulessthan               : std_logic_vector(3 downto 0) := "0011";
37
constant cond_muldivready               : std_logic_vector(3 downto 0) := "0100";
38
constant cond_aluzero                   : std_logic_vector(3 downto 0) := "0101";
39
constant cond_muldiverror               : std_logic_vector(3 downto 0) := "0110";
40
constant cond_false                             : std_logic_vector(3 downto 0) := "0111";
41
constant cond_ibcdready                 : std_logic_vector(3 downto 0) := "1000";
42
constant cond_uartready                 : std_logic_vector(3 downto 0) := "1001";
43
constant cond_alugreaterorequal: std_logic_vector(3 downto 0):= "1010";
44
constant cond_nbcdready                 : std_logic_vector(3 downto 0) := "1011";
45
constant cond_muldivnotready    : std_logic_vector(3 downto 0) := "1100";
46
constant cond_alunotzero                : std_logic_vector(3 downto 0) := "1101";
47
constant cond_muldivok                  : std_logic_vector(3 downto 0) := "1110";
48
constant cond_true                              : std_logic_vector(3 downto 0) := "1111";
49
 
50
end sys_primegen_package;

powered by: WebSVN 2.1.0

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