URL
https://opencores.org/ocsvn/ao486/ao486/trunk
Subversion Repositories ao486
[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_OUT.txt] - Rev 2
Compare with Previous | Blame | View Log
<defines>
`define CMD_OUT #AUTOGEN_NEXT_CMD
`define CMDEX_OUT_imm 4'd0
`define CMDEX_OUT_dx 4'd1
`define CMDEX_OUT_protected 4'd2
`define CMDEX_OUT_idle 4'd3
</defines>
<decode>
(dec_ready_one && { decoder[7:1], 1'b0 } == 8'hEE) || (dec_ready_one_one && { decoder[7:1], 1'b0 } == 8'hE6)
`CMD_OUT
IF(decoder[3]); SET(dec_cmdex, `CMDEX_OUT_dx); ELSE(); SET(dec_cmdex, `CMDEX_OUT_imm); ENDIF();
IF(decoder[0] == 1'b0); SET(dec_is_8bit); ENDIF();
IF(decoder[3] == 1'b1); SET(consume_one); ELSE(); SET(consume_one_one); ENDIF();
SET(dec_is_complex);
</decode>
<microcode>
IF(mc_cmd == `CMD_OUT && (mc_cmdex_last == `CMDEX_OUT_imm || mc_cmdex_last == `CMDEX_OUT_dx) && ~(io_allow_check_needed));
LOOP(`CMDEX_OUT_idle);
ENDIF();
IF(mc_cmd == `CMD_OUT && (mc_cmdex_last == `CMDEX_OUT_imm || mc_cmdex_last == `CMDEX_OUT_dx) && io_allow_check_needed);
CALL(`CMDEX_io_allow_1);
`CMDEX_OUT_protected
LOOP(`CMDEX_OUT_idle);
ENDIF();
</microcode>
<read>
IF(rd_cmd == `CMD_OUT); // all CMDEX
SET(rd_src_is_eax);
IF(rd_mutex_busy_eax); SET(rd_waiting); ENDIF();
ENDIF();
</read>
<execute>
IF(exe_cmd == `CMD_OUT && (exe_cmdex == `CMDEX_OUT_dx || exe_cmdex == `CMDEX_OUT_imm));
SET(exe_result_push, src);
IF(exe_cmdex == `CMDEX_OUT_dx && exe_mutex_current[`MUTEX_EDX_BIT]); SET(exe_waiting);
ELSE();
SET(exe_glob_param_1_set);
SET(exe_glob_param_1_value, (exe_cmdex == `CMDEX_OUT_dx)? { 16'd0, edx[15:0] } : { 24'd0, exe_decoder[15:8] });
ENDIF();
ENDIF();
</execute>
<execute>
IF(exe_cmd == `CMD_OUT && exe_cmdex == `CMDEX_OUT_protected);
SET(exe_result_push, src);
ENDIF();
</execute>
<write>
IF(wr_cmd == `CMD_OUT); // all CMDEX
IF(~(io_allow_check_needed) || wr_cmdex == `CMDEX_OUT_protected);
SET(write_io);
IF(~(write_io_for_wr_ready)); SET(wr_waiting);
ELSE();
// reset pipeline
SET(wr_req_reset_micro);
SET(wr_req_reset_rd);
SET(wr_req_reset_exe);
ENDIF();
ELSE();
SET(wr_not_finished);
ENDIF();
ENDIF();
</write>