diff options
Diffstat (limited to 'src/sched.sv')
-rw-r--r-- | src/sched.sv | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/sched.sv b/src/sched.sv index c538dc2..16a1e54 100644 --- a/src/sched.sv +++ b/src/sched.sv @@ -5,9 +5,6 @@ module sched parameter QUE_DEPTH, parameter SLOT_COUNT, parameter SLOT_DEPTH, - type port_t, - type mov_t, - type insn_t, type slot_t )( input insn_t[QUE_DEPTH-1:0] que_i, @@ -28,7 +25,7 @@ endfunction function automatic logic check_dst(mov_t d1, mov_t[SLOT_DEPTH-1:0] d2); logic[SLOT_DEPTH-1:0] dep = '0; for (int i = 0; i < SLOT_DEPTH; ++i) begin - dep[i] = d1.dst != `NOP & d1.dst == d2[i].dst; + dep[i] = d1.dst != NOP & d1.dst == d2[i].dst; end return dep != 0; endfunction @@ -37,7 +34,7 @@ endfunction function automatic logic check_overlap(mov_t d1, mov_t[SLOT_DEPTH-1:0] d2); logic[SLOT_DEPTH-1:0] dep = '0; for (int i = 0; i < SLOT_DEPTH; ++i) begin - dep[i] = d1.src != `NOP & d1.src == d2[i].dst; + dep[i] = d1.src != NOP & d1.src == d2[i].dst; end return dep != 0; endfunction @@ -50,7 +47,7 @@ function automatic logic depends(insn_t i, slot_t[SLOT_COUNT-1:0] slots); logic overlap1 = check_overlap(i.in[0], slots[ii].out); logic overlap2 = check_overlap(i.in[1], slots[ii].out); - logic same_src1 = i.in[0].dst != `NOP + logic same_src1 = i.in[0].dst != NOP & i.in[0].dst == slots[ii].in[0].dst; /* op must have trigger so don't need to check against NOP */ @@ -62,7 +59,7 @@ function automatic logic depends(insn_t i, slot_t[SLOT_COUNT-1:0] slots); endfunction function automatic logic is_noop(mov_t m); - return m.src == `NOP && m.dst == `NOP; + return m.src == NOP && m.dst == NOP; endfunction function automatic mov_t[SLOT_DEPTH-1:0] place_out(int i, logic placed, @@ -80,6 +77,7 @@ endfunction function automatic slot_t place(insn_t i, slot_t src); slot_t slot; slot.op = i.op; + slot.imm = i.imm; slot.in = i.in; slot.out = place_out(0, 0, i.out, src.out); return slot; |