URL
https://opencores.org/ocsvn/ao486/ao486/trunk
Subversion Repositories ao486
[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_STOS.txt] - Rev 2
Compare with Previous | Blame | View Log
<defines>
`define CMD_STOS #AUTOGEN_NEXT_CMD
`define CMDEX_STOS_STEP_0 4'd0
</defines>
<decode>
dec_ready_one && { decoder[7:1], 1'b0 } == 8'hAA
`CMD_STOS
SET(dec_cmdex, `CMDEX_STOS_STEP_0);
IF(decoder[0] == 1'b0); SET(dec_is_8bit); ENDIF();
SET(consume_one);
IF(dec_prefix_group_1_rep != 2'd0); SET(dec_is_complex); ENDIF();
</decode>
<microcode>
//complex instruction only if: dec_prefix_group_1 != 2'd0
LOOP(`CMDEX_STOS_STEP_0);
</microcode>
<read>
IF(rd_cmd == `CMD_STOS);
IF(rd_mutex_busy_eax || (rd_mutex_busy_ecx && rd_prefix_group_1_rep != 2'd0)); SET(rd_waiting); //waiting for ecx for rd_string_ignore
ELSE();
IF(~(rd_string_ignore));
SET(rd_src_is_eax);
SET(rd_req_memory);
SET(rd_req_edi);
//not needed -- reset after finish //IF(rd_prefix_group_1_rep != 2'd0); SET(rd_req_ecx); ENDIF();
ENDIF();
ENDIF();
ENDIF();
</read>
<execute>
IF(exe_cmd == `CMD_STOS);
SET(exe_result_push, src);
ENDIF();
</execute>
<write>
IF(wr_cmd == `CMD_STOS);
SET(wr_string_gp_fault_check);
IF(~(wr_string_ignore));
SET(wr_one_cycle_wait);
IF(~(wr_string_es_fault));
SET(write_string_es_virtual);
ENDIF();
IF(~(write_for_wr_ready)); SET(wr_waiting);
ELSE();
SAVE(edi, wr_edi_final);
IF(wr_prefix_group_1_rep != 2'd0); SAVE(ecx, wr_ecx_final); ENDIF();
IF(wr_string_finish);
SET(wr_req_reset_micro);
SET(wr_req_reset_rd);
SET(wr_req_reset_exe);
ELSE();
IF(wr_prefix_group_1_rep != 2'd0);
SET(wr_not_finished);
SET(wr_string_in_progress);
ENDIF();
ENDIF();
ENDIF();
ENDIF();
IF(wr_string_ignore);
SET(wr_req_reset_micro);
SET(wr_req_reset_rd);
SET(wr_req_reset_exe);
ENDIF();
ENDIF();
</write>