304 Chapter Thirteen
Reg0Reg1Reg2Reg3Reg7RegselProgCntAddrRegAddr(15:0) Data(15:0)ALUControlReady R/W VMAShifterShiftselAluselOutRegProgselAddrselOutselOpRegOpRegsel
InstrRegInstrselClockResetCompCompselCompoutCompoutFigure 13-1
CPU Block Diagram.
Following is an implementation of this block diagram, shown by file
cpu.vhd:library IEEE;
use IEEE.std_logic_1164.all;
use work.cpu_lib.all;entity cpu is
port(clock, reset, ready : in std_logic;
port(addr : out bit16;
port(rw, vma : out std_logic;
port(data : inout bit16);
end cpu;architecture rtl of cpu is
component regarray
port( data : in bit16;
port( sel : in t_reg;
port( en : in std_logic;
port( clk : in std_logic;
port( q : out bit16);
end component;