writeback stage
[calu.git] / cpu / src / common_pkg.vhd
index 3d93390472a254249764beca21b2ade7fc98347b..06e376956e20cad9acf52e656a572b3219fffddf 100755 (executable)
@@ -25,7 +25,7 @@ package common_pkg is
        constant INSTR_ADDR_WIDTH       : INTEGER := 32;
        constant PHYS_INSTR_ADDR_WIDTH  : INTEGER := 11;
        constant REG_ADDR_WIDTH         : INTEGER := 4;
-       constant DATA_ADDR_WIDTH        : INTEGER := 32;
+       constant DATA_ADDR_WIDTH        : INTEGER := 11;
        constant PHYS_DATA_ADDR_WIDTH   : INTEGER := 32;
        
        constant NUM_OP_OPT_WIDTH       : INTEGER := 6;
@@ -110,7 +110,18 @@ package common_pkg is
                
        end record;
 
-       
+       type writeback_rec is record
+--             result : in gp_register_t;      --reg  (alu result or jumpaddr)
+--             result_addr : in gp_addr_t;     --reg
+               address : word_t;               --ureg 
+--             alu_jmp : in std_logic;         --reg
+--             br_pred : in std_logic;         --reg
+--             write_en : in std_logic;        --reg  (register file)
+               dmem_en : std_logic;            --ureg (jump addr in mem or in address)
+               dmem_write_en : std_logic;      --ureg
+               hword : std_logic;              --ureg
+               byte_s : std_logic;
+       end record;
        
        
        function inc(value : in std_logic_vector; constant by : in integer := 1) return std_logic_vector;