基于mips的单周期微处理器
答辩人:周洋
班级:计算机06
指导教师:姜欣宁
设计目的
熟悉mips单周期微处理器开发流程
熟悉使用ise等设计软件
熟悉功能模块的设计与调试
熟悉使用vhdl语言来开发功能模块
Ise软件的应用
题目:制作一个或门来熟悉开发和测试过程
程序:
library IEEE;
use ;
entity test1 is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
z : out STD_LOGIC);
end test1;
architecture Behavioral of test1 is
begin
z<=a or b;
end Behavioral;
Rtl图
仿真测试
激励部分代码
TB: process
begin
a_stim<='1';
b_stim<='1';
wait for 50ns;
a_stim<='1';
b_stim<='0';
wait for 50ns;
a_stim<='0';
b_stim<='1';
wait for 50ns;
a_stim<='0';
b_stim<='0';
wait for 100 ns;
end process;
仿真波形图
设计过程
加法器设计adder
符号扩展设计signest
左移两位部件设计sl2
二路选择器设计mux2
ALU译码器设计aludec
ALU设计alu
主译码器设计maindec
控制器设计controller
寄存器文件设计regfile
可复位触发器设计flopr
数据路径设计datapath
Mips设计mips
加法器设计
Vhdl代码:
entity adder is
Port ( a: in STD_LOGIC_VECTOR (31 downto 0);
b : in STD_LOGIC_VECTOR (31 downto 0);
y : out STD_LOGIC_VECTOR (31 downto 0));
end adder;
architecture Behavioral of adder is
begin
y<=a + b;
end Behavioral;
符号扩展设计
Vhdl代码:
entity signext is
Port ( a : in STD_LOGIC_VECTOR (15 downto 0);
y : out STD_LOGIC_VECTOR (31 downto 0));
end signext;
architecture Behavioral of signext is
begin
Y<=X"0000"& a when a(15)='0' else x"ffff" &a;
end Behavioral;
基于mips的单周期微 来自淘豆网m.daumloan.com转载请标明出处.