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

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_INS.txt] - Blame information for rev 6

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

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_INS         #AUTOGEN_NEXT_CMD
4
 
5
`define CMDEX_INS_real_1        4'd0
6
`define CMDEX_INS_real_2        4'd1
7
`define CMDEX_INS_protected_1   4'd2
8
`define CMDEX_INS_protected_2   4'd3
9
10
 
11
12
dec_ready_one && { decoder[7:1], 1'b0 } == 8'h6C
13
`CMD_INS
14
SET(dec_cmdex, `CMDEX_INS_real_1);
15
IF(decoder[0] == 1'b0); SET(dec_is_8bit); ENDIF();
16
SET(consume_one);
17
SET(dec_is_complex);
18
19
 
20
 
21
22
IF(`CMDEX_INS_real_1 && ~(io_allow_check_needed));
23
    `CMDEX_INS_real_2
24
    `CMDEX_INS_real_1
25
ENDIF();
26
 
27
IF(`CMDEX_INS_real_1 && io_allow_check_needed);
28
    CALL(`CMDEX_io_allow_1);
29
    `CMDEX_INS_protected_1
30
ENDIF();
31
 
32
IF(`CMDEX_INS_protected_1);
33
    `CMDEX_INS_protected_2
34
    `CMDEX_INS_protected_1
35
ENDIF();
36
37
 
38
39
IF(rd_cmd == `CMD_INS && (rd_cmdex == `CMDEX_INS_real_1 || rd_cmdex == `CMDEX_INS_protected_1));
40
 
41
    SET(address_edi);
42
    // waiting for edi in address_waiting
43
 
44
    IF(rd_mutex_busy_ecx && rd_prefix_group_1_rep != 2'd0); SET(rd_waiting);
45
    //waiting for ecx for rd_string_ignore
46
    ELSE();
47
 
48
        IF(~(rd_string_ignore) && ~(io_allow_check_needed && rd_cmdex == `CMDEX_INS_real_1));
49
            // read value not saved
50
 
51
            SET(read_rmw_virtual);
52
 
53
            IF(~(read_for_rd_ready)); SET(rd_waiting); ENDIF();
54
        ENDIF();
55
    ENDIF();
56
ENDIF();
57
58
 
59
60
IF(rd_cmd == `CMD_INS && (rd_cmdex == `CMDEX_INS_real_2 || rd_cmdex == `CMDEX_INS_protected_2));
61
 
62
    SET(io_read_address, edx[15:0]);
63
 
64
    IF(rd_mutex_busy_edx || (rd_mutex_busy_ecx && rd_prefix_group_1_rep != 2'd0)); SET(rd_waiting);
65
    //waiting for ecx for rd_string_ignore
66
    ELSE();
67
 
68
        IF(~(rd_string_ignore) && ~(io_allow_check_needed && rd_cmdex == `CMDEX_INS_real_1));
69
            SET(rd_src_is_io);
70
 
71
            SET(rd_req_edi);
72
            SET(rd_req_memory);
73
 
74
            //not needed -- reset after finish //IF(rd_prefix_group_1_rep != 2'd0); SET(rd_req_ecx); ENDIF();
75
 
76
            SET(io_read);
77
 
78
            IF(~(rd_io_ready)); SET(rd_waiting); ENDIF();
79
        ENDIF();
80
    ENDIF();
81
ENDIF();
82
83
 
84
85
IF(exe_cmd == `CMD_INS);
86
 
87
    SET(exe_result_push, src);
88
 
89
    IF(exe_mutex_current[`MUTEX_EDX_BIT]); SET(exe_waiting);
90
    ELSE();
91
        SET(exe_glob_param_1_set);
92
        SET(exe_glob_param_1_value, { 16'd0, edx[15:0] }); //for CMD_io_allow
93
    ENDIF();
94
ENDIF();
95
96
 
97
98
IF(wr_cmd == `CMD_INS);
99
 
100
    // - rep && ignore
101
    // - no rep
102
    // - rep && finish
103
    // - rep && not finish && not ignore
104
 
105
    IF(wr_cmdex == `CMDEX_INS_real_1 || wr_cmdex == `CMDEX_INS_protected_1);
106
        SET(wr_not_finished);
107
    ELSE();
108
        IF(~(wr_string_ignore));
109
 
110
            // no fault possible -- RMW read performed before
111
            SET(write_string_es_virtual);
112
 
113
            IF(~(write_for_wr_ready)); SET(wr_waiting);
114
            ELSE();
115
                SAVE(edi, wr_edi_final);
116
                IF(wr_prefix_group_1_rep != 2'd0); SAVE(ecx, wr_ecx_final); ENDIF();
117
 
118
                IF(wr_string_finish || wr_prefix_group_1_rep == 2'd0);
119
                    SET(wr_req_reset_micro);
120
                    SET(wr_req_reset_rd);
121
                    SET(wr_req_reset_exe);
122
                ELSE();
123
                    SET(wr_not_finished);
124
 
125
                    SET(wr_string_in_progress);
126
                ENDIF();
127
            ENDIF();
128
        ENDIF();
129
 
130
        IF(wr_string_ignore);
131
            SET(wr_req_reset_micro);
132
            SET(wr_req_reset_rd);
133
            SET(wr_req_reset_exe);
134
        ENDIF();
135
    ENDIF();
136
ENDIF();
137
138
 

powered by: WebSVN 2.1.0

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