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

Subversion Repositories raytrac

[/] [raytrac/] [trunk/] [fastmux.vhd] - Diff between revs 26 and 52

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 26 Rev 52
--! @file fastmux.vhd
--! @file fastmux.vhd
--! @brief Multiplexor.
--! @brief Multiplexor.
--! @author Julián Andrés Guarín Reyes.
--! @author Julián Andrés Guarín Reyes.
-- RAYTRAC
-- RAYTRAC
-- Author Julian Andres Guarin
-- Author Julian Andres Guarin
-- fastmux.vhd
-- fastmux.vhd
-- This file is part of raytrac.
-- This file is part of raytrac.
-- 
-- 
--     raytrac is free software: you can redistribute it and/or modify
--     raytrac is free software: you can redistribute it and/or modify
--     it under the terms of the GNU General Public License as published by
--     it under the terms of the GNU General Public License as published by
--     the Free Software Foundation, either version 3 of the License, or
--     the Free Software Foundation, either version 3 of the License, or
--     (at your option) any later version.
--     (at your option) any later version.
-- 
-- 
--     raytrac is distributed in the hope that it will be useful,
--     raytrac is distributed in the hope that it will be useful,
--     but WITHOUT ANY WARRANTY; without even the implied warranty of
--     but WITHOUT ANY WARRANTY; without even the implied warranty of
--     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--     GNU General Public License for more details.
--     GNU General Public License for more details.
-- 
-- 
--     You should have received a copy of the GNU General Public License
--     You should have received a copy of the GNU General Public License
--     along with raytrac.  If not, see <http://www.gnu.org/licenses/>.
--     along with raytrac.  If not, see <http://www.gnu.org/licenses/>.
 
 
 
--! Libreria de definicion de senales y tipos estandares, comportamiento de operadores aritmeticos y logicos.
library ieee;
library ieee;
 
--! Paquete de definicion estandard de logica. 
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
 
 
entity fastmux is
entity fastmux is
        generic (
        generic (
                width : integer := 18
                width : integer := 18
        );
        );
        port (
        port (
                a,b:in std_logic_vector(width-1 downto 0);
                a,b:in std_logic_vector(width-1 downto 0);
                s:in std_logic;
                s:in std_logic;
                c: out std_logic_vector(width-1 downto 0)
                c: out std_logic_vector(width-1 downto 0)
        );
        );
end entity;
end entity;
 
 
 
 
 
--! @brief Definicion arquitectura del mux
 
--! @details El Mux esta descrito de manera estructural, instanciado bit por bit en la salida, multiplexores de un solo bit.
architecture fastmux_arch of fastmux is
architecture fastmux_arch of fastmux is
begin
begin
 
 
        muxgen:
        muxgen:
        for i in 0 to width-1 generate
        for i in 0 to width-1 generate
                c(i) <= (a(i) and not(s)) or (b(i) and s);
                c(i) <= (a(i) and not(s)) or (b(i) and s);
        end generate muxgen;
        end generate muxgen;
 
 
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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