FIX: license and author information, signal name changes
This commit is contained in:
parent
75dbc9f109
commit
69e1ffe919
73
src/CPU.vhd
73
src/CPU.vhd
@ -1,41 +1,27 @@
|
||||
----------------------------------------------------------------------------------
|
||||
-- Company:
|
||||
-- Engineer:
|
||||
--
|
||||
-- Create Date: 10:51:48 05/11/2011
|
||||
-- Design Name:
|
||||
-- Module Name: CPU - Behavioral
|
||||
-- Project Name:
|
||||
-- Target Devices:
|
||||
-- Tool versions:
|
||||
-- Description:
|
||||
--
|
||||
-- Dependencies:
|
||||
--
|
||||
-- Revision:
|
||||
-- Revision 0.01 - File Created
|
||||
-- Additional Comments:
|
||||
--
|
||||
----------------------------------------------------------------------------------
|
||||
-------------------------------------------------------
|
||||
--! @file
|
||||
--! @brief CPU Core of the Simple Processor Core (Geraffel Processor)
|
||||
--! @author Dominik Meyer/ Marcel Eckert
|
||||
--! @email dmeyer@federationhq.de
|
||||
--! @licence GPLv2
|
||||
--! @date unknown
|
||||
-------------------------------------------------------
|
||||
library IEEE;
|
||||
use IEEE.STD_LOGIC_1164.ALL;
|
||||
use IEEE.STD_LOGIC_1164.all;
|
||||
|
||||
library work;
|
||||
use work.cpupkg.all;
|
||||
|
||||
-- Uncomment the following library declaration if using
|
||||
-- arithmetic functions with Signed or Unsigned values
|
||||
--use IEEE.NUMERIC_STD.ALL;
|
||||
|
||||
-- Uncomment the following library declaration if instantiating
|
||||
-- any Xilinx primitives in this code.
|
||||
--library UNISIM;
|
||||
--use UNISIM.VComponents.all;
|
||||
--! CPU Core of the Simple Processor Core (Geraffel Processor)
|
||||
--!
|
||||
--! This Code is based on a processor core used at the Helmut Schmidt University for
|
||||
--! educational purposes.
|
||||
--!
|
||||
|
||||
entity CPU is
|
||||
Port(
|
||||
iClk : in std_logic;
|
||||
iReset : in std_logic;
|
||||
port(
|
||||
iClk : in std_logic; --! main system clock
|
||||
iReset : in std_logic; --! system active high reset
|
||||
bdData : inout DATA; --! connection to databus
|
||||
odAddress : out ADDRESS; --! connection to addressbus
|
||||
ocEnable : out std_logic; --! enable or disable RAM
|
||||
@ -44,7 +30,7 @@ entity CPU is
|
||||
end CPU;
|
||||
|
||||
architecture Behavioral of CPU is
|
||||
component Steuerwerk is
|
||||
component ControlUnit is
|
||||
port (
|
||||
iClk : in std_logic; --! iClk signal
|
||||
iReset : in std_logic; --! iReset signal
|
||||
@ -65,7 +51,7 @@ architecture Behavioral of CPU is
|
||||
end component;
|
||||
|
||||
component RegFile is
|
||||
Port(
|
||||
port(
|
||||
iClk : in std_logic;
|
||||
iReset : in std_logic;
|
||||
|
||||
@ -91,7 +77,7 @@ architecture Behavioral of CPU is
|
||||
end component;
|
||||
|
||||
component ALU is
|
||||
Port(
|
||||
port(
|
||||
idOperand1 : in DATA;
|
||||
idOperand2 : in DATA;
|
||||
idImmidiate : in DATA;
|
||||
@ -106,13 +92,13 @@ architecture Behavioral of CPU is
|
||||
end component;
|
||||
|
||||
component FetchDecode is
|
||||
Port(
|
||||
port(
|
||||
iClk : in std_logic;
|
||||
iReset : in std_logic;
|
||||
|
||||
idData : in DATA;
|
||||
icAddrSel : in std_logic;
|
||||
icLoadInstr : in std_logic;
|
||||
icDecodeInstr : in std_logic;
|
||||
icJump : in std_logic;
|
||||
icNextPC : in std_logic;
|
||||
idPC : in ADDRESS;
|
||||
@ -129,7 +115,7 @@ architecture Behavioral of CPU is
|
||||
end component;
|
||||
|
||||
component MemInterface is
|
||||
Port(
|
||||
port(
|
||||
bdDataBus : inout DATA;
|
||||
odAddress : out ADDRESS;
|
||||
ocRnotW : out std_logic;
|
||||
@ -177,7 +163,7 @@ architecture Behavioral of CPU is
|
||||
|
||||
begin
|
||||
|
||||
SW : Steuerwerk PORT MAP (
|
||||
SW : ControlUnit port map (
|
||||
iClk => iClk,
|
||||
iReset => iReset,
|
||||
icOpCode => scOpCode,
|
||||
@ -195,7 +181,7 @@ begin
|
||||
ocLoad => scLoad
|
||||
);
|
||||
|
||||
RF: RegFile PORT MAP(
|
||||
RF : RegFile port map(
|
||||
iClk => iClk,
|
||||
iReset => iReset,
|
||||
|
||||
@ -218,7 +204,7 @@ begin
|
||||
odZeroOut => sdZeroRF
|
||||
);
|
||||
|
||||
Calc : ALU Port MAP(
|
||||
Calc : ALU port map(
|
||||
idOperand1 => sdRegA,
|
||||
idOperand2 => sdRegB,
|
||||
idImmidiate => sdImmidiateALU,
|
||||
@ -233,13 +219,13 @@ begin
|
||||
|
||||
|
||||
sdPC(31 downto 16) <= (others => '0');
|
||||
FaD : FetchDecode PORT MAP(
|
||||
FaD : FetchDecode port map(
|
||||
iClk => iClk,
|
||||
iReset => iReset,
|
||||
|
||||
idData => sdDataIn,
|
||||
icAddrSel => scAddrSel,
|
||||
icLoadInstr => scLoadInstr,
|
||||
icDecodeInstr => scLoadInstr,
|
||||
icJump => scJump,
|
||||
icNextPC => scNextPC,
|
||||
|
||||
@ -254,7 +240,7 @@ begin
|
||||
ocOperation => scOpCode
|
||||
);
|
||||
|
||||
MemIF : MemInterface PORT MAP(
|
||||
MemIF : MemInterface port map(
|
||||
bdDataBus => bdData,
|
||||
odAddress => odAddress,
|
||||
ocRnotW => ocRnotW,
|
||||
@ -272,4 +258,3 @@ begin
|
||||
sdImmidiate;
|
||||
|
||||
end Behavioral;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user