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 213

Go to most recent revision | 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
output wire                                                      OMEM_WE_O
57
 
58
);
59
 
60
 
61
WishBoneSlaveUnit WBS
62
(
63
//WB Input signals
64
.CLK_I( CLK_I),
65
.RST_I( RST_I ),
66
.STB_I( MCU_STB_I ),
67
.WE_I(  MCU_WE_I  ),
68
.DAT_I( MCU_DAT_I ),
69
.ADR_I( MCU_ADR_I ),
70
.TGA_I( MCU_TGA_I ),
71
.ACK_O( MCU_ACK_O ),
72
.MST_I( MCU_MST_I ),
73
.CYC_I( MCU_CYC_I ),
74
 
75
.oDataWriteAddress(         oDataWriteAddress               ),
76
.oDataBus(                  oDataBus                        ),
77
.oInstructionWriteAddress(  oInstructionWriteAddress        ),
78
.oInstructionBus(           oInstructionBus                 ),
79
.oDataWriteEnable(          oDataWriteEnable                ),
80
.oInstructionWriteEnable(   oInstructionWriteEnable         )
81
 
82
);
83
 
84
 
85
Module_OMemInterface OMI
86
(
87
        .Clock(        CLK_I              ),
88
        .Reset(        RST_I              ),
89
        .iWriteEnable( iOMEM_WriteEnable  ),
90
        .iData(        iOMEM_WriteData    ),
91
        .iAddress(     iOMEM_WriteAddress ),
92
        .ADR_O(        OMEM_ADR_O         ),
93
        .DAT_O(        OMEM_DAT_O         ),
94
        .WE_O(         OMEM_WE_O          )
95
 
96
);
97
 
98
 
99
 
100
endmodule

powered by: WebSVN 2.1.0

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