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

Subversion Repositories jart

[/] [jart/] [trunk/] [BLRT/] [p1ax.vhd] - Blame information for rev 87

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

Line No. Rev Author Line
1 23 jguarin200
library ieee;
2
use ieee.std_logic_1164.all;
3 38 jguarin200
use ieee.std_logic_arith.all;
4 23 jguarin200
use ieee.std_logic_signed.all;
5
 
6
entity p1ax is
7
        generic (       W       : integer := 36 );
8
 
9
        port    (
10
                                clk,rst,enable          : in std_logic; -- The usual control signals.
11
                                dataa,datab,datac       : in std_logic_vector (W-1 downto 0);
12
                                result                          : out std_logic_vector (W-1 downto 0)
13
        );
14
 
15
end entity;
16
 
17
architecture rtl of p1ax is
18
 
19 38 jguarin200
        signal sdresult0        : std_logic_vector (W-1 downto 0);
20
        --signal sdresult1      : std_logic_vector (W-1 downto 0);
21 23 jguarin200
 
22
 
23
begin
24
 
25 38 jguarin200
        sdresult0 <= dataa+datab+datac;
26
        --sdresult1 <= sdresult0+datac;
27 23 jguarin200
        process (clk,rst,enable)
28
        begin
29
 
30
                if rst = '0' then
31
 
32
                        result <= (others =>'0');
33
 
34
                elsif rising_edge(clk) and enable ='1' then
35 38 jguarin200
 
36
 
37
                        result <= sdresult0;
38 23 jguarin200
 
39
                end if;
40
 
41
        end process;
42
 
43
 
44
 
45
 
46
end rtl;
47
 
48
 
49
 
50 38 jguarin200
 
51 23 jguarin200
 
52
 
53
 
54
 
55
 

powered by: WebSVN 2.1.0

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