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

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_PUSH_MOV_SEG.txt] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_PUSH_MOV_SEG        #AUTOGEN_NEXT_CMD
4
 
5
`define CMDEX_PUSH_MOV_SEG_implicit     4'd0
6
`define CMDEX_PUSH_MOV_SEG_implicit_ES  4'd0
7
`define CMDEX_PUSH_MOV_SEG_implicit_CS  4'd1
8
`define CMDEX_PUSH_MOV_SEG_implicit_SS  4'd2
9
`define CMDEX_PUSH_MOV_SEG_implicit_DS  4'd3
10
`define CMDEX_PUSH_MOV_SEG_implicit_FS  4'd4
11
`define CMDEX_PUSH_MOV_SEG_implicit_GS  4'd5
12
`define CMDEX_PUSH_MOV_SEG_implicit_LDT 4'd6
13
`define CMDEX_PUSH_MOV_SEG_implicit_TR  4'd7
14
 
15
`define CMDEX_PUSH_MOV_SEG_modregrm     4'd8
16
`define CMDEX_PUSH_MOV_SEG_modregrm_ES  4'd8
17
`define CMDEX_PUSH_MOV_SEG_modregrm_CS  4'd9
18
`define CMDEX_PUSH_MOV_SEG_modregrm_SS  4'd10
19
`define CMDEX_PUSH_MOV_SEG_modregrm_DS  4'd11
20
`define CMDEX_PUSH_MOV_SEG_modregrm_FS  4'd12
21
`define CMDEX_PUSH_MOV_SEG_modregrm_GS  4'd13
22
`define CMDEX_PUSH_MOV_SEG_modregrm_LDT 4'd14
23
`define CMDEX_PUSH_MOV_SEG_modregrm_TR  4'd15
24
25
 
26
27
(dec_ready_one && (decoder[7:0] == 8'h06 || decoder[7:0] == 8'h16 || decoder[7:0] == 8'h0E || decoder[7:0] == 8'h1E)) || (dec_ready_2byte_one && (decoder[7:0] == 8'hA0 || decoder[7:0] == 8'hA8))
28
`CMD_PUSH_MOV_SEG
29
SET(dec_cmdex, `CMDEX_PUSH_MOV_SEG_implicit | { 1'b0, decoder[5:3] });
30
SET(consume_one);
31
32
 
33
34
dec_ready_modregrm_one && decoder[7:0] == 8'h8C
35
prefix_group_1_lock || decoder[13:11] >= 3'd6
36
`CMD_PUSH_MOV_SEG
37
SET(dec_cmdex, `CMDEX_PUSH_MOV_SEG_modregrm | { 1'b0, decoder[13:11] });
38
SET(consume_modregrm_one);
39
40
 
41
42
dec_ready_2byte_modregrm && decoder[7:0] == 8'h00 && decoder[13:11] == 3'd0
43
prefix_group_1_lock || ~(protected_mode)
44
`CMD_PUSH_MOV_SEG
45
SET(dec_cmdex, `CMDEX_PUSH_MOV_SEG_modregrm_LDT);
46
SET(consume_modregrm_one);
47
48
 
49
50
dec_ready_2byte_modregrm && decoder[7:0] == 8'h00 && decoder[13:11] == 3'd1
51
prefix_group_1_lock || ~(protected_mode)
52
`CMD_PUSH_MOV_SEG
53
SET(dec_cmdex, `CMDEX_PUSH_MOV_SEG_modregrm_TR);
54
SET(consume_modregrm_one);
55
56
 
57
58
IF(rd_cmd == `CMD_PUSH_MOV_SEG && { rd_cmdex[3], 3'b0 } == `CMDEX_PUSH_MOV_SEG_implicit);
59
 
60
    SET(rd_req_memory);
61
    SET(rd_req_esp);
62
ENDIF();
63
64
 
65
66
IF(rd_cmd == `CMD_PUSH_MOV_SEG && { rd_cmdex[3], 3'b0 } == `CMDEX_PUSH_MOV_SEG_modregrm);
67
    // dst: reg, src: seg
68
    IF(rd_modregrm_mod == 2'b11);
69
 
70
        SET(rd_dst_is_rm);
71
 
72
        SET(rd_req_rm);
73
    ENDIF();
74
 
75
    // dst: memory, src: seg
76
    IF(rd_modregrm_mod != 2'b11);
77
 
78
        SET(rd_dst_is_memory);
79
 
80
        SET(rd_req_memory);
81
 
82
        IF(rd_mutex_busy_memory); SET(rd_waiting);
83
        ELSE();
84
            SET(write_virtual_check);
85
 
86
            IF(~(write_virtual_check_ready)); SET(rd_waiting); ENDIF();
87
        ENDIF();
88
    ENDIF();
89
ENDIF();
90
91
 
92
93
IF(exe_cmd == `CMD_PUSH_MOV_SEG && { exe_cmdex[3], 3'b0 } == `CMDEX_PUSH_MOV_SEG_implicit);
94
 
95
    SET(exe_result_push, { 16'd0, e_seg_by_cmdex });
96
 
97
    IF(exe_mutex_current[`MUTEX_ESP_BIT]); SET(exe_waiting); ENDIF();
98
ENDIF();
99
100
 
101
102
IF(exe_cmd == `CMD_PUSH_MOV_SEG && { exe_cmdex[3], 3'b0 } == `CMDEX_PUSH_MOV_SEG_modregrm);
103
 
104
    SET(exe_result, { 16'd0, e_seg_by_cmdex });
105
 
106
ENDIF();
107
108
 
109
110
IF(wr_cmd == `CMD_PUSH_MOV_SEG && { wr_cmdex[3], 3'b0 } == `CMDEX_PUSH_MOV_SEG_implicit);
111
 
112
    SET(wr_push_length_word);
113
    SET(wr_push_ss_fault_check);
114
    SET(wr_one_cycle_wait);
115
 
116
    IF(~(write_for_wr_ready)); SET(wr_waiting); ENDIF();
117
 
118
    IF(~(wr_push_ss_fault));
119
        SET(write_stack_virtual);
120
    ENDIF();
121
 
122
    IF(write_for_wr_ready && ~(wr_push_ss_fault));
123
        SAVE(esp, wr_stack_esp);
124
    ENDIF();
125
ENDIF();
126
127
 
128
129
IF(wr_cmd == `CMD_PUSH_MOV_SEG && { wr_cmdex[3], 3'b0 } == `CMDEX_PUSH_MOV_SEG_modregrm);
130
    IF(wr_dst_is_memory && ~(write_for_wr_ready)); SET(wr_waiting); ENDIF();
131
 
132
    SET(write_length_word);
133
 
134
    SET(write_regrm,     wr_dst_is_rm);
135
    SET(write_virtual,   wr_dst_is_memory);
136
ENDIF();
137
138
 

powered by: WebSVN 2.1.0

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