copyleft: gplv3 added and set repo to public
[calu.git] / cpu / src / writeback_stage.vhd
1 --   `Deep Thought', a softcore CPU implemented on a FPGA
2 --
3 --  Copyright (C) 2010 Markus Hofstaetter <markus.manrow@gmx.at>
4 --  Copyright (C) 2010 Martin Perner <e0725782@student.tuwien.ac.at>
5 --  Copyright (C) 2010 Stefan Rebernig <stefan.rebernig@gmail.com>
6 --  Copyright (C) 2010 Manfred Schwarz <e0725898@student.tuwien.ac.at>
7 --  Copyright (C) 2010 Bernhard Urban <lewurm@gmail.com>
8 --
9 --  This program is free software: you can redistribute it and/or modify
10 --  it under the terms of the GNU General Public License as published by
11 --  the Free Software Foundation, either version 3 of the License, or
12 --  (at your option) any later version.
13 --
14 --  This program is distributed in the hope that it will be useful,
15 --  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 --  GNU General Public License for more details.
18 --
19 --  You should have received a copy of the GNU General Public License
20 --  along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
22 library IEEE;
23 use IEEE.std_logic_1164.all;
24 use IEEE.numeric_std.all;
25
26 use work.common_pkg.all;
27
28 entity writeback_stage is
29
30         generic (
31                         -- active reset value
32                         RESET_VALUE : std_logic;
33                         -- active logic value
34                         LOGIC_ACT : std_logic;
35                         FPGATYPE : string;
36                         CLK_BAUD : integer
37                         );
38         port(
39                 --System inputs
40                         clk : in std_logic;
41                         reset : in std_logic;
42
43                         result : in gp_register_t;      --reg  (alu result or jumpaddr)
44                         result_addr : in gp_addr_t;     --reg
45                         address : in word_t;            --ureg 
46                         ram_data : in word_t;           --ureg
47                         alu_jmp : in std_logic;         --reg
48                         br_pred : in std_logic;         --reg
49                         write_en : in std_logic;        --reg  (register file) bei jump 1 wenn addr in result
50                         dmem_en : in std_logic;         --ureg (jump addr in mem or in address)
51                         dmem_write_en : in std_logic;   --ureg
52                         hword : in std_logic;           --ureg
53                         byte_s : in std_logic;          --ureg  
54
55                         regfile_val : out gp_register_t;
56                         reg_we : out std_logic;
57                         reg_addr : out gp_addr_t;
58                         jump_addr : out instruction_addr_t;
59                         jump : out std_logic;
60                         -- hallo stefan mir adden da jetzt mal schnell an uart port :D
61                         bus_tx : out std_logic;
62                         bus_rx : in std_logic;
63                         -- instruction memory program port :D
64                         new_im_data_out : out std_logic;
65                         im_addr : out gp_register_t;
66                         im_data : out gp_register_t;
67                         
68                         --sseg0 : out std_logic_vector(0 to 6);
69                         --sseg1 : out std_logic_vector(0 to 6);
70                         --sseg2 : out std_logic_vector(0 to 6);
71                         --sseg3 : out std_logic_vector(0 to 6);
72
73                         int_req : out interrupt_t
74
75                 );
76                 
77 end writeback_stage;