OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_POPA.txt] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_POPA        #AUTOGEN_NEXT_CMD
4
 
5
`define CMDEX_POPA_STEP_0   4'd0
6
`define CMDEX_POPA_STEP_1   4'd1
7
`define CMDEX_POPA_STEP_2   4'd2
8
`define CMDEX_POPA_STEP_3   4'd3
9
`define CMDEX_POPA_STEP_4   4'd4
10
`define CMDEX_POPA_STEP_5   4'd5
11
`define CMDEX_POPA_STEP_6   4'd6
12
`define CMDEX_POPA_STEP_7   4'd7
13
14
 
15
16
dec_ready_one && decoder[7:0] == 8'h61
17
`CMD_POPA
18
SET(dec_cmdex, `CMDEX_POPA_STEP_0);
19
SET(consume_one);
20
SET(dec_is_complex);
21
22
 
23
24
IF(mc_cmd == `CMD_POPA && mc_step < 6'd7);
25
    DIRECT(mc_cmd, mc_step[3:0]);
26
ENDIF();
27
 
28
IF(mc_cmd == `CMD_POPA && mc_step == 6'd7);
29
    LAST(`CMDEX_POPA_STEP_7);
30
ENDIF();
31
32
 
33
34
IF(rd_cmd == `CMD_POPA);
35
 
36
    SET(address_stack_pop);
37
 
38
    IF(rd_cmdex[2:0] > 3'd0); SET(address_stack_pop_speedup); ENDIF();
39
 
40
    IF(rd_cmdex[2:0] == 3'd7);  SET(rd_req_all); ENDIF();
41
 
42
    IF(rd_mutex_busy_memory || rd_mutex_busy_esp); SET(rd_waiting);
43
    ELSE();
44
        SET(rd_src_is_memory);
45
 
46
        SET(read_virtual);
47
 
48
        IF(~(read_for_rd_ready)); SET(rd_waiting); ENDIF();
49
    ENDIF();
50
ENDIF();
51
52
 
53
54
IF(exe_cmd == `CMD_POPA);
55
 
56
    SET(offset_pop);
57
 
58
    IF(exe_ready);
59
        SAVE(exe_buffer, src);
60
        SET(exe_buffer_shift);
61
    ENDIF();
62
ENDIF();
63
64
 
65
66
IF(wr_cmd == `CMD_POPA);
67
    //NOTE: exe_buffer can only be used if wr stage does not block (and it does not)
68
 
69
    IF(wr_cmdex[2:0] == 3'd0); SET(wr_make_esp_speculative); ENDIF();
70
 
71
    SAVE(esp, wr_stack_esp);
72
 
73
    IF(wr_cmdex[2:0] == 3'd7);
74
        SET(wr_make_esp_commit);
75
 
76
        SAVE(eax, { wr_operand_16bit? eax[31:16] : exe_buffer[31:16],           exe_buffer[15:0] });
77
        SAVE(ecx, { wr_operand_16bit? ecx[31:16] : exe_buffer_shifted[31:16],   exe_buffer_shifted[15:0] });
78
        SAVE(edx, { wr_operand_16bit? edx[31:16] : exe_buffer_shifted[63:48],   exe_buffer_shifted[47:32] });
79
        SAVE(ebx, { wr_operand_16bit? ebx[31:16] : exe_buffer_shifted[95:80],   exe_buffer_shifted[79:64] });
80
        //esp
81
        SAVE(ebp, { wr_operand_16bit? ebp[31:16] : exe_buffer_shifted[159:144], exe_buffer_shifted[143:128] });
82
        SAVE(esi, { wr_operand_16bit? esi[31:16] : exe_buffer_shifted[191:176], exe_buffer_shifted[175:160] });
83
        SAVE(edi, { wr_operand_16bit? edi[31:16] : exe_buffer_shifted[223:208], exe_buffer_shifted[207:192] });
84
    ELSE();
85
        SET(wr_not_finished);
86
    ENDIF();
87
ENDIF();
88

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.