OpenCores
URL https://opencores.org/ocsvn/suslik/suslik/trunk

Subversion Repositories suslik

[/] [suslik/] [trunk/] [arch.txt] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 gorand2
imm is either 16 bit sign extended or full 32 bit with prefix instr(except andi1)
2
there are 32 registers
3
alu instructions have 6-bit opcode(lowest 6 bits), shared with conditional jumps and load/store and call
4
2 opcodes reserved for future 64bitload&store (59 & 63)
5
not shared with in/out
6
no condition flags exist in this architecture so far, instead, use compare-and-jump
7
opcode 32 is used for i/o and system instructions, using the other bits
8
i/o instructions have additional opcode at bits 26:21, but this can be used for system
9
instructions also.
10
 
11
opcode 30 prefix imm
12
 
13
opcode 0
14
lih reg1,imm,reg2
15
lch reg1,imm,reg2 //equivalent
16
  store imm into upper half of reg2, reg1's lower half into lower half of reg2
17
opcode 1
18
li imm,reg
19
lc imm,reg
20
  store imm into reg
21
opcode 2
22
and reg1,reg2,reg2
23
  reg2=reg1®2
24
opcode 3
25
andi reg1,imm,reg2
26
  reg2=reg1&imm
27
opcode 4
28
or reg1,reg2,reg3
29
  reg3=reg1|reg2
30
opcode 5
31
ori reg1,imm,reg
32
reg2=reg1|imm
33
opcode 6
34
xor reg1,reg2,reg3
35
  reg3=reg1^reg2
36
opcode 7
37
xori reg1,imm,reg2
38
  reg2=imm^reg1
39
opcode 8
40
add reg1,reg2,reg3
41
  reg3=reg1+reg2
42
opcode 9
43
addi reg1,imm,reg2
44
  reg2=reg1+imm
45
opcode 10
46
sub reg1,reg2,reg3
47
  reg3=reg1-reg2
48
opcode 11
49
subi reg1,imm,reg2
50
  reg2=reg1-imm
51
opcode 12
52
nop
53
  no operation
54
opcode 13
55
andi1 reg1,imm,reg2
56
  reg2=reg1 & imm(one extended)
57
 
58
shl reg1,reg2,reg3
59
shli reg1,imm,reg2
60
shr reg1,reg2,
61
reg3
62
shri reg1,imm,reg2
63
sar reg1,reg2,reg3
64
sari reg1,imm,reg2
65
 
66
 
67
inb r1,r2
68
inw r1,r2
69
inl r1,r2
70
 
71
outb r1,r2
72
outw r1,r2
73
outl r1,r2
74
 
75
conditional jumps
76
cjule r1,r2, label
77
cjc r1,r2, label
78
cjugt r1,r2, label
79
cjnc r1,r2, label
80
cjeq r1,r2, label
81
cjne r1,r2, label
82
cjult r1,r2, label
83
cjuge r1,r2, label
84
cjn r1,r2, label
85
cjnn r1,r2, label
86
cjslt r1,r2, label
87
cjsge r1,r2, label
88
cjsle r1,r2, label
89
cjsgt r1,r2, label
90
cjo r1,r2, label
91
cjno r1,r2, label
92
call r1,imm,r2
93
  call (r1+imm) return addr=r2
94
ret r1
95
 
96
ldl r1,imm/label,r2
97
ldw r1,imm/label,r2
98
ldb r1,imm/label,r2
99
 
100
stl r1,imm/label,r2
101
stw r1,imm/label,r2
102
stb r1,imm/label,r2

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.