📄 avr_core.vhd
字号:
idc_swap_out => idc_swap,
-- ALU interface(Data output)
alu_data_out => alu_data_out,
-- ALU interface(Flag outputs)
alu_c_flag_out => alu_c_flag_out,
alu_z_flag_out => alu_z_flag_out,
alu_n_flag_out => alu_n_flag_out,
alu_v_flag_out => alu_v_flag_out,
alu_s_flag_out => alu_s_flag_out,
alu_h_flag_out => alu_h_flag_out,
-- General purpose register file interface
reg_rd_in => reg_rd_in,
reg_rd_out => reg_rd_out,
reg_rd_adr => reg_rd_adr,
reg_rr_out => reg_rr_out,
reg_rr_adr => reg_rr_adr,
reg_rd_wr => reg_rd_wr,
post_inc => post_inc,
pre_dec => pre_dec,
reg_h_wr => reg_h_wr,
reg_h_out => reg_h_out,
reg_h_adr => reg_h_adr,
reg_z_out => reg_z_out,
-- I/O register file interface
sreg_fl_in => sreg_fl_in, --??
globint => sreg_out(7), -- SREG I flag
sreg_fl_wr_en => sreg_fl_wr_en,
spl_out => spl_out,
sph_out => sph_out,
sp_ndown_up => sp_ndown_up,
sp_en => sp_en,
rampz_out => rampz_out,
-- Bit processor interface
bit_num_r_io => bit_num_r_io,
bitpr_io_out => bitpr_io_out,
branch => branch,
bit_pr_sreg_out => bit_pr_sreg_out,
bld_op_out => bld_op_out,
bit_test_op_out => bit_test_op_out,
sbi_st_out => sbi_st,
cbi_st_out => cbi_st,
idc_bst_out => idc_bst,
idc_bset_out => idc_bset,
idc_bclr_out => idc_bclr,
idc_sbic_out => idc_sbic,
idc_sbis_out => idc_sbis,
idc_sbrs_out => idc_sbrs,
idc_sbrc_out => idc_sbrc,
idc_brbs_out => idc_brbs,
idc_brbc_out => idc_brbc,
idc_reti_out => idc_reti);
GPRF_Inst:component reg_file port map (
--Clock and reset
cp2 => cp2,
cp2en => cp2en,
ireset => ireset,
reg_rd_in => reg_rd_in,
reg_rd_out => reg_rd_out,
reg_rd_adr => reg_rd_adr,
reg_rr_out => reg_rr_out,
reg_rr_adr => reg_rr_adr,
reg_rd_wr => reg_rd_wr,
post_inc => post_inc,
pre_dec => pre_dec,
reg_h_wr => reg_h_wr,
reg_h_out => reg_h_out,
reg_h_adr => reg_h_adr,
reg_z_out => reg_z_out);
BP_Inst:component bit_processor port map(
--Clock and reset
cp2 => cp2,
cp2en => cp2en,
ireset => ireset,
bit_num_r_io => bit_num_r_io,
dbusin => dbusin_int,
bitpr_io_out => bitpr_io_out,
sreg_out => sreg_out,
branch => branch,
bit_pr_sreg_out => bit_pr_sreg_out,
bld_op_out => bld_op_out,
reg_rd_out => reg_rd_out,
bit_test_op_out => bit_test_op_out,
-- Instructions and states
sbi_st => sbi_st,
cbi_st => cbi_st,
idc_bst => idc_bst,
idc_bset => idc_bset,
idc_bclr => idc_bclr,
idc_sbic => idc_sbic,
idc_sbis => idc_sbis,
idc_sbrs => idc_sbrs,
idc_sbrc => idc_sbrc,
idc_brbs => idc_brbs,
idc_brbc => idc_brbc,
idc_reti => idc_reti);
io_dec_Inst:component io_adr_dec port map (
adr => adr_int,
iore => iore_int,
dbusin_int => dbusin_int, -- LOCAL DATA BUS OUTPUT
dbusin_ext => dbusin, -- EXTERNAL DATA BUS INPUT
spl_out => spl_out,
sph_out => sph_out,
sreg_out => sreg_out,
rampz_out => rampz_out
);
IORegs_Inst: component io_reg_file port map(
--Clock and reset
cp2 => cp2,
cp2en => cp2en,
ireset => ireset,
adr => adr_int,
iowe => iowe_int,
dbusout => dbusout_int,
sreg_fl_in => sreg_fl_in,
sreg_out => sreg_out,
sreg_fl_wr_en => sreg_fl_wr_en,
spl_out => spl_out,
sph_out => sph_out,
sp_ndown_up => sp_ndown_up,
sp_en => sp_en,
rampz_out => rampz_out);
ALU_Inst:component alu_avr port map(
-- Data inputs
alu_data_r_in => alu_data_r_in,
alu_data_d_in => reg_rd_out,
alu_c_flag_in => sreg_out(0),
alu_z_flag_in => sreg_out(1),
-- Instructions and states
idc_add => idc_add,
idc_adc => idc_adc,
idc_adiw => idc_adiw,
idc_sub => idc_sub,
idc_subi => idc_subi,
idc_sbc => idc_sbc,
idc_sbci => idc_sbci,
idc_sbiw => idc_sbiw,
adiw_st => adiw_st,
sbiw_st => sbiw_st,
idc_and => idc_and,
idc_andi => idc_andi,
idc_or => idc_or,
idc_ori => idc_ori,
idc_eor => idc_eor,
idc_com => idc_com,
idc_neg => idc_neg,
idc_inc => idc_inc,
idc_dec => idc_dec,
idc_cp => idc_cp,
idc_cpc => idc_cpc,
idc_cpi => idc_cpi,
idc_cpse => idc_cpse,
idc_lsr => idc_lsr,
idc_ror => idc_ror,
idc_asr => idc_asr,
idc_swap => idc_swap,
-- Data outputs
alu_data_out => alu_data_out,
-- Flag outputs
alu_c_flag_out => alu_c_flag_out,
alu_z_flag_out => alu_z_flag_out,
alu_n_flag_out => alu_n_flag_out,
alu_v_flag_out => alu_v_flag_out,
alu_s_flag_out => alu_s_flag_out,
alu_h_flag_out => alu_h_flag_out);
-- Outputs
adr <= adr_int;
iowe <= iowe_int;
iore <= iore_int;
dbusout <= dbusout_int;
-- Sleep support
globint <= sreg_out(7); -- I flag
end Struct;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -