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

Subversion Repositories ao486

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_AAD     #AUTOGEN_NEXT_CMD
4
`define CMD_AAM     #AUTOGEN_NEXT_CMD
5
6
 
7
8
dec_ready_one_one && decoder[7:0] == 8'hD5
9
`CMD_AAD
10
SET(dec_is_8bit);
11
SET(consume_one_one);
12
13
 
14
15
dec_ready_one_one && decoder[7:0] == 8'hD4
16
`CMD_AAM
17
SET(dec_is_8bit);
18
SET(consume_one_one);
19
20
 
21
22
IF(rd_cmd == `CMD_AAM || rd_cmd == `CMD_AAD);
23
 
24
    SET(rd_src_is_imm);
25
    SET(rd_dst_is_eax);
26
 
27
    SET(rd_req_eflags);
28
    SET(rd_req_eax);
29
 
30
    IF(rd_mutex_busy_eax); SET(rd_waiting); ENDIF();
31
ENDIF();
32
33
 
34
35
wire [7:0] e_aad_result;
36
 
37
assign e_aad_result = mult_result[7:0] + dst[7:0];
38
39
 
40
41
IF(exe_cmd == `CMD_AAD);
42
 
43
    SET(exe_result,  { 24'd0, e_aad_result });
44
    SET(exe_result2, mult_result[63:32]);
45
 
46
    IF(mult_busy); SET(exe_waiting); ENDIF();
47
ENDIF();
48
49
 
50
51
IF(exe_cmd == `CMD_AAM);
52
 
53
    SET(exe_result,  { 16'd0, div_result_quotient[7:0], div_result_remainder[7:0] });
54
    SET(exe_result2, div_result_remainder);
55
 
56
    IF(exe_div_exception || div_busy); SET(exe_waiting); ENDIF();
57
ENDIF();
58
59
 
60
61
IF(wr_cmd == `CMD_AAM || wr_cmd == `CMD_AAD);
62
    SAVE(eax, { eax[31:16], result[15:0] });
63
 
64
    SAVE(zflag, zflag_result);
65
    SAVE(sflag, sflag_result);
66
    SAVE(pflag, pflag_result);
67
 
68
    SAVE(aflag, aflag_arith);
69
    SAVE(cflag, cflag_arith);
70
    SAVE(oflag, oflag_arith);
71
ENDIF();
72

powered by: WebSVN 2.1.0

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