projects
/
calu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[bench] jit try of vm
[calu.git]
/
cpu
/
src
/
common_pkg.vhd
diff --git
a/cpu/src/common_pkg.vhd
b/cpu/src/common_pkg.vhd
index afb729434501c09a9ae8ba144025b9de30362315..ec18a20b975d1b6157081cc31a6611a46c9a20ff 100755
(executable)
--- a/
cpu/src/common_pkg.vhd
+++ b/
cpu/src/common_pkg.vhd
@@
-30,10
+30,12
@@
package common_pkg is
constant NUM_OP_OPT_WIDTH : INTEGER := 6;
constant COND_WIDTH : INTEGER := 4;
constant NUM_OP_OPT_WIDTH : INTEGER := 6;
constant COND_WIDTH : INTEGER := 4;
+ constant DATA_END_ADDR : integer := ((2**DATA_ADDR_WIDTH)-1);
subtype instruction_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
subtype instruction_addr_t is std_logic_vector(INSTR_ADDR_WIDTH-1 downto 0);
subtype instruction_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
subtype instruction_addr_t is std_logic_vector(INSTR_ADDR_WIDTH-1 downto 0);
+ subtype instr_addr_t is instruction_addr_t;
subtype gp_addr_t is std_logic_vector(REG_ADDR_WIDTH-1 downto 0);
subtype data_ram_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
subtype gp_addr_t is std_logic_vector(REG_ADDR_WIDTH-1 downto 0);
subtype data_ram_word_t is std_logic_vector(WORD_WIDTH-1 downto 0);
@@
-52,13
+54,16
@@
package common_pkg is
constant ARITH_OPT : integer := 1;
constant CARRY_OPT : integer := 2;
constant ARITH_OPT : integer := 1;
constant CARRY_OPT : integer := 2;
-
+
constant RIGHT_OPT : integer := 3;
constant RIGHT_OPT : integer := 3;
+ constant JMP_REG_OPT : integer := 3;
+ constant ST_OPT : integer := 3; -- store opt
+ constant RET_OPT : integer := 3;
constant NO_PSW_OPT : integer := 4;--no sharing
constant NO_DST_OPT : integer := 5; --no sharing
constant NO_PSW_OPT : integer := 4;--no sharing
constant NO_DST_OPT : integer := 5; --no sharing
- type op_info_t is (ADDSUB_OP,AND_OP,OR_OP, XOR_OP,SHIFT_OP);
+ type op_info_t is (ADDSUB_OP,AND_OP,OR_OP, XOR_OP,SHIFT_OP
, LDST_OP, JMP_OP, JMP_ST_OP
);
subtype op_opt_t is std_logic_vector(NUM_OP_OPT_WIDTH-1 downto 0);
subtype op_opt_t is std_logic_vector(NUM_OP_OPT_WIDTH-1 downto 0);
@@
-74,6
+79,8
@@
package common_pkg is
immediate : std_logic_vector(WORD_WIDTH-1 downto 0);
immediate : std_logic_vector(WORD_WIDTH-1 downto 0);
+ displacement : gp_register_t;
+
jmptype : std_logic_vector(1 downto 0);
high_low, fill, signext, bp: std_logic;
jmptype : std_logic_vector(1 downto 0);
high_low, fill, signext, bp: std_logic;
@@
-101,6
+108,9
@@
package common_pkg is
op_group : op_info_t;
op_detail : op_opt_t;
brpr : std_logic;
op_group : op_info_t;
op_detail : op_opt_t;
brpr : std_logic;
+
+ displacement : gp_register_t;
+ prog_cnt : instr_addr_t;
src1 : gp_register_t;
src2 : gp_register_t;
src1 : gp_register_t;
src2 : gp_register_t;