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

Subversion Repositories ao486

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_LODS        #AUTOGEN_NEXT_CMD
4
 
5
`define CMDEX_LODS_STEP_0   4'd0
6
7
 
8
9
dec_ready_one && { decoder[7:1], 1'b0 } == 8'hAC
10
`CMD_LODS
11
SET(dec_cmdex, `CMDEX_LODS_STEP_0);
12
IF(decoder[0] == 1'b0); SET(dec_is_8bit); ENDIF();
13
SET(consume_one);
14
IF(dec_prefix_group_1_rep != 2'd0); SET(dec_is_complex); ENDIF();
15
16
 
17
18
//complex instruction only if: dec_prefix_group_1_rep != 2'd0
19
LOOP(`CMDEX_LODS_STEP_0);
20
21
 
22
23
IF(rd_cmd == `CMD_LODS);
24
 
25
    SET(address_esi); // 5 cycle delay
26
 
27
    //waiting for esi in 'address_waiting'
28
 
29
    IF(rd_mutex_busy_memory || (rd_mutex_busy_ecx && rd_prefix_group_1_rep != 2'd0)); SET(rd_waiting); //waiting for ecx for rd_string_ignore
30
    ELSE();
31
 
32
        IF(~(rd_string_ignore));
33
            SET(rd_src_is_memory);
34
 
35
            SET(rd_req_eax);
36
            SET(rd_req_esi);
37
            //not needed -- reset after finish //IF(rd_prefix_group_1_rep != 2'd0); SET(rd_req_ecx); ENDIF();
38
 
39
            SET(read_virtual);
40
 
41
            IF(~(read_for_rd_ready)); SET(rd_waiting); ENDIF();
42
        ENDIF();
43
    ENDIF();
44
ENDIF();
45
46
 
47
48
IF(exe_cmd == `CMD_LODS);
49
    SET(exe_result2, src);
50
ENDIF();
51
52
 
53
54
IF(wr_cmd == `CMD_LODS);
55
 
56
    IF(~(wr_string_ignore));
57
        SAVE(esi, wr_esi_final);
58
        IF(wr_prefix_group_1_rep != 2'd0); SAVE(ecx, wr_ecx_final); ENDIF();
59
 
60
        SAVE(eax, (wr_is_8bit)? { eax[31:8], result2[7:0] } : (wr_operand_16bit)? { eax[31:16], result2[15:0] } : result2);
61
    ENDIF();
62
 
63
    IF(wr_string_ignore || wr_string_finish);
64
        SET(wr_req_reset_micro);
65
        SET(wr_req_reset_rd);
66
        SET(wr_req_reset_exe);
67
    ENDIF();
68
 
69
    IF(~(wr_string_ignore) && ~(wr_string_finish) && wr_prefix_group_1_rep != 2'd0);
70
        SET(wr_not_finished);
71
 
72
        SET(wr_string_in_progress);
73
    ENDIF();
74
ENDIF();
75

powered by: WebSVN 2.1.0

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