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

Subversion Repositories distributed_intelligence

[/] [distributed_intelligence/] [trunk/] [SRC/] [inverser.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:    19:50:24 11/04/2009 
6
-- Design Name: 
7
-- Module Name:    inverser_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 inverser_x16 is
31
    Port ( data : in  STD_LOGIC_VECTOR (15 downto 0);
32
           inverse : in  STD_LOGIC;
33
           data_out : out  STD_LOGIC_VECTOR (15 downto 0));
34
end inverser_x16;
35
 
36
architecture Behavioral of inverser_x16 is
37
 
38
begin
39
        process(data, inverse)
40
        begin
41
                if inverse = '1' then
42
                        data_out(15) <= data(0);
43
                        data_out(14) <= data(1);
44
                        data_out(13) <= data(2);
45
                        data_out(12) <= data(3);
46
                        data_out(11) <= data(4);
47
                        data_out(10) <= data(5);
48
                        data_out(9) <= data(6);
49
                        data_out(8) <= data(7);
50
                        data_out(7) <= data(8);
51
                        data_out(6) <= data(9);
52
                        data_out(5) <= data(10);
53
                        data_out(4) <= data(11);
54
                        data_out(3) <= data(12);
55
                        data_out(2) <= data(13);
56
                        data_out(1) <= data(14);
57
                        data_out(0) <= data(15);
58
                else
59
                        data_out <= data;
60
                end if;
61
        end process;
62
 
63
end Behavioral;
64
 

powered by: WebSVN 2.1.0

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