PicoBlaze處理器添加處理器指令的設(shè)計流程
增加新的picoblaze處理器指令的操作過程如下。 (1) 修改picoblaze.vhd源代碼。 (2) 增加如下新的指令代碼: constant new_instruction_id : std_logic_vector(4 'downto o):= ?。?0101"; (3) 增加如下指令到譯碼信號說明位置: i_new_instruction(= '1'when instruction (15 downto 11) =new_instruction_id else '0'; (4) 用新指令實現(xiàn)的功能,定義vhdl部件(component)?! ?5) 增加這個部件到picoblaze.vhd源代碼中?! ?6) 增加新的指令到register_and_flag_enable。vhd,用于寄存器譯碼使能。 (7) 在匯編編譯系統(tǒng)中新增如下一條指令到asm.cpp程序中: char*new instruction_id ="10101"; (8) 增加條件語句(case)到asm.cpp程序的test_instructions函數(shù)中,增加條件語句(case)到asm.cpp程序的write program_word函數(shù)中?! ?9) 重新編譯asm.cpp程序,生成執(zhí)行文件asm.exe。