URL
https://opencores.org/ocsvn/ao486/ao486/trunk
Subversion Repositories ao486
[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_INS.txt] - Rev 2
Compare with Previous | Blame | View Log
<defines>
`define CMD_INS #AUTOGEN_NEXT_CMD
`define CMDEX_INS_real_1 4'd0
`define CMDEX_INS_real_2 4'd1
`define CMDEX_INS_protected_1 4'd2
`define CMDEX_INS_protected_2 4'd3
</defines>
<decode>
dec_ready_one && { decoder[7:1], 1'b0 } == 8'h6C
`CMD_INS
SET(dec_cmdex, `CMDEX_INS_real_1);
IF(decoder[0] == 1'b0); SET(dec_is_8bit); ENDIF();
SET(consume_one);
SET(dec_is_complex);
</decode>
<microcode>
IF(`CMDEX_INS_real_1 && ~(io_allow_check_needed));
`CMDEX_INS_real_2
`CMDEX_INS_real_1
ENDIF();
IF(`CMDEX_INS_real_1 && io_allow_check_needed);
CALL(`CMDEX_io_allow_1);
`CMDEX_INS_protected_1
ENDIF();
IF(`CMDEX_INS_protected_1);
`CMDEX_INS_protected_2
`CMDEX_INS_protected_1
ENDIF();
</microcode>
<read>
IF(rd_cmd == `CMD_INS && (rd_cmdex == `CMDEX_INS_real_1 || rd_cmdex == `CMDEX_INS_protected_1));
SET(address_edi);
// waiting for edi in address_waiting
IF(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) && ~(io_allow_check_needed && rd_cmdex == `CMDEX_INS_real_1));
// read value not saved
SET(read_rmw_virtual);
IF(~(read_for_rd_ready)); SET(rd_waiting); ENDIF();
ENDIF();
ENDIF();
ENDIF();
</read>
<read>
IF(rd_cmd == `CMD_INS && (rd_cmdex == `CMDEX_INS_real_2 || rd_cmdex == `CMDEX_INS_protected_2));
SET(io_read_address, edx[15:0]);
IF(rd_mutex_busy_edx || (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) && ~(io_allow_check_needed && rd_cmdex == `CMDEX_INS_real_1));
SET(rd_src_is_io);
SET(rd_req_edi);
SET(rd_req_memory);
//not needed -- reset after finish //IF(rd_prefix_group_1_rep != 2'd0); SET(rd_req_ecx); ENDIF();
SET(io_read);
IF(~(rd_io_ready)); SET(rd_waiting); ENDIF();
ENDIF();
ENDIF();
ENDIF();
</read>
<execute>
IF(exe_cmd == `CMD_INS);
SET(exe_result_push, src);
IF(exe_mutex_current[`MUTEX_EDX_BIT]); SET(exe_waiting);
ELSE();
SET(exe_glob_param_1_set);
SET(exe_glob_param_1_value, { 16'd0, edx[15:0] }); //for CMD_io_allow
ENDIF();
ENDIF();
</execute>
<write>
IF(wr_cmd == `CMD_INS);
// - rep && ignore
// - no rep
// - rep && finish
// - rep && not finish && not ignore
IF(wr_cmdex == `CMDEX_INS_real_1 || wr_cmdex == `CMDEX_INS_protected_1);
SET(wr_not_finished);
ELSE();
IF(~(wr_string_ignore));
// no fault possible -- RMW read performed before
SET(write_string_es_virtual);
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 || wr_prefix_group_1_rep == 2'd0);
SET(wr_req_reset_micro);
SET(wr_req_reset_rd);
SET(wr_req_reset_exe);
ELSE();
SET(wr_not_finished);
SET(wr_string_in_progress);
ENDIF();
ENDIF();
ENDIF();
IF(wr_string_ignore);
SET(wr_req_reset_micro);
SET(wr_req_reset_rd);
SET(wr_req_reset_exe);
ENDIF();
ENDIF();
ENDIF();
</write>