-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathinstruction.mif
48 lines (39 loc) · 897 Bytes
/
instruction.mif
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
DEPTH = 65536; -- The size of memory in words
WIDTH = 8; -- The size of data in bits
ADDRESS_RADIX = DEC; -- The radix for address values
DATA_RADIX = BIN; -- The radix for data values
CONTENT -- Start of (address: data pairs)
BEGIN
000: 00000011; -- lw x4,0(x0)
001: 00100010;
002: 00000000;
003: 00000000;
004: 10110011; -- and x5,x4,x1
005: 01110010;
006: 00010010;
007: 00000000;
008: 00100011; -- sw x5,4(x0)
009: 00100010;
010: 01010000;
011: 00000000;
012: 00000011; -- lw x6,4(x0)
013: 00100011;
014: 01000000;
015: 00000000;
016: 00000011; -- lw x8,4(x0)
017: 00100100;
018: 01000000;
019: 00000000;
020: 10110011; -- add x7,x4,x4
021: 00000011;
022: 01000010;
023: 00000000;
024: 10110011; -- add x7,x7,x4
025: 10000011;
026: 01000011;
027: 00000000;
028: 11100011; -- beq x6,x8,-4
029: 00001110;
030: 10000011;
031: 11111110;
END;