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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [beta_2.0/] [rtl/] [ControlCodeDumper.v] - Blame information for rev 213

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

Line No. Rev Author Line
1 213 diegovalve
`include "aDefinitions.v"
2
 
3
/**********************************************************************************
4
Theia, Ray Cast Programable graphic Processing Unit.
5
Copyright (C) 2012  Diego Valverde (diego.valverde.g@gmail.com)
6
 
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License
9
as published by the Free Software Foundation; either version 2
10
of the License, or (at your option) any later version.
11
 
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
GNU General Public License for more details.
16
 
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
 
21
***********************************************************************************/
22
 
23
module ContolCode_Dumper;
24
//wait( `CP_TOP.Reset == 0 );
25
always @ ( posedge `CP_TOP.Clock )
26
begin
27
 
28
                case (`CP_TOP.wOperation)
29
                //-------------------------------------
30
                `CONTROL_PROCESSOR_OP_COPYBLOCK:
31
                begin
32
                        $write("\n%dns CP:    COPYBLOCK DSTID: %d    BLKLEN: %d  TAG: %d  DSTOFF: %h    SRCOFF: %h\n\n",$time,
33
                        `CP_TOP.oCopyBlockCommand[`MCU_COPYMEMBLOCKCMD_VPMASK_RNG],
34
                        `CP_TOP.oCopyBlockCommand[`MCU_COPYMEMBLOCKCMD_BLKLEN_RNG],
35
                        `CP_TOP.oCopyBlockCommand[`MCU_COPYMEMBLOCK_TAG_BIT],
36
                        `CP_TOP.oCopyBlockCommand[`MCU_COPYMEMBLOCKCMD_DSTOFF_RNG],
37
                        `CP_TOP.oCopyBlockCommand[`MCU_COPYMEMBLOCKCMD_SRCOFF_RNG]);
38
                end
39
                //-------------------------------------
40
                `CONTROL_PROCESSOR_OP_DELIVER_COMMAND:
41
                begin
42
                        $write("%dns CP: DELIVER_COMMAND VP[%d] ",$time,
43
                        `CP_TOP.wDestination);
44
 
45
                        case (`CP_TOP.wSourceAddr1)
46
                                `VP_COMMAND_START_MAIN_THREAD: $write( " START_MAIN_THREAD ");
47
                                `VP_COMMAND_STOP_MAIN_THREAD: $write( " STOP_MAIN_THREAD ");
48
                        endcase
49
                end
50
                //-------------------------------------
51
                `CONTROL_PROCESSOR_OP_NOP:
52
                begin
53
                        $write("%dns CP: NOP\n",$time);
54
                end
55
                //-------------------------------------
56
                `CONTROL_PROCESSOR_OP_EXIT:
57
                begin
58
                        $write("%dns CP: EXIT\n",$time);
59
                        //$stop;
60
                end
61
                //-------------------------------------
62
                `CONTROL_PROCESSOR_OP_ADD:
63
                begin
64
 
65
                if (`CP_TOP.rWriteEnable)
66
                        $write("%dns CP: ADD R[%d] R[%d]{%h} R[%d]{%h} = %h\n",$time,`CP_TOP.wDestination,`CP_TOP.wSourceAddr1,`CP_TOP.wSourceData1,`CP_TOP.wSourceAddr0,`CP_TOP.wSourceData0,`CP_TOP.rResult);
67
                end
68
                //-------------------------------------
69
                `CONTROL_PROCESSOR_OP_SUB:
70
                begin
71
                        $write("%dns CP: SUB R[%d] R[%d]{%h} R[%d]{%h} = %h\n",$time,`CP_TOP.wDestination,`CP_TOP.wSourceAddr1,`CP_TOP.wSourceData1,`CP_TOP.wSourceAddr0,`CP_TOP.wSourceData0,`CP_TOP.rResult);
72
                end
73
                //-------------------------------------
74
                `CONTROL_PROCESSOR_OP_AND:
75
                begin
76
                        $write("%dns CP: AND R[%d] R[%d]{%h} R[%d]{%h} = %h\n",$time,`CP_TOP.wDestination,`CP_TOP.wSourceAddr1,`CP_TOP.wSourceData1,`CP_TOP.wSourceAddr0,`CP_TOP.wSourceData0,`CP_TOP.rResult);
77
                end
78
                //-------------------------------------
79
                `CONTROL_PROCESSOR_OP_OR:
80
                begin
81
                $write("%dns CP: OR R[%d] R[%d]{%h} R[%d]{%h} = %h\n",$time,`CP_TOP.wDestination,`CP_TOP.wSourceAddr1,`CP_TOP.wSourceData1,`CP_TOP.wSourceAddr0,`CP_TOP.wSourceData0,`CP_TOP.rResult);
82
                end
83
                //-------------------------------------
84
                `CONTROL_PROCESSOR_OP_SHL:
85
                begin
86
                $write("%dns CP: SHL R[%d] R[%d]{%h} R[%d]{%h} = %h\n",$time,`CP_TOP.wDestination,`CP_TOP.wSourceAddr1,`CP_TOP.wSourceData1,`CP_TOP.wSourceAddr0,`CP_TOP.wSourceData0,`CP_TOP.rResult);
87
                end
88
                //-------------------------------------
89
                `CONTROL_PROCESSOR_OP_SHR:
90
                begin
91
                $write("%dns CP: SHR R[%d] R[%d]{%h} R[%d]{%h} = %h\n",$time,`CP_TOP.wDestination,`CP_TOP.wSourceAddr1,`CP_TOP.wSourceData1,`CP_TOP.wSourceAddr0,`CP_TOP.wSourceData0,`CP_TOP.rResult);
92
                end
93
                //-------------------------------------
94
                `CONTROL_PROCESSOR_OP_BLE:
95
                begin
96
                        $write("%dns CP: BLE\n",$time);
97
 
98
                end
99
                //-------------------------------------
100
                `CONTROL_PROCESSOR_OP_BL:
101
                begin
102
                        $write("%dns CP: BL\n",$time);
103
 
104
                end
105
                //-------------------------------------
106
                `CONTROL_PROCESSOR_OP_BG:
107
                begin
108
                        $write("%dns CP: BG\n",$time);
109
 
110
                end
111
                //-------------------------------------
112
                `CONTROL_PROCESSOR_OP_BGE:
113
                begin
114
                        $write("%dns CP: BGE\n",$time);
115
                end
116
                //-------------------------------------
117
                `CONTROL_PROCESSOR_OP_BEQ:
118
                begin
119
                        $write("%dns CP: BEQ %d,   R[%d] {%h} R[%d] {%h}\n",$time,`CP_TOP.wDestination,`CP_TOP.wSourceAddr1,`CP_TOP.wSourceData1,`CP_TOP.wSourceAddr0,`CP_TOP.wSourceData0);
120
 
121
                end
122
                //-------------------------------------
123
                `CONTROL_PROCESSOR_OP_BNE:
124
                begin
125
                        $write("%dns CP: BNE\n",$time);
126
 
127
                end
128
                //------------------------------------- 
129
                `CONTROL_PROCESSOR_OP_BRANCH:
130
                begin
131
                        $write("%dns CP: BRANCH %h\n",$time,`CP_TOP.wDestination );
132
                end
133
                //-------------------------------------
134
                `CONTROL_PROCESSOR_ASSIGN:
135
                begin
136
                        $write("%dns CP: ASSIGN R[%d] I(%h)= %h\n",$time,`CP_TOP.wDestination,`CP_TOP.wImmediateValue,`CP_TOP.rResult);
137
 
138
                end
139
                //-------------------------------------
140
                default:
141
                begin
142
 
143
                end
144
                //-------------------------------------         
145
                endcase
146
 
147
 
148
end
149
endmodule
150
 

powered by: WebSVN 2.1.0

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