发布时间:2008-09-19 09:37:27阅读:470
增加新的PicoBlaze处理器指令的操作过程如下。
(1) 修改Picoblaze.vhd源代码。
(2) 增加如下新的指令代码:
constant new_instruction_id : std_logic_vector(4 'downto O):=
"10101";
(3) 增加如下指令到译码信号说明位置:
i_new_instruction(= '1'when instruction (15 downto 11) =new_instruction_id else '0';
(4) 用新指令实现的功能,定义VHDL部件(Component)。
(5) 增加这个部件到Picoblaze.vhd源代码中。
(6) 增加新的指令到register_and_flag_enable。vhd,用于寄存器译码使能。
(7) 在汇编编译系统中新增如下一条指令到asm.cpp程序中:
char*new instruction_id ="10101";
(8) 增加条件语句(case)到asm.cpp程序的test_instructions函数中,增加条件语句(case)到asm.cpp程序的write program_word函数中。
上一篇:脉冲测量功能块介绍
下一篇:三极管静态工作点的测试