1 |
2 |
sinclairrf |
// short, human-readable versions of s_opcode suitable for waveform viewers
|
2 |
|
|
reg [3*8-1:0] s_opcode_name = "nop";
|
3 |
|
|
always @ (posedge i_clk)
|
4 |
|
|
casez (s_opcode)
|
5 |
|
|
9'b00_0000_000 : s_opcode_name = "nop";
|
6 |
|
|
9'b00_0000_001 : s_opcode_name = "<<0";
|
7 |
|
|
9'b00_0000_010 : s_opcode_name = "<<1";
|
8 |
|
|
9'b00_0000_011 : s_opcode_name = "<<m";
|
9 |
|
|
9'b00_0000_100 : s_opcode_name = "0>>";
|
10 |
|
|
9'b00_0000_101 : s_opcode_name = "1>>";
|
11 |
|
|
9'b00_0000_110 : s_opcode_name = "m>>";
|
12 |
|
|
9'b00_0000_111 : s_opcode_name = "l>>";
|
13 |
|
|
9'b00_0001_000 : s_opcode_name = "dup";
|
14 |
|
|
9'b00_0001_001 : s_opcode_name = "r@ ";
|
15 |
|
|
9'b00_0001_010 : s_opcode_name = "ovr";
|
16 |
|
|
9'b00_0010_010 : s_opcode_name = "swp";
|
17 |
|
|
9'b00_0011_000 : s_opcode_name = "+ ";
|
18 |
|
|
9'b00_0011_100 : s_opcode_name = "- ";
|
19 |
|
|
9'b00_0100_000 : s_opcode_name = "0= ";
|
20 |
|
|
9'b00_0100_001 : s_opcode_name = "0<>";
|
21 |
|
|
9'b00_0100_010 : s_opcode_name = "-1=";
|
22 |
|
|
9'b00_0100_011 : s_opcode_name = "-1#";
|
23 |
|
|
9'b00_0101_000 : s_opcode_name = "rtn";
|
24 |
|
|
9'b00_0110_000 : s_opcode_name = "inp";
|
25 |
|
|
9'b00_0111_000 : s_opcode_name = "out";
|
26 |
|
|
9'b00_1000_000 : s_opcode_name = ">r ";
|
27 |
|
|
9'b00_1001_001 : s_opcode_name = "r> ";
|
28 |
|
|
9'b00_1010_000 : s_opcode_name = "& ";
|
29 |
|
|
9'b00_1010_001 : s_opcode_name = "or ";
|
30 |
|
|
9'b00_1010_010 : s_opcode_name = "^ ";
|
31 |
|
|
9'b00_1010_011 : s_opcode_name = "nip";
|
32 |
|
|
9'b00_1010_100 : s_opcode_name = "drp";
|
33 |
|
|
9'b00_1011_000 : s_opcode_name = "1+ ";
|
34 |
|
|
9'b00_1011_100 : s_opcode_name = "1- ";
|
35 |
|
|
9'b00_1100_000 : s_opcode_name = "s0 ";
|
36 |
|
|
9'b00_1100_001 : s_opcode_name = "s1 ";
|
37 |
|
|
9'b00_1100_010 : s_opcode_name = "s2 ";
|
38 |
|
|
9'b00_1100_011 : s_opcode_name = "s3 ";
|
39 |
|
|
9'b00_1101_000 : s_opcode_name = "@0 ";
|
40 |
|
|
9'b00_1101_001 : s_opcode_name = "@1 ";
|
41 |
|
|
9'b00_1101_010 : s_opcode_name = "@2 ";
|
42 |
|
|
9'b00_1101_011 : s_opcode_name = "@3 ";
|
43 |
|
|
9'b00_1110_000 : s_opcode_name = "s0+";
|
44 |
|
|
9'b00_1110_001 : s_opcode_name = "s1+";
|
45 |
|
|
9'b00_1110_010 : s_opcode_name = "s2+";
|
46 |
|
|
9'b00_1110_011 : s_opcode_name = "s3+";
|
47 |
|
|
9'b00_1110_100 : s_opcode_name = "s0-";
|
48 |
|
|
9'b00_1110_101 : s_opcode_name = "s1-";
|
49 |
|
|
9'b00_1110_110 : s_opcode_name = "s2-";
|
50 |
|
|
9'b00_1110_111 : s_opcode_name = "s3-";
|
51 |
|
|
9'b00_1111_000 : s_opcode_name = "@0+";
|
52 |
|
|
9'b00_1111_001 : s_opcode_name = "@1+";
|
53 |
|
|
9'b00_1111_010 : s_opcode_name = "@2+";
|
54 |
|
|
9'b00_1111_011 : s_opcode_name = "@3+";
|
55 |
|
|
9'b00_1111_100 : s_opcode_name = "@0-";
|
56 |
|
|
9'b00_1111_101 : s_opcode_name = "@1-";
|
57 |
|
|
9'b00_1111_110 : s_opcode_name = "@2-";
|
58 |
|
|
9'b00_1111_111 : s_opcode_name = "@3-";
|
59 |
|
|
9'b0_100_????? : s_opcode_name = "jp ";
|
60 |
|
|
9'b0_110_????? : s_opcode_name = "cl ";
|
61 |
|
|
9'b0_101_????? : s_opcode_name = "jpc";
|
62 |
|
|
9'b0_111_????? : s_opcode_name = "clc";
|
63 |
|
|
9'b1_????_???? : s_opcode_name = "psh";
|
64 |
|
|
default : s_opcode_name = "INV";
|
65 |
|
|
endcase
|