-- $(lic)
-- $(help_generic)
-- $(help_local)
library ieee;
use ieee.std_logic_1164.all;
use work.armshiefter.all;
use work.armpctrl.all;
use work.armctrl.all;
use work.armpmodel.all;
use work.armdecode.all;
use work.arm_comp.all;
entity armiu_rsstg is
port (
rst : in std_logic;
clk : in std_logic;
i : in armiu_rsstg_typ_in;
o : out armiu_rsstg_typ_out
);
end armiu_rsstg;
architecture rtl of armiu_rsstg is
type armiu_rsstg_tmp_type is record
o : armiu_rsstg_typ_out;
commit : std_logic;
shieftout : std_logic_vector(31 downto 0);
cond_fail : std_logic;
end record;
type armiu_rsstg_reg_type is record
pctrl : apc_pctrl;
buf1 : std_logic_vector(31 downto 0);
buf2 : std_logic_vector(31 downto 0);
end record;
type armiu_rsstg_dbg_type is record
dummy : std_logic;
-- pragma translate_off
dbg : armiu_rsstg_tmp_type;
-- pragma translate_on
end record;
signal r, c : armiu_rsstg_reg_type;
signal rdbg, cdbg : armiu_rsstg_dbg_type;
begin
p0: process (clk, rst, r, i )
variable v : armiu_rsstg_reg_type;
variable t : armiu_rsstg_tmp_type;
variable vdbg : armiu_rsstg_dbg_type;
begin
-- $(init(t:armiu_rsstg_tmp_type))
v := r;
t.commit := not i.flush_v;
aas_shieft( r.pctrl.insn.insn,
r.pctrl.rs.rsop_sdir,
r.pctrl.rs.rsop_styp,
r.pctrl.data1,
r.pctrl.data2,
i.pstate.fromEX_cpsr_r.ex.c,
t.shieftout,
v.pctrl.rs.rs_shieftcarryout
);
-- reset
if ( rst = '0' ) then
end if;
-- pipeline propagation
t.o.pctrl_r := r.pctrl;
t.o.toEX_pctrl_v := v.pctrl;
-- pipeline flush
if not (t.commit = '1') then
t.o.toEX_pctrl_v.valid := '0';
end if;
case r.pctrl.rs.rsop_op1_src is
when apc_opsrc_through => t.o.toEX_pctrl_v.data1 := r.pctrl.data1;
when apc_opsrc_buf => t.o.toEX_pctrl_v.data1 := r.buf1;
when apc_opsrc_alures => t.o.toEX_pctrl_v.data1 := i.fromEX_alures_v;
when apc_opsrc_none =>
when others =>
end case;
case r.pctrl.rs.rsop_op2_src is
when apc_opsrc_through => t.o.toEX_pctrl_v.data2 := t.shieftout;
when apc_opsrc_buf => t.o.toEX_pctrl_v.data2 := r.buf2;
when apc_opsrc_alures => t.o.toEX_pctrl_v.data2 := i.fromEX_alures_v;
when apc_opsrc_none =>
when others =>
end case;
case r.pctrl.rs.rsop_buf1_src is
when apc_bufsrc_through => v.buf1 := r.pctrl.data1;
when apc_bufsrc_alures => v.buf1 := i.fromEX_alures_v;
when apc_bufsrc_none =>
when others =>
end case;
case r.pctrl.rs.rsop_buf2_src is
when apc_bufsrc_through => v.buf2 := t.shieftout;
when apc_bufsrc_alures => v.buf2 := i.fromEX_alures_v;
when apc_bufsrc_none =>
when others =>
end case;
t.cond_fail := '0'; -- tmp for dbg
if act_checkcond(i.fromEX_cpsr_v,r.pctrl.insn.insn(ADE_COND_U downto ADE_COND_D)) = '0' then
t.cond_fail := '1'; -- tmp for dbg
t.o.toEX_pctrl_v.valid := '0';
end if;
-- todo: add pctrl owner propagation
if i.pstate.hold_r.hold = '0' then
if apc_is_valid(i.fromRR_pctrl_v) then
v.pctrl := i.fromRR_pctrl_v;
else
if not apc_is_straddr(r.pctrl) then
v.pctrl := i.fromRR_pctrl_v;
else
-- wait for store data (coming after this one)
t.o.toEX_pctrl_v.valid := '0';
end if;
end if;
end if;
c <= v;
o <= t.o;
-- pragma translate_off
vdbg := rdbg;
vdbg.dbg := t;
cdbg <= vdbg;
-- pragma translate_on
end process p0;
pregs : process (clk, c)
begin
if rising_edge(clk) then
r <= c;
-- pragma translate_off
rdbg <= cdbg;
-- pragma translate_on
end if;
end process;
end rtl;
Enum astates defined in /tmp/build_html/vhdl/sparc/mmu_acache.vhd |
Enum rdatatype defined in /tmp/build_html/vhdl/sparc/mmu_icache.vhd |
Type cli_hold defined in /tmp/build_html/vhdl/core/libs/corelib.vhd |
Enum mcycletype defined in /tmp/build_html/vhdl/peripherals/mem/sdmctrl.vhd |
Constant zero defined in /tmp/build_html/vhdl/sparc/pci_gr.vhd |
Type apm_excpsr defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Type apm_wrcpsr defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Type apm_cpsr defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Enum ade_insntyp defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Enum ade_decinsn defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Enum ade_DAPRAM defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Enum ade_LDSTAMxLSV4AM defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Enum icycletype defined in /tmp/build_html/vhdl/peripherals/mem/sdmctrl.vhd |
Enum ade_pos defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Enum ash_sdir defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Type ade_amode defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Type ade_insn defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Type apc_rrstg defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Enum apc_rsop_opsrc defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Enum apc_rsop_bufsrc defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Enum ash_styp defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Enum txfsmtype defined in /tmp/build_html/vhdl/sparc/dcom_uart.vhd |
Type apc_rsstg defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Enum apc_exop_datasrc defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Enum apc_exop_bufsrc defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Enum cpins_type defined in /tmp/build_html/vhdl/sparc/fp1eu.vhd |
Type apc_exstg defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Type apc_dmstg defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Enum lmd_memsize defined in /tmp/build_html/vhdl/libs/memdef.vhd |
Type gdcl_param defined in /tmp/build_html/vhdl/mem/cache/libs/gendc_lib.vhd |
Type apc_mestg defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Constant APM_RREAL_U defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Constant APM_RREAL_D defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Enum slavestate defined in /tmp/build_html/vhdl/sparc/ahbtest.vhd |
Enum dsnoop_type defined in /tmp/build_html/vhdl/sparc/leon_target.vhd |
Enum apm_trap defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Type apm_trapctrl defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Type apc_wrstg defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Type apc_pctrl defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Type apc_pstate defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Type armiu_rsstg_typ_in defined in /tmp/build_html/vhdl/arm/arm_comp.vhd |
Type armiu_rsstg_typ_out defined in /tmp/build_html/vhdl/arm/arm_comp.vhd |
Type armiu_rsstg_tmp_type defined in /tmp/build_html/vhdl/arm/armiu_rsstg.vhd |
Type armiu_rsstg_reg_type defined in /tmp/build_html/vhdl/arm/armiu_rsstg.vhd |
Type armiu_rsstg_dbg_type defined in /tmp/build_html/vhdl/arm/armiu_rsstg.vhd |
Constant ASH_DAPRAMxLDSTAM_IMMROT_U defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Constant ASH_DAPRAMxLDSTAM_IMMROT_D defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Constant ASH_DAPRAMxLDSTAM_IMM_U defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Constant ASH_DAPRAMxLDSTAM_IMM_D defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Constant ASH_DAPRAMxLDSTAM_SIMM_U defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Constant ASH_DAPRAMxLDSTAM_SIMM_D defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Enum shift_src defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Procedure aas_shieft defined in /tmp/build_html/vhdl/arm/libs/armshiefter.vhd |
Enum states defined in /tmp/build_html/vhdl/sparc/mmutw.vhd |
Constant ADE_COND_EQ defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_NE defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_CS defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_CC defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_MI defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_PL defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_VS defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_VC defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_HI defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_LS defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_GE defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_LT defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_GT defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_LE defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_AL defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Constant ADE_COND_NV defined in /tmp/build_html/vhdl/arm/libs/armdecode.vhd |
Function act_checkcond defined in /tmp/build_html/vhdl/arm/libs/armctrl.vhd |
Constant APM_RREAL_PC defined in /tmp/build_html/vhdl/arm/libs/armpmodel.vhd |
Function apc_is_branch defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_mem defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_memload defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_straddr defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_strdata defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_rdlocked defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_rdlocked_by defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_rdfromalu defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_rswillshieft defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_exwillsetcpsr defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_usecpsr defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_flush defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
Function apc_is_valid defined in /tmp/build_html/vhdl/arm/libs/armpctrl.vhd |
If you have question mail to: Konrad Eisele<eiselekd@web.de>, created: Wed Apr 14 13:07:33 WEDT 2004
;
This is part of the Core distribution