📄 mico8.vhm
字号:
Data(7) => PC_INT(7),
Data(8) => PC_INT(8),
Data(9) => ZERO_FLAG_INT_18,
Data(10) => CARRY_FLAG_INT_12,
Clock => MicoCLK,
ClockEn => VCC,
WE => N_22,
Reset => GND,
Q(0) => DOUT_STACK(0),
Q(1) => DOUT_STACK(1),
Q(2) => DOUT_STACK(2),
Q(3) => DOUT_STACK(3),
Q(4) => DOUT_STACK(4),
Q(5) => DOUT_STACK(5),
Q(6) => DOUT_STACK(6),
Q(7) => DOUT_STACK(7),
Q(8) => DOUT_STACK(8),
Q(9) => PUSHED_ZERO,
Q(10) => PUSHED_CARRY);
NN_1 <= '0';
NN_2 <= '1';
sp_we_1_i_o2_N_14_i <= SP_WE_1_I_O2_N_14_I_INT_11;
carry_flag <= CARRY_FLAG_INT_12;
ext_addr_cyc_int_Q <= EXT_ADDR_CYC_INT_Q_INT_13;
INTAck_c <= INTACK_C_INT_14;
intr_reg0 <= INTR_REG0_INT_15;
addr_cyc <= ADDR_CYC_INT_16;
data_cyc_int <= DATA_CYC_INT_INT_17;
zero_flag <= ZERO_FLAG_INT_18;
end beh;
--
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library synplify;
use synplify.components.all;
library ecp2;
use ecp2.components.all;
entity isp8_alu is
port(
dout_alu : out std_logic_vector(7 downto 0);
dout_rd : in std_logic_vector(7 downto 0);
Mico8_Instr_17 : in std_logic;
Mico8_Instr_16 : in std_logic;
Mico8_Instr_15 : in std_logic;
Mico8_Instr_14 : in std_logic;
Mico8_Instr_0 : in std_logic;
Mico8_Instr_7 : in std_logic;
Mico8_Instr_6 : in std_logic;
Mico8_Instr_5 : in std_logic;
Mico8_Instr_4 : in std_logic;
Mico8_Instr_3 : in std_logic;
Mico8_Instr_2 : in std_logic;
Mico8_Instr_13 : in std_logic;
Mico8_Instr_1 : in std_logic;
dout_rb : in std_logic_vector(7 downto 0);
cout_alu_u_0_1 : out std_logic;
N_221 : in std_logic;
sub : in std_logic;
N_140 : out std_logic;
N_36_1 : in std_logic;
instr_l2_3 : in std_logic;
carry_flag : in std_logic;
GND : in std_logic);
end isp8_alu;
architecture beh of isp8_alu is
signal DATA_RB_INT_I_0_M2_I_M3_0 : std_logic_vector(4 to 4);
signal DOUT_ALU_1_U_0_0_2 : std_logic_vector(6 downto 1);
signal DOUT_ALU_1_U_0_0_A7_1_0 : std_logic_vector(6 downto 1);
signal DOUT_ALU_1_U_0_0_0 : std_logic_vector(6 downto 0);
signal DOUT_ALU_1_U_I_I_0 : std_logic_vector(7 to 7);
signal DATA_ADD : std_logic_vector(7 downto 0);
signal DOUT_ALU_1_U_0_0_1 : std_logic_vector(6 downto 0);
signal DOUT_ALU_1_U_I_I_1 : std_logic_vector(7 to 7);
signal DOUT_ALU_1_U_I_I_3 : std_logic_vector(7 to 7);
signal DOUT_ALU_1_U_0_0_3 : std_logic_vector(0 to 0);
signal N_55 : std_logic ;
signal N_56 : std_logic ;
signal N_57 : std_logic ;
signal N_59 : std_logic ;
signal N_60 : std_logic ;
signal N_61 : std_logic ;
signal N_63 : std_logic ;
signal N_90 : std_logic ;
signal N_220 : std_logic ;
signal N_223 : std_logic ;
signal N_241 : std_logic ;
signal N_242 : std_logic ;
signal N_163 : std_logic ;
signal N_145 : std_logic ;
signal COUT_ALU_U_0_A7_0 : std_logic ;
signal N_64 : std_logic ;
signal N_144 : std_logic ;
signal N_64_I : std_logic ;
signal N_243 : std_logic ;
signal COUT_ALU_U_0_0 : std_logic ;
signal CARRY_ADD_INT : std_logic ;
signal ADSU_CI : std_logic ;
signal OVERFLOW : std_logic ;
signal NN_1 : std_logic ;
signal VCC : std_logic ;
component pmi_addsub_work_mico8_schematic_0
port(
DataA : in std_logic_vector(7 downto 0);
DataB : in std_logic_vector(7 downto 0);
Cin : in std_logic;
Add_Sub : in std_logic;
Result : out std_logic_vector(7 downto 0);
Cout : out std_logic;
Overflow : out std_logic );
end component;
begin
N_55 <= (dout_rb(1) and not Mico8_Instr_13) or
(Mico8_Instr_1 and Mico8_Instr_13);
N_56 <= (dout_rb(2) and not Mico8_Instr_13) or
(Mico8_Instr_2 and Mico8_Instr_13);
N_57 <= (dout_rb(3) and not Mico8_Instr_13) or
(Mico8_Instr_3 and Mico8_Instr_13);
DATA_RB_INT_I_0_M2_I_M3_0(4) <= (dout_rb(4) and not Mico8_Instr_13) or
(Mico8_Instr_4 and Mico8_Instr_13);
N_59 <= (dout_rb(5) and not Mico8_Instr_13) or
(Mico8_Instr_5 and Mico8_Instr_13);
N_60 <= (dout_rb(6) and not Mico8_Instr_13) or
(Mico8_Instr_6 and Mico8_Instr_13);
N_61 <= (dout_rb(7) and not Mico8_Instr_13) or
(Mico8_Instr_7 and Mico8_Instr_13);
N_63 <= (dout_rb(0) and not Mico8_Instr_13) or
(Mico8_Instr_0 and Mico8_Instr_13);
N_90 <= (not Mico8_Instr_14 and not Mico8_Instr_15) or
(Mico8_Instr_1 and Mico8_Instr_15);
N_220 <= Mico8_Instr_15 and Mico8_Instr_16 and not Mico8_Instr_17;
N_223 <= not Mico8_Instr_14 and Mico8_Instr_16 and not Mico8_Instr_17;
DOUT_ALU_1_U_0_0_2(6) <= (dout_rb(7) and N_241) or
(dout_rb(5) and N_242);
DOUT_ALU_1_U_0_0_2(3) <= (dout_rb(4) and N_241) or
(dout_rb(2) and N_242);
DOUT_ALU_1_U_0_0_2(5) <= (dout_rb(6) and N_241) or
(dout_rb(4) and N_242);
DOUT_ALU_1_U_0_0_2(1) <= (dout_rb(2) and N_241) or
(dout_rb(0) and N_242);
DOUT_ALU_1_U_0_0_2(4) <= (dout_rb(5) and N_241) or
(dout_rb(3) and N_242);
DOUT_ALU_1_U_0_0_2(2) <= (dout_rb(3) and N_241) or
(dout_rb(1) and N_242);
N_163 <= (dout_rb(0) and N_241 and not Mico8_Instr_1) or
(carry_flag and N_241 and Mico8_Instr_1);
N_145 <= (dout_rb(7) and N_242 and not Mico8_Instr_1) or
(carry_flag and N_242 and Mico8_Instr_1);
COUT_ALU_U_0_A7_0 <= (dout_rb(0) and not Mico8_Instr_0 and Mico8_Instr_1) or
(dout_rb(7) and Mico8_Instr_0 and Mico8_Instr_1);
DOUT_ALU_1_U_0_0_A7_1_0(4) <= (dout_rb(4) and dout_rd(4) and not Mico8_Instr_13) or
(dout_rd(4) and Mico8_Instr_4 and Mico8_Instr_13);
DOUT_ALU_1_U_0_0_A7_1_0(1) <= (dout_rb(1) and dout_rd(1) and not Mico8_Instr_13) or
(dout_rd(1) and Mico8_Instr_1 and Mico8_Instr_13);
DOUT_ALU_1_U_0_0_A7_1_0(5) <= (dout_rb(5) and dout_rd(5) and not Mico8_Instr_13) or
(dout_rd(5) and Mico8_Instr_5 and Mico8_Instr_13);
DOUT_ALU_1_U_0_0_A7_1_0(2) <= (dout_rb(2) and dout_rd(2) and not Mico8_Instr_13) or
(dout_rd(2) and Mico8_Instr_2 and Mico8_Instr_13);
DOUT_ALU_1_U_0_0_A7_1_0(6) <= (dout_rb(6) and dout_rd(6) and not Mico8_Instr_13) or
(dout_rd(6) and Mico8_Instr_6 and Mico8_Instr_13);
DOUT_ALU_1_U_0_0_A7_1_0(3) <= (dout_rb(3) and dout_rd(3) and not Mico8_Instr_13) or
(dout_rd(3) and Mico8_Instr_3 and Mico8_Instr_13);
N_64 <= (not Mico8_Instr_15 and not Mico8_Instr_16 and not Mico8_Instr_17) or
(not Mico8_Instr_14 and not Mico8_Instr_15 and not Mico8_Instr_16);
N_242 <= Mico8_Instr_0 and Mico8_Instr_15 and not Mico8_Instr_16 and Mico8_Instr_17;
N_241 <= not Mico8_Instr_0 and Mico8_Instr_15 and not Mico8_Instr_16 and Mico8_Instr_17;
N_144 <= carry_flag and instr_l2_3 and not Mico8_Instr_16 and not Mico8_Instr_17;
N_64_I <= (Mico8_Instr_15) or
(Mico8_Instr_16) or
(Mico8_Instr_14 and Mico8_Instr_17);
N_243 <= (not Mico8_Instr_15 and Mico8_Instr_16 and not Mico8_Instr_17) or
(Mico8_Instr_14 and not Mico8_Instr_15 and not Mico8_Instr_16 and Mico8_Instr_17);
COUT_ALU_U_0_0 <= (carry_flag and Mico8_Instr_16 and not Mico8_Instr_17) or
(carry_flag and not N_90 and not Mico8_Instr_16 and Mico8_Instr_17);
DOUT_ALU_1_U_0_0_0(6) <= (dout_rd(6) and not N_60 and N_220) or
(not dout_rd(6) and N_60 and N_220) or
(N_60 and N_223);
DOUT_ALU_1_U_0_0_0(3) <= (dout_rd(3) and not N_57 and N_220) or
(not dout_rd(3) and N_57 and N_220) or
(N_57 and N_223);
DOUT_ALU_1_U_0_0_0(5) <= (dout_rd(5) and not N_59 and N_220) or
(not dout_rd(5) and N_59 and N_220) or
(N_59 and N_223);
DOUT_ALU_1_U_0_0_0(1) <= (dout_rd(1) and not N_55 and N_220) or
(not dout_rd(1) and N_55 and N_220) or
(N_55 and N_223);
DOUT_ALU_1_U_I_I_0(7) <= (dout_rd(7) and not N_61 and N_220) or
(not dout_rd(7) and N_61 and N_220) or
(N_61 and N_223);
DOUT_ALU_1_U_0_0_0(4) <= (dout_rd(4) and N_220 and not DATA_RB_INT_I_0_M2_I_M3_0(4)) or
(not dout_rd(4) and N_220 and DATA_RB_INT_I_0_M2_I_M3_0(4)) or
(N_223 and DATA_RB_INT_I_0_M2_I_M3_0(4));
DOUT_ALU_1_U_0_0_0(0) <= (dout_rd(0) and not N_63 and N_220) or
(not dout_rd(0) and N_63 and N_220) or
(N_63 and N_223);
DOUT_ALU_1_U_0_0_0(2) <= (dout_rd(2) and not N_56 and N_220) or
(not dout_rd(2) and N_56 and N_220) or
(N_56 and N_223);
N_140 <= (not N_36_1 and N_64 and not CARRY_ADD_INT) or
(not N_36_1 and not N_64 and CARRY_ADD_INT);
ADSU_CI <= (sub) or
(not carry_flag and N_64) or
(N_144);
cout_alu_u_0_1 <= (COUT_ALU_U_0_0) or
(N_221 and COUT_ALU_U_0_A7_0 and Mico8_Instr_15);
DOUT_ALU_1_U_0_0_1(6) <= (not N_36_1 and DATA_ADD(6)) or
(DOUT_ALU_1_U_0_0_0(6));
DOUT_ALU_1_U_0_0_1(3) <= (not N_36_1 and DATA_ADD(3)) or
(DOUT_ALU_1_U_0_0_0(3));
DOUT_ALU_1_U_0_0_1(5) <= (not N_36_1 and DATA_ADD(5)) or
(DOUT_ALU_1_U_0_0_0(5));
DOUT_ALU_1_U_0_0_1(1) <= (not N_36_1 and DATA_ADD(1)) or
(DOUT_ALU_1_U_0_0_0(1));
DOUT_ALU_1_U_I_I_1(7) <= (not N_36_1 and DATA_ADD(7)) or
(DOUT_ALU_1_U_I_I_0(7));
DOUT_ALU_1_U_0_0_1(4) <= (not N_36_1 and DATA_ADD(4)) or
(DOUT_ALU_1_U_0_0_0(4));
DOUT_ALU_1_U_0_0_1(0) <= (not N_36_1 and DATA_ADD(0)) or
(DOUT_ALU_1_U_0_0_0(0));
DOUT_ALU_1_U_0_0_1(2) <= (not N_36_1 and DATA_ADD(2)) or
(DOUT_ALU_1_U_0_0_0(2));
DOUT_ALU_1_U_I_I_3(7) <= (dout_rd(7) and N_61 and N_243) or
(DOUT_ALU_1_U_I_I_1(7));
DOUT_ALU_1_U_0_0_3(0) <= (dout_rd(0) and N_63 and N_243) or
(DOUT_ALU_1_U_0_0_1(0));
dout_alu(0) <= (N_145) or
(dout_rb(1) and N_241) or
(DOUT_ALU_1_U_0_0_3(0));
dout_alu(7) <= (N_163) or
(dout_rb(6) and N_242) or
(DOUT_ALU_1_U_I_I_3(7));
dout_alu(6) <= (DOUT_ALU_1_U_0_0_1(6)) or
(DOUT_ALU_1_U_0_0_2(6)) or
(N_243 and DOUT_ALU_1_U_0_0_A7_1_0(6));
dout_alu(5) <= (DOUT_ALU_1_U_0_0_1(5)) or
(DOUT_ALU_1_U_0_0_2(5)) or
(N_243 and DOUT_ALU_1_U_0_0_A7_1_0(5));
dout_alu(4) <= (DOUT_ALU_1_U_0_0_1(4)) or
(DOUT_ALU_1_U_0_0_2(4)) or
(N_243 and DOUT_ALU_1_U_0_0_A7_1_0(4));
dout_alu(3) <= (DOUT_ALU_1_U_0_0_1(3)) or
(DOUT_ALU_1_U_0_0_2(3)) or
(N_243 and DOUT_ALU_1_U_0_0_A7_1_0(3));
dout_alu(2) <= (DOUT_ALU_1_U_0_0_1(2)) or
(DOUT_ALU_1_U_0_0_2(2)) or
(N_243 and DOUT_ALU_1_U_0_0_A7_1_0(2));
dout_alu(1) <= (DOUT_ALU_1_U_0_0_1(1)) or
(DOUT_ALU_1_U_0_0_2(1)) or
(N_243 and DOUT_ALU_1_U_0_0_A7_1_0(1));
U1_ADDSUB8: pmi_addsub_work_mico8_schematic_0 port map (
DataA(0) => dout_rd(0),
DataA(1) => dout_rd(1),
DataA(2) => dout_rd(2),
DataA(3) => dout_rd(3),
DataA(4) => dout_rd(4),
DataA(5) => dout_rd(5),
DataA(6) => dout_rd(6),
DataA(7) => dout_rd(7),
DataB(0) => N_63,
DataB(1) => N_55,
DataB(2) => N_56,
DataB(3) => N_57,
DataB(4) => DATA_RB_INT_I_0_M2_I_M3_0(4),
DataB(5) => N_59,
DataB(6) => N_60,
DataB(7) => N_61,
Cin => ADSU_CI,
Add_Sub => N_64_I,
Result(0) => DATA_ADD(0),
Result(1) => DATA_ADD(1),
Result(2) => DATA_ADD(2),
Result(3) => DATA_ADD(3),
Result(4) => DATA_ADD(4),
Result(5) => DATA_ADD(5),
Result(6) => DATA_ADD(6),
Result(7) => DATA_ADD(7),
Cout => CARRY_ADD_INT,
Overflow => OVERFLOW);
NN_1 <= '0';
VCC <= '1';
end beh;
--
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library synplify;
use synplify.components.all;
library ecp2;
use ecp2.components.all;
entity isp8_idec is
port(
Mico8_Instr_0 : in std_logic;
Mico8_Instr_2 : in std_logic;
Mico8_Instr_12 : in std_logic;
Mico8_Instr_1 : in std_logic;
Mico8_Instr_13 : in std_logic;
Mico8_Instr_17 : in std_logic;
Mico8_Instr_16 : in std_logic;
Mico8_Instr_15 : in std_logic;
Mico8_Instr_14 : in std_logic;
clri_i : out std_logic;
clrc : out std_logic;
setc : out std_logic;
setz : out std_logic;
update_c_i : out std_logic;
update_z_0 : out std_logic;
iels_ie : out std_logic;
iels_ls : out std_logic;
ca0 : out std_logic;
call : out std_logic;
instr_l2_1 : in std_logic;
iels : out std_logic;
iret : out std_logic;
update_z_1 : out std_logic;
N_36_1 : out std_logic;
un1_br0 : out std_logic;
re : out std_logic;
sub : out std_logic;
sc : out std_logic;
instr_l1_3 : out std_logic;
N_221 : out std_logic;
re_1 : out std_logic;
instr_l2_3 : out std_logic;
GND : in std_logic);
end isp8_idec;
architecture beh of isp8_idec is
signal INSTR_L1_3_INT_6 : std_logic ;
signal RE_1_INT_8 : std_logic ;
signal INSTR_L2_3_INT_9 : std_logic ;
signal N_36_1_INT_4 : std_logic ;
signal N_221_INT_7 : std_logic ;
signal SC_INT_5 : std_logic ;
signal NN_1 : std_logic ;
signal VCC : std_logic ;
begin
INSTR_L2_3_INT_9 <= Mico8_Instr_14 and Mico8_Instr_15;
RE_1_INT_8 <= not Mico8_Instr_14 and Mico8_Instr_15;
N_221_INT_7 <= not Mico8_Instr_16 and Mico8_Instr_17;
INSTR_L1_3_INT_6 <= Mico8_Instr_16 and Mico8_Instr_17;
SC_INT_5 <= Mico8_Instr_14 and Mico8_Instr_15 and not Mico8_Instr_16 and Mico8_Instr_17;
sub <= not Mico8_Instr_14 and not Mico8_Instr_15 and not Mico8_Instr_16;
re <= not Mico8_Instr_14 and Mico8_Instr_15 and Mico8_Instr_16 and Mico8_Instr_17;
un1_br0 <= INSTR_L1_3_INT_6 and Mico8_Instr_13 and not Mico8_Instr_14 and not Mico8_Instr_15;
N_36_1_INT_4 <= (Mico8_Instr_16) or
(Mico8_Instr_14 and Mico8_Instr_17) or
(Mico8_Instr_15 and Mico8_Instr_17);
update_z_1 <= (not Mico8_Instr_15 and not Mico8_Instr_16) or
(not Mico8_Instr_14 and not Mico8_Instr_16) or
(Mico8_Instr_1 and not Mico8_Instr_16);
iret <= RE_1_INT_8 and Mico8_Instr_12 and Mico8_Instr_16 and Mico8_Instr_17;
iels <= INSTR_L1_3_INT_6 and not Mico8_Instr_13 and Mico8_Instr_14 and Mico8_Instr_15;
call <= INSTR_L1_3_INT_6 and instr_l2_1 and Mico8_Instr_12 and Mico8_Instr_13;
ca0 <= INSTR_L1_3_INT_6 and instr_l2_1 and not Mico8_Instr_12 and Mico8_Instr_13;
iels_ls <= INSTR_L1_3_INT_6 and INSTR_L2_3_INT_9 and Mico8_Instr_2 and not Mico8_Instr_13;
iels_ie <= INSTR_L1_3_INT_6 and INSTR_L2_3_INT_9 and not Mico8_Instr_2 and not Mico8_Instr_13;
update_z_0 <= (not Mico8_Instr_14 and not Mico8_Instr_15 and Mico8_Instr_16) or
(Mico8_Instr_17);
update_c_i <= (N_36_1_INT_4 and not Mico8_Instr_1) or
(N_36_1_INT_4 and not N_221_INT_7) or
(N_36_1_INT_4 and INSTR_L2_3_INT_9);
setz <= SC_INT_5 and Mico8_Instr_0 and Mico8_Instr_1 and not Mico8_Instr_2;
setc <= SC_INT_5 and Mico8_Instr_0 and not Mico8_Instr_1 and not Mico8_Instr_2;
clrc <= SC_INT_5 and not Mico8_Instr_0 and not Mico8_Instr_1 and not Mico8_Instr_2;
clri_i <= (not Mico8_Instr_2) or
(not SC_INT_5) or
(Mico8_Instr_0) or
(Mico8_Instr_1);
NN_1 <= '0';
VCC <= '1';
N_36_1 <= N_36_1_INT_4;
sc <= SC_INT_5;
instr_l1_3 <= INSTR_L1_3_INT_6;
N_221 <= N_221_INT_7;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -