VHDL实现单周期CPU设计
在quartus下实现,顶层是原理图模式,语言使用VHDL,实现单周期CPU的功能,包括ALU,RAM,ROM,MUX,regfile等模块,下面有工程截图及仿真截图。
仿真截图:
ALU模块代码:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity ALU_lrt is
port(a,b:in std_logic_vector(15 downto 0);
func:in std_logic_vector(3 downto 0);
c_lrt:out std_logic_vector(15 downto 0));
end ALU_lrt;
architecture behave of ALU_lrt is