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

Subversion Repositories distributed_intelligence

[/] [distributed_intelligence/] [trunk/] [SRC/] [generic_const_rdecal_x16.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 leoel
----------------------------------------------------------------------------------
2
-- Company: 
3
-- Engineer:  Léo Germond
4
-- 
5
-- Create Date:    14:34:40 11/05/2009 
6
-- Design Name: 
7
-- Module Name:    generic_const_rdecal_x16 - Behavioral 
8
-- Project Name: 
9
-- Target Devices: 
10
-- Tool versions: 
11
-- Description: 
12
--
13
-- Dependencies: 
14
--
15
-- Revision: 
16
-- Revision 0.01 - File Created
17
-- Additional Comments: 
18
--
19
----------------------------------------------------------------------------------
20
library IEEE;
21
use IEEE.STD_LOGIC_1164.ALL;
22
use IEEE.STD_LOGIC_ARITH.ALL;
23
use IEEE.STD_LOGIC_UNSIGNED.ALL;
24
 
25
---- Uncomment the following library declaration if instantiating
26
---- any Xilinx primitives in this code.
27
--library UNISIM;
28
--use UNISIM.VComponents.all;
29
 
30
entity generic_const_rdecal_x16 is
31
         generic
32
         (
33
                BIT_DECAL : natural range 0 to 15
34
         );
35
    Port ( data : in  STD_LOGIC_VECTOR (15 downto 0);
36
           en : in  STD_LOGIC;
37
           decal : out  STD_LOGIC_VECTOR (15 downto 0));
38
end generic_const_rdecal_x16;
39
 
40
architecture Behavioral of generic_const_rdecal_x16 is
41
        constant PADDING: STD_LOGIC_VECTOR(0 to BIT_DECAL-1) := (others => '0');
42
begin
43
        process(data, en)
44
        begin
45
                if en = '1' then
46
                        decal <= PADDING & data(15 downto BIT_DECAL);
47
                else
48
                        decal <= data;
49
                end if;
50
        end process;
51
end Behavioral;
52
 

powered by: WebSVN 2.1.0

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