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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [beta_2.0/] [rtl/] [Unit_IO.v] - Blame information for rev 230

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 213 diegovalve
`timescale 1ns / 1ps
2
`include "aDefinitions.v"
3
 
4
 
5
 
6
`define TAG_WBS_INSTRUCTION_ADDRESS_TYPE 2'b10
7
`define TAG_WBS_DATA_ADDRESS_TYPE    2'b01
8
/**********************************************************************************
9
Theia, Ray Cast Programable graphic Processing Unit.
10
Copyright (C) 2010  Diego Valverde (diego.valverde.g@gmail.com)
11
 
12
This program is free software; you can redistribute it and/or
13
modify it under the terms of the GNU General Public License
14
as published by the Free Software Foundation; either version 2
15
of the License, or (at your option) any later version.
16
 
17
This program is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
GNU General Public License for more details.
21
 
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
25
 
26
***********************************************************************************/
27
//------------------------------------------------------------------------------
28
module Unit_IO
29
(
30
//WB Input signals
31
input wire                                                               CLK_I,
32
input wire                                                               RST_I,
33
input wire                                  MCU_STB_I,
34
input wire                                  MCU_WE_I,
35
input wire[`WB_WIDTH-1:0]                   MCU_DAT_I,
36
input wire[`WB_WIDTH-1:0]                   MCU_ADR_I,
37
input wire [1:0]                            MCU_TGA_I,
38
output wire                                 MCU_ACK_O,
39
input wire                                  MCU_MST_I,
40
input wire                                  MCU_CYC_I,
41
 
42
//Internal Slave signals
43
output wire[`DATA_ADDRESS_WIDTH-1:0]          oDataWriteAddress,
44
output wire [`DATA_ROW_WIDTH-1:0]                     oDataBus,
45
output wire [`INSTRUCTION_ADDR_WIDTH-1:0]   oInstructionWriteAddress,
46
output wire [`INSTRUCTION_WIDTH-1:0]          oInstructionBus,
47
output wire                                                                                  oDataWriteEnable,
48
output wire                                                                                  oInstructionWriteEnable,
49
 
50
//Output memory
51
input wire [`DATA_ROW_WIDTH-1:0]            iOMEM_WriteAddress,
52
input wire [`DATA_ROW_WIDTH-1:0]            iOMEM_WriteData,
53
input wire                                  iOMEM_WriteEnable,
54
output wire [`WB_WIDTH-1:0]                 OMEM_DAT_O,
55
output wire [`WB_WIDTH-1:0]                 OMEM_ADR_O,
56 230 diegovalve
output wire                                                      OMEM_WE_O,
57
 
58
//TMem
59 213 diegovalve
 
60 230 diegovalve
output wire [`DATA_ROW_WIDTH-1:0] oTMEMReadData,
61
input wire                                                               iTMEMDataRequest,
62
input wire      [`DATA_ROW_WIDTH-1:0] iTMEMReadAddress,
63
output wire                                                      oTMEMDataAvailable,
64
 
65
input wire                  TMEM_ACK_I,
66
input wire [`WB_WIDTH-1:0]  TMEM_DAT_I ,
67
output wire [`WB_WIDTH-1:0] TMEM_ADR_O ,
68
output wire                 TMEM_WE_O,
69
output wire                 TMEM_STB_O,
70
output wire                 TMEM_CYC_O,
71
input wire                  TMEM_GNT_I
72
 
73 213 diegovalve
);
74
 
75
 
76
WishBoneSlaveUnit WBS
77
(
78
//WB Input signals
79
.CLK_I( CLK_I),
80
.RST_I( RST_I ),
81
.STB_I( MCU_STB_I ),
82
.WE_I(  MCU_WE_I  ),
83
.DAT_I( MCU_DAT_I ),
84
.ADR_I( MCU_ADR_I ),
85
.TGA_I( MCU_TGA_I ),
86
.ACK_O( MCU_ACK_O ),
87
.MST_I( MCU_MST_I ),
88
.CYC_I( MCU_CYC_I ),
89
 
90
.oDataWriteAddress(         oDataWriteAddress               ),
91
.oDataBus(                  oDataBus                        ),
92
.oInstructionWriteAddress(  oInstructionWriteAddress        ),
93
.oInstructionBus(           oInstructionBus                 ),
94
.oDataWriteEnable(          oDataWriteEnable                ),
95
.oInstructionWriteEnable(   oInstructionWriteEnable         )
96
 
97
);
98
 
99
 
100
Module_OMemInterface OMI
101
(
102
        .Clock(        CLK_I              ),
103
        .Reset(        RST_I              ),
104
        .iWriteEnable( iOMEM_WriteEnable  ),
105
        .iData(        iOMEM_WriteData    ),
106
        .iAddress(     iOMEM_WriteAddress ),
107
        .ADR_O(        OMEM_ADR_O         ),
108
        .DAT_O(        OMEM_DAT_O         ),
109
        .WE_O(         OMEM_WE_O          )
110
 
111
);
112
 
113
 
114 230 diegovalve
 
115
Module_TMemInterface TMI
116
(
117
        .Clock( CLK_I ),
118
        .Reset( RST_I ),
119
        .iEnable(  iTMEMDataRequest   ),
120
        .iAddress( iTMEMReadAddress   ),
121
        .oData(    oTMEMReadData      ),
122
        .oDone(    oTMEMDataAvailable ),
123
 
124
        .ACK_I( TMEM_ACK_I ),
125
        .GNT_I( TMEM_GNT_I ),
126
        .DAT_I( TMEM_DAT_I ),
127
        .ADR_O( TMEM_ADR_O ),
128
        .WE_O(  TMEM_WE_O  ),
129
        .STB_O( TMEM_STB_O ),
130
        .CYC_O( TMEM_CYC_O )
131
 
132
 
133
);
134 213 diegovalve
 
135
endmodule

powered by: WebSVN 2.1.0

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