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

Subversion Repositories b163arith

[/] [b163arith/] [trunk/] [dsp_xor.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 entactogen
 
2
-- Copyright (c) 2013 Antonio de la Piedra
3
 
4
-- This program is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License as published by
6
-- the Free Software Foundation, either version 3 of the License, or
7
-- (at your option) any later version.
8
 
9
-- This program is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-- GNU General Public License for more details.
13
 
14
-- You should have received a copy of the GNU General Public License
15
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
library IEEE;
18
use IEEE.STD_LOGIC_1164.ALL;
19
 
20
library UNISIM;
21
use UNISIM.VComponents.all;
22
 
23
entity dsp_xor is
24
        port (clk     : in std_logic;
25
                        op_1      : in std_logic_vector(47 downto 0);
26
                        op_2      : in std_logic_vector(47 downto 0);
27
                        op_3      : out std_logic_vector(47 downto 0));
28
end dsp_xor;
29
 
30
architecture Behavioral of dsp_xor is
31
 
32
        signal alumode_s : std_logic_vector(3 downto 0);
33
        signal opmode_s  : std_logic_vector(6 downto 0);
34
 
35
        signal a_s       : std_logic_vector(29 downto 0);
36
        signal b_s       : std_logic_vector(17 downto 0);
37
        signal c_s       : std_logic_vector(47 downto 0);
38
        signal p_s       : std_logic_vector(47 downto 0);
39
 
40
begin
41
 
42
        a_s <= op_1(47 downto 18);
43
        b_s <= op_1(17 downto 0);
44
        c_s <= op_2;
45
 
46
        alumode_s <= "0100";
47
        opmode_s <= "0110011";
48
 
49
        op_3 <= p_s;
50
 
51
dsp48e1_inst : dsp48e1
52
   generic map (
53
        ACASCREG => 0,
54
        ADREG => 1,
55
        ALUMODEREG => 0,
56
        AREG => 0,
57
        AUTORESET_PATDET => "NO_RESET",
58
        A_INPUT => "DIRECT",
59
        BCASCREG => 0,
60
        BREG => 0,
61
        B_INPUT => "DIRECT",
62
        CARRYINREG => 0,
63
        CARRYINSELREG => 0,
64
        CREG => 0,
65
        DREG => 1,
66
        INMODEREG       => 0,
67
        MASK => X"3FFFFFFFFFFF",
68
        MREG => 0,
69
        OPMODEREG       => 0,
70
        PATTERN => X"000000000000",
71
        PREG => 0,
72
        SEL_MASK => "MASK",
73
        SEL_PATTERN => "PATTERN",
74
        USE_DPORT        => FALSE,
75
        USE_MULT => "NONE",
76
        USE_PATTERN_DETECT      => "NO_PATDET",
77
        USE_SIMD => "ONE48")
78
   port map (
79
                  ACOUT => open,
80
        BCOUT => open,
81
        CARRYCASCOUT => open,
82
        CARRYOUT => open,
83
        MULTSIGNOUT => open,
84
        OVERFLOW => open,
85
        P => p_s,
86
        PATTERNBDETECT => open,
87
        PATTERNDETECT => open,
88
        PCOUT => open,
89
        UNDERFLOW => open,
90
        A  => a_s,
91
        ACIN  => (others => '0'),
92
        ALUMODE => alumode_s,
93
        B => b_s,
94
        BCIN => (others => '0'),
95
        C => c_s,
96
        CARRYCASCIN => '0',
97
        CARRYIN => '0',
98
        CARRYINSEL => (others => '0'),
99
        CEA1 => '0',
100
        CEA2  => '1',
101
        CEAD   => '0',
102
        CEALUMODE   => '0',
103
        CEB1 => '0',
104
        CEB2  => '1',
105
        CEC => '1',
106
        CECARRYIN  => '0',
107
        CECTRL   => '1',
108
        CED  => '0',
109
        CEINMODE  => '1',
110
        CEM => '0',
111
        CEP => '0',
112
        CLK => clk,
113
        D => (others => '0'),
114
        INMODE => (others => '0'),
115
        MULTSIGNIN => '0',
116
        OPMODE => opmode_s,
117
        PCIN => (others => '0'),
118
        RSTA => '0',
119
        RSTALLCARRYIN  => '0',
120
        RSTALUMODE => '0',
121
        RSTB  => '0',
122
        RSTC  => '0',
123
        RSTCTRL  => '0',
124
        RSTD  => '0',
125
        RSTINMODE  => '0',
126
        RSTM  => '0',
127
        RSTP => '0');
128
 
129
end Behavioral;

powered by: WebSVN 2.1.0

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