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

Subversion Repositories rtf65002

[/] [rtf65002/] [trunk/] [rtl/] [verilog/] [rtf65002_dtagmem.v] - Blame information for rev 30

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

Line No. Rev Author Line
1 30 robfinch
// ============================================================================
2
//        __
3
//   \\__/ o\    (C) 2013  Robert Finch, Stratford
4
//    \  __ /    All rights reserved.
5
//     \/_//     robfinch<remove>@opencores.org
6
//       ||
7
//
8
// This source file is free software: you can redistribute it and/or modify 
9
// it under the terms of the GNU Lesser General Public License as published 
10
// by the Free Software Foundation, either version 3 of the License, or     
11
// (at your option) any later version.                                      
12
//                                                                          
13
// This source file 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, see <http://www.gnu.org/licenses/>.    
20
//                                                                          
21
// ============================================================================
22
//
23
module rtf65002_dtagmem(wclk, wr, wadr, rclk, radr, hit);
24
input wclk;
25
input wr;
26
input [31:0] wadr;
27
input rclk;
28
input [31:0] radr;
29
output hit;
30
 
31
reg [31:0] rradr;
32
wire [31:0] tag;
33
 
34
syncRam512x32_1rw1r u1
35
        (
36
                .wrst(1'b0),
37
                .wclk(wclk),
38
                .wce(wadr[1:0]==2'b11),
39
                .we(wr),
40
                .wadr(wadr[10:2]),
41
                .i(wadr),
42
                .wo(),
43
                .rrst(1'b0),
44
                .rclk(rclk),
45
                .rce(1'b1),
46
                .radr(radr[10:2]),
47
                .o(tag)
48
        );
49
 
50
 
51
always @(posedge rclk)
52
        rradr <= radr;
53
 
54
assign hit = tag[31:11]==rradr[31:11];
55
 
56
endmodule

powered by: WebSVN 2.1.0

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