library ieee;
use ieee.std_logic_1164.all;
use work.armpmodel.all;
use work.armdecode.all;
-- PREFIX: act_xxx
package armctrl is
-- Check insn condition
function act_checkcond(
cpsr : in apm_cpsr;
cond : in std_logic_vector(3 downto 0)
) return std_logic;
end armctrl;
package body armctrl is
function act_checkcond(
cpsr : in apm_cpsr;
cond : in std_logic_vector(3 downto 0)
) return std_logic is
variable tmp : std_logic;
begin
tmp := '0';
case cond is
when ADE_COND_EQ => tmp := cpsr.ex.z;
when ADE_COND_NE => tmp := not cpsr.ex.z;
when ADE_COND_CS => tmp := cpsr.ex.c;
when ADE_COND_CC => tmp := not cpsr.ex.c;
when ADE_COND_MI => tmp := cpsr.ex.n;
when ADE_COND_PL => tmp := not cpsr.ex.n;
when ADE_COND_VS => tmp := cpsr.ex.v;
when ADE_COND_VC => tmp := not cpsr.ex.v;
when ADE_COND_HI => tmp := cpsr.ex.c and (not cpsr.ex.z);
when ADE_COND_LS => tmp := (not cpsr.ex.c) and cpsr.ex.z;
when ADE_COND_GE => tmp := not (cpsr.ex.n xor cpsr.ex.v);
when ADE_COND_LT => tmp := (cpsr.ex.n xor cpsr.ex.v);
when ADE_COND_GT => tmp := (not cpsr.ex.z) and not (cpsr.ex.n xor cpsr.ex.v);
when ADE_COND_LE => tmp := cpsr.ex.z or (cpsr.ex.n xor cpsr.ex.v);
when ADE_COND_AL => tmp := '1';
when ADE_COND_NV => tmp := '0';
when others => null;
end case;
return tmp;
end;
end armctrl;
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 |
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 |
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