Line 19... |
Line 19... |
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
//
|
//
|
// Extra state required for some datapath operations.
|
// Extra state required for some datapath operations.
|
// ============================================================================
|
// ============================================================================
|
//
|
//
|
CALC:
|
task calc_tsk;
|
begin
|
begin
|
state <= IFETCH;
|
state <= IFETCH;
|
res <= calc_res;
|
res <= alu_out;
|
wadr <= radr; // These two lines for the shift/inc/dec ops
|
wadr <= radr; // These two lines for the shift/inc/dec ops
|
store_what <= `STW_CALC;
|
store_what <= `STW_CALC;
|
case(ir[7:0])
|
case(ir9)
|
|
`BMS_ZPX,`BMS_ABS,`BMS_ABSX,
|
|
`BMC_ZPX,`BMC_ABS,`BMC_ABSX,
|
|
`BMF_ZPX,`BMF_ABS,`BMF_ABSX,
|
`ASL_ZPX,`ASL_ABS,`ASL_ABSX,
|
`ASL_ZPX,`ASL_ABS,`ASL_ABSX,
|
`ROL_ZPX,`ROL_ABS,`ROL_ABSX,
|
`ROL_ZPX,`ROL_ABS,`ROL_ABSX,
|
`LSR_ZPX,`LSR_ABS,`LSR_ABSX,
|
`LSR_ZPX,`LSR_ABS,`LSR_ABSX,
|
`ROR_ZPX,`ROR_ABS,`ROR_ABSX,
|
`ROR_ZPX,`ROR_ABS,`ROR_ABSX,
|
`INC_ZPX,`INC_ABS,`INC_ABSX,
|
`INC_ZPX,`INC_ABS,`INC_ABSX,
|
`DEC_ZPX,`DEC_ABS,`DEC_ABSX:
|
`DEC_ZPX,`DEC_ABS,`DEC_ABSX:
|
state <= STORE1;
|
state <= STORE1;
|
endcase
|
endcase
|
end
|
end
|
|
endtask
|
|
|
No newline at end of file
|
No newline at end of file
|