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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [trunk/] [rtl/] [Module_TMemInterface.v] - Blame information for rev 211

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

Line No. Rev Author Line
1 152 diegovalve
`timescale 1ns / 1ps
2
`include "aDefinitions.v"
3
//--------------------------------------------------------------------------
4
module Module_TMemInterface
5
(
6
input wire Clock,
7
input wire Reset,
8
input wire iEnable,
9
input wire [`DATA_ROW_WIDTH-1:0]     iAddress,
10
output wire [`DATA_ROW_WIDTH-1:0]    oData,
11
output wire oDone,
12
 
13
input wire                                                 ACK_I,
14
input wire                    GNT_I,
15
input wire [`WB_WIDTH-1:0 ]      DAT_I,
16
 
17
//WB Output Signals
18
output wire [`WB_WIDTH-1:0 ] ADR_O,
19
output wire                                  WE_O,
20
output wire                                  STB_O,
21
output wire                                  CYC_O
22
 
23
 
24
);
25
 
26
wire [3:0] wCurrentWord;
27
wire wDone;
28
assign oDone = wDone & iEnable;
29
 
30
FFD_POSEDGE_SYNCRONOUS_RESET # ( 1 ) FFD_DONE
31
(
32
        .Clock(Clock),
33
        .Reset(Reset),
34
        .Enable( 1'b1 ),
35
        .D(wCurrentWord[3]),
36
        .Q(wDone)
37
);
38
 
39
 
40
//wire wShiftNow;
41
assign WE_O = 1'b0;     //we only read
42
assign CYC_O = iEnable;
43
 
44
 
45
 
46
wire[2:0] wLatchNow;
47
FFD_POSEDGE_SYNCRONOUS_RESET # ( 3 ) FFD_LATHCNOW
48
(
49
        .Clock(Clock),
50
        .Reset(Reset),
51
        .Enable( 1'b1 ),
52
        .D(wCurrentWord[2:0]),
53
        .Q(wLatchNow)
54
);
55
 
56
 
57
 
58
SHIFTLEFT_POSEDGE #(4) SHL
59
(
60
  .Clock(Clock),
61
  .Enable(iEnable & GNT_I),//wShiftNow),                        
62
  .Reset(Reset | ~iEnable ),
63
  .Initial(4'b1),
64
  .O(wCurrentWord)
65
 
66
);
67
 
68
MUXFULLPARALELL_3SEL_WALKINGONE # ( `WB_WIDTH ) MUX1
69
 (
70
        .Sel( wCurrentWord[2:0] ),
71
        .I3(iAddress[31:0]),
72
        .I2(iAddress[63:32]),
73
        .I1(iAddress[95:64]),
74
        .O1( ADR_O )
75
 );
76
 
77
 
78
 
79
FFD_POSEDGE_SYNCRONOUS_RESET # ( `WIDTH ) FFDX
80
(
81
        .Clock(Clock),
82
        .Reset(Reset),
83
        .Enable( wLatchNow[0] & GNT_I),
84
        .D(DAT_I),
85
        .Q(oData[95:64])
86
);
87
 
88
 
89
FFD_POSEDGE_SYNCRONOUS_RESET # ( `WIDTH ) FFDY
90
(
91
        .Clock(Clock),
92
        .Reset(Reset),
93
        .Enable( wLatchNow[1] & GNT_I),
94
        .D(DAT_I),
95
        .Q(oData[63:32])
96
);
97
 
98
 
99
FFD_POSEDGE_SYNCRONOUS_RESET # ( `WIDTH ) FFDZ
100
(
101
        .Clock(Clock),
102
        .Reset( Reset ),
103
        .Enable( wLatchNow[2] & GNT_I),
104
        .D(DAT_I),
105
        .Q(oData[31:0])
106
);
107
 
108
endmodule
109
//--------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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