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

Subversion Repositories ao486

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_ARPL        #AUTOGEN_NEXT_CMD
4
5
 
6
7
dec_ready_modregrm_one && decoder[7:0] == 8'h63
8
prefix_group_1_lock || ~(protected_mode)
9
`CMD_ARPL
10
SET(consume_modregrm_one);
11
12
 
13
14
IF(rd_cmd == `CMD_ARPL);
15
    // dst: rm, src: reg
16
    IF(rd_modregrm_mod == 2'b11);
17
 
18
        SET(rd_src_is_reg);
19
        SET(rd_dst_is_rm);
20
 
21
        SET(rd_req_rm);
22
        SET(rd_req_eflags);
23
 
24
        IF(rd_mutex_busy_modregrm_rm || rd_mutex_busy_modregrm_reg); SET(rd_waiting); ENDIF();
25
    ENDIF();
26
 
27
    // dst: memory, src: reg
28
    IF(rd_modregrm_mod != 2'b11);
29
 
30
        SET(read_length_word);
31
 
32
        SET(rd_dst_is_memory);
33
 
34
        SET(rd_req_memory);
35
 
36
        IF(rd_mutex_busy_memory || rd_mutex_busy_modregrm_reg); SET(rd_waiting);
37
        ELSE();
38
            SET(read_rmw_virtual);
39
 
40
            IF(~(read_for_rd_ready)); SET(rd_waiting); ENDIF();
41
        ENDIF();
42
    ENDIF();
43
ENDIF();
44
45
 
46
47
IF(exe_cmd == `CMD_ARPL);
48
 
49
    SET(exe_result, { 16'd0, dst[15:2], src[1:0] });
50
    SET(exe_result_signals, { 4'd0, dst[1:0] < src[1:0] });
51
ENDIF();
52
53
 
54
55
IF(wr_cmd == `CMD_ARPL);
56
 
57
    SET(write_length_word);
58
    SET(wr_regrm_word);
59
 
60
    IF(result_signals[0]);
61
 
62
        SET(write_rmw_virtual,   wr_dst_is_memory);
63
        SET(write_regrm,         wr_dst_is_rm);
64
 
65
        IF(wr_dst_is_memory && ~(write_for_wr_ready)); SET(wr_waiting); ENDIF();
66
 
67
        SAVE(zflag, `TRUE);
68
    ELSE();
69
        SAVE(zflag, `FALSE);
70
    ENDIF();
71
ENDIF();
72
73
 

powered by: WebSVN 2.1.0

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