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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [beta_2.0/] [rtl/] [Module_OMemInterface.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 230 diegovalve
/**********************************************************************************
4
Theia, Ray Cast Programable graphic Processing Unit.
5
Copyright (C) 2010  Diego Valverde (diego.valverde.g@gmail.com)
6 213 diegovalve
 
7 230 diegovalve
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 213 diegovalve
module Module_OMemInterface
24
(
25
        input wire Clock,
26
        input wire Reset,
27
        input wire                  iWriteEnable,
28
        input wire [`DATA_ROW_WIDTH-1:0]     iData,
29
        input wire [`DATA_ROW_WIDTH-1:0]     iAddress,
30
        output wire [`WB_WIDTH-1:0] ADR_O,
31
        output wire[`WB_WIDTH-1:0]  DAT_O,
32
        output wire                                         WE_O
33
 
34
);
35
wire [2:0] wCurrentWord;
36
assign WE_O = iWriteEnable;
37 230 diegovalve
 
38
CIRCULAR_SHIFTLEFT_POSEDGE #(3) SHL
39
(
40
  .Clock(Clock),
41
  .Enable(iWriteEnable),
42
  .Reset(Reset),
43
  .Initial(3'b1),
44
  .O(wCurrentWord)
45
 
46 213 diegovalve
);
47
 
48 230 diegovalve
MUXFULLPARALELL_3SEL_WALKINGONE # ( `WB_WIDTH ) MUX1
49
 (
50
        .Sel( wCurrentWord ),
51 213 diegovalve
        .I3(iAddress[31:0]),
52
        .I2(iAddress[63:32]),
53 230 diegovalve
        .I1(iAddress[95:64]),
54
        .O1( ADR_O )
55 213 diegovalve
 );
56
 
57 230 diegovalve
 MUXFULLPARALELL_3SEL_WALKINGONE # ( `WB_WIDTH ) MUX2
58
 (
59
        .Sel( wCurrentWord ),
60 213 diegovalve
        .I3(iData[31:0]),
61
        .I2(iData[63:32]),
62 230 diegovalve
        .I1(iData[95:64]),
63
        .O1( DAT_O )
64 213 diegovalve
 );
65
 
66
endmodule

powered by: WebSVN 2.1.0

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