URL
https://opencores.org/ocsvn/ao486/ao486/trunk
Subversion Repositories ao486
[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_POPA.txt] - Rev 8
Go to most recent revision | Compare with Previous | Blame | View Log
<defines>
`define CMD_POPA #AUTOGEN_NEXT_CMD
`define CMDEX_POPA_STEP_0 4'd0
`define CMDEX_POPA_STEP_1 4'd1
`define CMDEX_POPA_STEP_2 4'd2
`define CMDEX_POPA_STEP_3 4'd3
`define CMDEX_POPA_STEP_4 4'd4
`define CMDEX_POPA_STEP_5 4'd5
`define CMDEX_POPA_STEP_6 4'd6
`define CMDEX_POPA_STEP_7 4'd7
</defines>
<decode>
dec_ready_one && decoder[7:0] == 8'h61
`CMD_POPA
SET(dec_cmdex, `CMDEX_POPA_STEP_0);
SET(consume_one);
SET(dec_is_complex);
</decode>
<microcode>
IF(mc_cmd == `CMD_POPA && mc_step < 6'd7);
DIRECT(mc_cmd, mc_step[3:0]);
ENDIF();
IF(mc_cmd == `CMD_POPA && mc_step == 6'd7);
LAST(`CMDEX_POPA_STEP_7);
ENDIF();
</microcode>
<read>
IF(rd_cmd == `CMD_POPA);
SET(address_stack_pop);
IF(rd_cmdex[2:0] > 3'd0); SET(address_stack_pop_speedup); ENDIF();
IF(rd_cmdex[2:0] == 3'd7); SET(rd_req_all); ENDIF();
IF(rd_mutex_busy_memory || rd_mutex_busy_esp); SET(rd_waiting);
ELSE();
SET(rd_src_is_memory);
SET(read_virtual);
IF(~(read_for_rd_ready)); SET(rd_waiting); ENDIF();
ENDIF();
ENDIF();
</read>
<execute>
IF(exe_cmd == `CMD_POPA);
SET(offset_pop);
IF(exe_ready);
SAVE(exe_buffer, src);
SET(exe_buffer_shift);
ENDIF();
ENDIF();
</execute>
<write>
IF(wr_cmd == `CMD_POPA);
//NOTE: exe_buffer can only be used if wr stage does not block (and it does not)
IF(wr_cmdex[2:0] == 3'd0); SET(wr_make_esp_speculative); ENDIF();
SAVE(esp, wr_stack_esp);
IF(wr_cmdex[2:0] == 3'd7);
SET(wr_make_esp_commit);
SAVE(eax, { wr_operand_16bit? eax[31:16] : exe_buffer[31:16], exe_buffer[15:0] });
SAVE(ecx, { wr_operand_16bit? ecx[31:16] : exe_buffer_shifted[31:16], exe_buffer_shifted[15:0] });
SAVE(edx, { wr_operand_16bit? edx[31:16] : exe_buffer_shifted[63:48], exe_buffer_shifted[47:32] });
SAVE(ebx, { wr_operand_16bit? ebx[31:16] : exe_buffer_shifted[95:80], exe_buffer_shifted[79:64] });
//esp
SAVE(ebp, { wr_operand_16bit? ebp[31:16] : exe_buffer_shifted[159:144], exe_buffer_shifted[143:128] });
SAVE(esi, { wr_operand_16bit? esi[31:16] : exe_buffer_shifted[191:176], exe_buffer_shifted[175:160] });
SAVE(edi, { wr_operand_16bit? edi[31:16] : exe_buffer_shifted[223:208], exe_buffer_shifted[207:192] });
ELSE();
SET(wr_not_finished);
ENDIF();
ENDIF();
</write>
Go to most recent revision | Compare with Previous | Blame | View Log