-- $(lic)
-- $(help_generic)
-- $(help_local)
library ieee;
use ieee.std_logic_1164.all;
use work.armpctrl.all;
use work.armdecode.all;
use work.arm_comp.all;
use work.armpmodel.all;
use work.ctrl_comp.all;
entity armiu_mestg is
port (
rst : in std_logic;
clk : in std_logic;
i : in armiu_mestg_typ_in;
o : out armiu_mestg_typ_out
);
end armiu_mestg;
architecture rtl of armiu_mestg is
type armiu_mestg_tmp_type is record
o : armiu_mestg_typ_out;
commit : std_logic;
meid : std_logic_vector(2 downto 0);
wrid : std_logic_vector(2 downto 0);
end record;
type armiu_mestg_reg_type is record
pctrl : apc_pctrl;
mexc : std_logic;
end record;
type armiu_mestg_dbg_type is record
dummy : std_logic;
-- pragma translate_off
dbg : armiu_mestg_tmp_type;
-- pragma translate_on
end record;
signal r, c : armiu_mestg_reg_type;
signal rdbg, cdbg : armiu_mestg_dbg_type;
begin
p0: process (clk, rst, r, i )
variable v : armiu_mestg_reg_type;
variable t : armiu_mestg_tmp_type;
variable vdbg : armiu_mestg_dbg_type;
begin
-- $(init(t:armiu_mestg_tmp_type))
v := r;
t.commit := not i.flush_v ;
t.meid := i.pstate.fromME_pctrl_r.insn.id;
t.wrid := i.pstate.fromWR_pctrl_r.insn.id;
--if i.dco.me_mexc = '1' then
-- v.mexc := '1';
--end if;
-- swp addresses
t.o.dci.addr_in := i.pstate.fromDM_pctrl_r.data1;
case i.pstate.fromDM_pctrl_r.insn.decinsn is
when type_arm_swp =>
t.o.dci.addr_in(1 downto 0) := (others => '0');
when others =>
end case;
t.o.dci.addr_re := r.pctrl.data1;
t.o.dci.atomic_readwrite := '0';
case r.pctrl.insn.decinsn is
when type_arm_swp =>
t.o.dci.addr_re(1 downto 0) := (others => '0');
t.o.dci.atomic_readwrite := '1';
when others =>
end case;
-- reset
if ( rst = '0' ) then
v.mexc := '0';
end if;
-- pipeline propagation
t.o.pctrl_r := r.pctrl;
t.o.toWR_pctrl_v := v.pctrl;
-- irq
if (not (i.irqo.irl = IRQ_NOIRQ)) and
(not (t.meid = t.wrid)) then
t.commit := '0';
t.o.toWR_pctrl_v.wr.wrop_trap.trap := '1';
t.o.toWR_pctrl_v.wr.wrop_trap.traptype := apm_trap_irq;
t.o.toWR_pctrl_v.data2(3 downto 0) := i.irqo.irl;
end if;
-- dcache input
t.o.dci.data_in := i.pstate.fromDM_pctrl_r.data2;
t.o.dci.data_re := r.pctrl.data2;
t.o.dci.addrin_re := r.pctrl.me.meop_param.addrin and
r.pctrl.valid;
t.o.dci.annul := (not t.commit) ;
t.o.dci.forcewrite := '0';
t.o.dci.forceread := '0';
t.o.dci.param_r.size := r.pctrl.me.meop_param.size;
t.o.dci.param_r.read := r.pctrl.me.meop_param.read;
t.o.dci.param_r.lock := r.pctrl.me.meop_param.lock;
t.o.dci.param_r.writedata := r.pctrl.me.meop_param.writedata;
t.o.dci.param_r.addrin := r.pctrl.me.meop_param.addrin;
t.o.dci.param_r.signed := r.pctrl.me.meop_param.signed;
-- pipeline flush
if not (t.commit = '1') then
t.o.toWR_pctrl_v.valid := '0';
end if;
if i.pstate.hold_r.hold = '0' then
v.pctrl := i.fromDM_pctrl_v;
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 irq_iu_out_type defined in /tmp/build_html/vhdl/core/ctrl/ctrl_comp.vhd |
Type armiu_mestg_typ_in defined in /tmp/build_html/vhdl/arm/arm_comp.vhd |
Type gendc_type_in defined in /tmp/build_html/vhdl/mem/cache/cache_comp.vhd |
Type armiu_mestg_typ_out defined in /tmp/build_html/vhdl/arm/arm_comp.vhd |
Type armiu_mestg_tmp_type defined in /tmp/build_html/vhdl/arm/armiu_mestg.vhd |
Type armiu_mestg_reg_type defined in /tmp/build_html/vhdl/arm/armiu_mestg.vhd |
Type armiu_mestg_dbg_type defined in /tmp/build_html/vhdl/arm/armiu_mestg.vhd |
Constant IRQ_NOIRQ defined in /tmp/build_html/vhdl/core/ctrl/ctrl_comp.vhd |
Enum states defined in /tmp/build_html/vhdl/sparc/mmutw.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