URL
https://opencores.org/ocsvn/igor/igor/trunk
[/] [igor/] [trunk/] [processor/] [pl/] [forward.vhd] - Blame information for rev 4
Details |
Compare with Previous |
View Log
| Line No. |
Rev |
Author |
Line |
| 1 |
4 |
atypic |
library ieee;
|
| 2 |
|
|
use ieee.std_logic_1164.all;
|
| 3 |
|
|
library work;
|
| 4 |
|
|
use work.leval2_package.all;
|
| 5 |
|
|
|
| 6 |
|
|
|
| 7 |
|
|
entity Forward is
|
| 8 |
|
|
port (
|
| 9 |
|
|
AluIn2Src : in std_logic;
|
| 10 |
|
|
Branch : in std_logic;
|
| 11 |
|
|
IDEXR1 : in std_logic_vector(REGS_ADDR_BITS - 1 downto 0);
|
| 12 |
|
|
IDEXR2 : in std_logic_vector(REGS_ADDR_BITS - 1 downto 0);
|
| 13 |
|
|
EXMEMR1 : in std_logic_vector(REGS_ADDR_BITS - 1 downto 0);
|
| 14 |
|
|
EXMEMR2 : in std_logic_vector(REGS_ADDR_BITS - 1 downto 0);
|
| 15 |
|
|
M2WBR1 : in std_logic_vector(REGS_ADDR_BITS - 1 downto 0);
|
| 16 |
|
|
M2WBR2 :in std_logic_vector(REGS_ADDR_BITS - 1 downto 0);
|
| 17 |
|
|
FwdMux1Sel : out std_logic_vector(2 downto 0);
|
| 18 |
|
|
FwdMux2Sel : out std_logic_vector(2 downto 0)
|
| 19 |
|
|
);
|
| 20 |
|
|
end entity;
|
| 21 |
|
|
|
| 22 |
|
|
architecture behav of Forward is
|
| 23 |
|
|
begin
|
| 24 |
|
|
forwarding : process (AluIn2Src,Branch,IDEXR1,IDEXR2,EXMEMR1,EXMEMR2,M2WBR1,M2WBR2)
|
| 25 |
|
|
begin
|
| 26 |
|
|
-- Branch won't use result anyway.
|
| 27 |
|
|
if Branch = '1' then
|
| 28 |
|
|
FwdMux1Sel <= FWD_BRANCH;
|
| 29 |
|
|
elsif AluIn2Src = '1' then
|
| 30 |
|
|
FwdMux2Sel <= FWD_2_IMMEDIATE;
|
| 31 |
|
|
end if;
|
| 32 |
|
|
|
| 33 |
|
|
-- Output 1 select
|
| 34 |
|
|
if EXMEMR1 = IDEXR1 then
|
| 35 |
|
|
FwdMux1Sel <= FWD_1_EXMEM_ALURES;
|
| 36 |
|
|
elsif M2WBR2 = IDEXR1 then
|
| 37 |
|
|
FwdMux1Sel <= FWD_1_M2WB_MEMWRITEDATA;
|
| 38 |
|
|
elsif M2WBR1 = IDEXR1 then
|
| 39 |
|
|
FwdMux1Sel <= FWD_1_M2WB_ALURES;
|
| 40 |
|
|
end if;
|
| 41 |
|
|
|
| 42 |
|
|
-- Output 2 select
|
| 43 |
|
|
if M2WBR1 = IDEXR2 then
|
| 44 |
|
|
FwdMux2Sel <= FWD_2_M2WB_ALURES;
|
| 45 |
|
|
elsif M2WBR2 = IDEXR2 then
|
| 46 |
|
|
FwdMux2Sel <= FWD_2_M2WB_MEMWRITEDATA;
|
| 47 |
|
|
elsif EXMEMR1 = IDEXR2 then
|
| 48 |
|
|
FwdMux2Sel <= FWD_2_EXMEM_ALURES;
|
| 49 |
|
|
end if;
|
| 50 |
|
|
|
| 51 |
|
|
end process;
|
| 52 |
|
|
end architecture;
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.