URL
https://opencores.org/ocsvn/opencpu32/opencpu32/trunk
[/] [opencpu32/] [trunk/] [hdl/] [opencpu32/] [Multiplexer4_1.vhd] - Diff between revs 27 and 42
Show entire file |
Details |
Blame |
View Log
Rev 27 |
Rev 42 |
Line 17... |
Line 17... |
Port ( A : in STD_LOGIC_VECTOR (n downto 0); --! First Input
|
Port ( A : in STD_LOGIC_VECTOR (n downto 0); --! First Input
|
B : in STD_LOGIC_VECTOR (n downto 0); --! Second Input
|
B : in STD_LOGIC_VECTOR (n downto 0); --! Second Input
|
C : in STD_LOGIC_VECTOR (n downto 0); --! Third Input
|
C : in STD_LOGIC_VECTOR (n downto 0); --! Third Input
|
D : in STD_LOGIC_VECTOR (n downto 0); --! Forth Input
|
D : in STD_LOGIC_VECTOR (n downto 0); --! Forth Input
|
E : in STD_LOGIC_VECTOR (n downto 0); --! Fifth Input
|
E : in STD_LOGIC_VECTOR (n downto 0); --! Fifth Input
|
sel : in STD_LOGIC_VECTOR (2 downto 0); --! Select inputs (1, 2, 3, 4, 5)
|
sel : in dpMuxInputs; --! Select inputs (1, 2, 3, 4, 5)
|
S : out STD_LOGIC_VECTOR (n downto 0)); --! Mux Output
|
S : out STD_LOGIC_VECTOR (n downto 0)); --! Mux Output
|
end Multiplexer4_1;
|
end Multiplexer4_1;
|
|
|
--! @brief Architure definition of the MUX
|
--! @brief Architure definition of the MUX
|
--! @details On this case we're going to use VHDL combinational description
|
--! @details On this case we're going to use VHDL combinational description
|
architecture Behavioral of Multiplexer4_1 is
|
architecture Behavioral of Multiplexer4_1 is
|
|
|
begin
|
begin
|
with sel select
|
with sel select
|
S <= A when "000",
|
S <= A when fromMemory,
|
B when "001",
|
B when fromImediate,
|
C when "010",
|
C when fromRegFileA,
|
D when "011",
|
D when fromRegFileB,
|
E when "100",
|
E when fromAlu,
|
(others => 'Z') when others;
|
(others => 'Z') when others;
|
|
|
end Behavioral;
|
end Behavioral;
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.