5 input stall, /* pipeline control */
8 input inbubble, /* stage inputs */
12 output reg outbubble, /* stage outputs */
13 output reg [31:0] outpc
19 outbubble <= inbubble;
23 `ifdef COPY_PASTA_FODDER
24 /* from page 2 of ARM7TDMIvE2.pdf */
26 32'b????000000??????????????1001????: /* Multiply -- must come before ALU, because it pattern matches a specific case of ALU */
27 // 32'b????00001???????????????1001????: /* Multiply long */
28 32'b????00010?001111????000000000000: /* MRS (Transfer PSR to register) */
29 32'b????00010?101001111100000000????: /* MSR (Transfer register to PSR) */
30 32'b????00?10?1010001111????????????: /* MSR (Transfer register or immediate to PSR, flag bits only) */
31 32'b????00??????????????????????????: /* ALU */
32 32'b????00010?00????????00001001????: /* Atomic swap */
33 32'b????000100101111111111110001????: /* Branch */
34 32'b????000??0??????????00001??1????: /* Halfword transfer - register offset */
35 32'b????000??1??????????00001??1????: /* Halfword transfer - register offset */
36 32'b????011????????????????????1????: /* Undefined. I hate ARM */
37 32'b????01??????????????????????????: /* Single data transfer */
38 32'b????100?????????????????????????: /* Block data transfer */
39 32'b????101?????????????????????????: /* Branch */
40 32'b????110?????????????????????????: /* Coprocessor data transfer */
41 32'b????1110???????????????????0????: /* Coprocessor data op */
42 32'b????1110???????????????????1????: /* Coprocessor register transfer */
43 32'b????1111????????????????????????: /* SWI */
44 default: /* X everything else out */
55 function [15:0] idxbit;
57 idxbit = (16'b1) << r;
60 wire [3:0] rn = insn[19:16];
61 wire [3:0] rd = insn[15:12];
62 wire [3:0] rm = insn[3:0];
63 wire [3:0] cond = insn[31:28];
65 wire [3:0] rd_mul = insn[19:16];
66 wire [3:0] rn_mul = insn[15:12];
67 wire [3:0] rs_mul = insn[11:8];
71 32'b????000000??????????????1001????: /* Multiply -- must come before ALU, because it pattern matches a specific case of ALU */
73 use_cpsr = `COND_MATTERS(cond);
74 use_regs = (insn[21] /* accum */ ? idxbit(rn_mul) : 0) | idxbit(rs_mul) | idxbit(rm);
75 def_cpsr = insn[20] /* setcc */;
76 def_regs = idxbit(rd_mul);
78 // 32'b????00001???????????????1001????: /* Multiply long */
79 32'b????00010?001111????000000000000: /* MRS (Transfer PSR to register) */
80 32'b????00010?101001111100000000????: /* MSR (Transfer register to PSR) */
81 32'b????00?10?1010001111????????????: /* MSR (Transfer register or immediate to PSR, flag bits only) */
82 32'b????00??????????????????????????: /* ALU */
83 32'b????00010?00????????00001001????: /* Atomic swap */
84 32'b????000100101111111111110001????: /* Branch */
85 32'b????000??0??????????00001??1????: /* Halfword transfer - register offset */
86 32'b????000??1??????????00001??1????: /* Halfword transfer - register offset */
87 32'b????011????????????????????1????: /* Undefined. I hate ARM */
88 32'b????01??????????????????????????: /* Single data transfer */
89 32'b????100?????????????????????????: /* Block data transfer */
90 32'b????101?????????????????????????: /* Branch */
91 32'b????110?????????????????????????: /* Coprocessor data transfer */
92 32'b????1110???????????????????0????: /* Coprocessor data op */
93 32'b????1110???????????????????1????: /* Coprocessor register transfer */
94 32'b????1111????????????????????????: /* SWI */
95 default: /* X everything else out */