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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [fastmux.vhd] - Blame information for rev 232

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

Line No. Rev Author Line
1 24 jguarin200
--! @file fastmux.vhd
2
--! @brief Multiplexor.
3 52 jguarin200
--! @author Julián Andrés Guarín Reyes.
4 24 jguarin200
-- RAYTRAC
5
-- Author Julian Andres Guarin
6
-- fastmux.vhd
7
-- This file is part of raytrac.
8
-- 
9
--     raytrac is free software: you can redistribute it and/or modify
10
--     it under the terms of the GNU General Public License as published by
11
--     the Free Software Foundation, either version 3 of the License, or
12
--     (at your option) any later version.
13
-- 
14
--     raytrac is distributed in the hope that it will be useful,
15
--     but WITHOUT ANY WARRANTY; without even the implied warranty of
16
--     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
--     GNU General Public License for more details.
18
-- 
19
--     You should have received a copy of the GNU General Public License
20
--     along with raytrac.  If not, see <http://www.gnu.org/licenses/>.
21
 
22 52 jguarin200
--! Libreria de definicion de senales y tipos estandares, comportamiento de operadores aritmeticos y logicos.
23 24 jguarin200
library ieee;
24 52 jguarin200
--! Paquete de definicion estandard de logica. 
25 24 jguarin200
use ieee.std_logic_1164.all;
26
 
27
entity fastmux is
28
        generic (
29
                width : integer := 18
30 26 jguarin200
        );
31 24 jguarin200
        port (
32 26 jguarin200
                a,b:in std_logic_vector(width-1 downto 0);
33 24 jguarin200
                s:in std_logic;
34 26 jguarin200
                c: out std_logic_vector(width-1 downto 0)
35
        );
36 24 jguarin200
end entity;
37
 
38 52 jguarin200
 
39
--! @brief Definicion arquitectura del mux
40
--! @details El Mux esta descrito de manera estructural, instanciado bit por bit en la salida, multiplexores de un solo bit.
41 24 jguarin200
architecture fastmux_arch of fastmux is
42
begin
43
 
44
        muxgen:
45 26 jguarin200
        for i in 0 to width-1 generate
46
                c(i) <= (a(i) and not(s)) or (b(i) and s);
47 24 jguarin200
        end generate muxgen;
48
 
49
 
50
 
51
end fastmux_arch;

powered by: WebSVN 2.1.0

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