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

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_RET_near.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_RET_near    #AUTOGEN_NEXT_CMD
4
 
5
// glob_param_2 --> eip
6
 
7
`define CMDEX_RET_near                  4'd0
8
`define CMDEX_RET_near_imm              4'd1
9
`define CMDEX_RET_near_LAST             4'd2
10
11
 
12
13
(dec_ready_one && decoder[7:0] == 8'hC3) || (dec_ready_one_two && decoder[7:0] == 8'hC2)
14
`CMD_RET_near
15
IF(decoder[0] == 1'b0); SET(dec_cmdex, `CMDEX_RET_near_imm); ELSE(); SET(dec_cmdex, `CMDEX_RET_near); ENDIF();
16
IF(decoder[0] == 1'b0); SET(consume_one_two); ELSE(); SET(consume_one); ENDIF();
17
SET(dec_is_complex);
18
19
 
20
21
IF(`CMDEX_RET_near_imm);
22
    LAST(`CMDEX_RET_near_LAST);
23
ENDIF();
24
 
25
IF(`CMDEX_RET_near);
26
    LAST(`CMDEX_RET_near_LAST);
27
ENDIF();
28
29
 
30
31
IF(rd_cmd == `CMD_RET_near && rd_cmdex != `CMDEX_RET_near_LAST);
32
 
33
    SET(address_stack_pop);
34
    // waiting for esp in 'address_ready'
35
 
36
    SET(rd_glob_param_2_set);
37
    SET(rd_glob_param_2_value, (rd_operand_16bit)? { 16'd0, read_4[15:0] } : read_4);
38
 
39
    SET(rd_req_esp);
40
 
41
    IF(rd_mutex_busy_memory); SET(rd_waiting);
42
    ELSE();
43
        SET(read_virtual);
44
 
45
        IF(~(read_for_rd_ready)); SET(rd_waiting); ENDIF();
46
    ENDIF();
47
ENDIF();
48
49
 
50
51
IF(exe_cmd == `CMD_RET_near && exe_cmdex != `CMDEX_RET_near_LAST);
52
 
53
    IF(exe_cmdex == `CMDEX_RET_near);
54
        SET(offset_pop);
55
    ENDIF();
56
 
57
    IF(exe_cmdex == `CMDEX_RET_near_imm);
58
        SET(offset_ret);
59
    ENDIF();
60
 
61
    SET(exe_eip_from_glob_param_2);
62
 
63
    IF(glob_param_2 > cs_limit);
64
        SET(exe_waiting);
65
        SET(exe_trigger_gp_fault); //exception GP(0)
66
    ENDIF();
67
ENDIF();
68
69
 
70
71
IF(wr_cmd == `CMD_RET_near && wr_cmdex != `CMDEX_RET_near_LAST);
72
 
73
    SAVE(esp, wr_stack_esp);
74
 
75
    SET(wr_req_reset_pr);
76
    SET(wr_req_reset_dec);
77
    SET(wr_req_reset_micro);
78
    SET(wr_req_reset_rd);
79
    SET(wr_req_reset_exe);
80
ENDIF();
81

powered by: WebSVN 2.1.0

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