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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [new_alu/] [src/] [Module_Sqrt_Station.v] - Blame information for rev 217

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

Line No. Rev Author Line
1 209 diegovalve
`include "aDefinitions.v"
2
 
3
 
4
/**********************************************************************************
5
Theia, Ray Cast Programable graphic Processing Unit.
6
Copyright (C) 2012  Diego Valverde (diego.valverde.g@gmail.com)
7
 
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
 
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21
 
22
***********************************************************************************/
23
 
24
 
25
module SQRT_STATION
26
(
27
   input wire Clock,
28
   input wire Reset,
29
   input wire [`MOD_ISSUE_PACKET_SIZE-1:0]                   iIssueBus,
30
   input wire [`MOD_COMMIT_PACKET_SIZE-1:0]                  iCommitBus,
31
        input wire [3:0]                                          iId,
32
        output wire [`COMMIT_PACKET_SIZE-1:0]                     oCommitData,
33
        output wire                                               oCommitResquest,
34
        input wire                                                iCommitGranted,
35
        output wire                                               oBusy
36
 
37
);
38
 
39
wire                           wExeDone;
40
wire [2:0]                     wExeDoneTmp;
41
wire                           wRS1_2_ADD_Trigger;
42
wire [`DATA_ROW_WIDTH-1:0]     wRS1_OperandA;
43
wire [`DATA_ROW_WIDTH-1:0]     wRS1_OperandB;
44
wire [`WIDTH-1:0]              wResult;
45
 
46
ReservationStation_1Cycle RS
47
(
48
        .Clock(              Clock                           ),
49
        .Reset(              Reset                           ),
50
        .iIssueBus(          iIssueBus                       ),
51
        .iCommitBus(         iCommitBus                      ),
52
        .iMyId(              iId                             ),
53
        .iExecutionDone(     wExeDone                        ),
54
        .iResult(           {wResult,wResult,wResult}        ),
55
        .iCommitGranted(     iCommitGranted                  ),
56
 
57
        .oSource1(          wRS1_OperandA                   ),
58
        .oSource0(          wRS1_OperandB                   ),
59
        .oBusy(              oBusy                           ),
60
        .oTrigger(           wRS1_2_ADD_Trigger              ),
61
        .oCommitRequest(     oCommitResquest                 ),
62
        .oId(              oCommitData[`COMMIT_RSID_RNG]                                ),
63
        .oWE(              oCommitData[`COMMIT_WE_RNG]                                  ),
64
        .oDestination(     oCommitData[`COMMIT_DST_RNG]                               ),
65
        .oResult(          {oCommitData[`X_RNG],oCommitData[`Y_RNG],oCommitData[`Z_RNG]})
66
 
67
);
68
 
69
 
70
 
71
 
72
FixedPointSquareRoot SQRT
73
(
74
        .Clock(     Clock                   ),
75
        .Reset(     Reset                   ),
76
        .Operand(   wRS1_OperandA[`X_RNG]   ),
77
        .iInputReady( wRS1_2_ADD_Trigger    ),
78
        .OutputReady(wExeDone               ),
79
        .Result(    wResult         )
80
);
81
 
82
 
83
endmodule

powered by: WebSVN 2.1.0

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