-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathCMD_CPUID.txt
61 lines (49 loc) · 1.11 KB
/
CMD_CPUID.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<defines>
`define CMD_CPUID #AUTOGEN_NEXT_CMD
`define CMDEX_CPUID_STEP_LAST 4'd0
</defines>
<decode>
dec_ready_2byte_one && decoder[7:0] == 8'hA2
`CMD_CPUID
SET(dec_cmdex, `CMDEX_CPUID_STEP_LAST);
SET(consume_one);
SET(dec_is_complex);
</decode>
<microcode>
LOOP(`CMDEX_CPUID_STEP_LAST);
</microcode>
<read>
IF(rd_cmd == `CMD_CPUID);
SET(rd_req_eax);
SET(rd_req_ebx);
SET(rd_req_ecx);
SET(rd_req_edx);
IF(rd_mutex_busy_eax); SET(rd_waiting); ENDIF();
ENDIF();
</read>
<write>
IF(wr_cmd == `CMD_CPUID);
IF(eax == 32'd0);
SAVE(eax, 32'd1);
SAVE(ebx, "uneG");
SAVE(edx, "Ieni");
SAVE(ecx, "letn");
ENDIF();
IF(eax == 32'd1);
SAVE(eax, `CPUID_MODEL_FAMILY_STEPPING);
SAVE(ebx, 32'h0);
SAVE(ecx, 32'd0);
SAVE(edx, 32'd0);
ENDIF();
IF(eax > 32'd1);
SAVE(eax, 32'd0);
SAVE(ebx, 32'd0);
SAVE(ecx, 32'd0);
SAVE(edx, 32'd0);
ENDIF();
//reset pipeline
SET(wr_req_reset_micro);
SET(wr_req_reset_rd);
SET(wr_req_reset_exe);
ENDIF();
</write>