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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1200/] [rtl/] [verilog/] [or1200_dc_tag.v] - Blame information for rev 481

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 10 unneback
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  OR1200's DC TAG RAMs                                        ////
4
////                                                              ////
5
////  This file is part of the OpenRISC 1200 project              ////
6 258 julius
////  http://opencores.org/project,or1k                           ////
7 10 unneback
////                                                              ////
8
////  Description                                                 ////
9
////  Instatiation of data cache tag rams.                        ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////   - make it smaller and faster                               ////
13
////                                                              ////
14
////  Author(s):                                                  ////
15
////      - Damjan Lampret, lampret@opencores.org                 ////
16
////                                                              ////
17
//////////////////////////////////////////////////////////////////////
18
////                                                              ////
19
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
20
////                                                              ////
21
//// This source file may be used and distributed without         ////
22
//// restriction provided that this copyright statement is not    ////
23
//// removed from the file and that any derivative work contains  ////
24
//// the original copyright notice and the associated disclaimer. ////
25
////                                                              ////
26
//// This source file is free software; you can redistribute it   ////
27
//// and/or modify it under the terms of the GNU Lesser General   ////
28
//// Public License as published by the Free Software Foundation; ////
29
//// either version 2.1 of the License, or (at your option) any   ////
30
//// later version.                                               ////
31
////                                                              ////
32
//// This source is distributed in the hope that it will be       ////
33
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
34
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
35
//// PURPOSE.  See the GNU Lesser General Public License for more ////
36
//// details.                                                     ////
37
////                                                              ////
38
//// You should have received a copy of the GNU Lesser General    ////
39
//// Public License along with this source; if not, download it   ////
40
//// from http://www.opencores.org/lgpl.shtml                     ////
41
////                                                              ////
42
//////////////////////////////////////////////////////////////////////
43
//
44 141 marcus.erl
// $Log: or1200_dc_tag.v,v $
45
// Revision 2.0  2010/06/30 11:00:00  ORSoC
46
// Minor update: 
47
// Coding style changed.
48
//
49 10 unneback
 
50
// synopsys translate_off
51
`include "timescale.v"
52
// synopsys translate_on
53
`include "or1200_defines.v"
54
 
55
module or1200_dc_tag(
56
        // Clock and reset
57
        clk, rst,
58
 
59
`ifdef OR1200_BIST
60
        // RAM BIST
61
        mbist_si_i, mbist_so_o, mbist_ctrl_i,
62
`endif
63
 
64
        // Internal i/f
65 258 julius
        addr, en, we, datain, tag_v, tag, dirty
66 10 unneback
);
67
 
68 258 julius
parameter dw = `OR1200_DCTAG_W+1;
69 10 unneback
parameter aw = `OR1200_DCTAG;
70
 
71
//
72
// I/O
73
//
74
input                           clk;
75
input                           rst;
76
input   [aw-1:0]         addr;
77
input                           en;
78
input                           we;
79
input   [dw-1:0]         datain;
80
output                          tag_v;
81 258 julius
output  [dw-3:0]         tag;
82
output                          dirty;
83
 
84 10 unneback
 
85
`ifdef OR1200_BIST
86
//
87
// RAM BIST
88
//
89
input mbist_si_i;
90
input [`OR1200_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;
91
output mbist_so_o;
92
`endif
93
 
94
`ifdef OR1200_NO_DC
95
 
96
//
97
// Data cache not implemented
98
//
99
assign tag = {dw-1{1'b0}};
100
assign tag_v = 1'b0;
101
`ifdef OR1200_BIST
102
assign mbist_so_o = mbist_si_i;
103
`endif
104
 
105
`else
106
 
107
//
108
// Instantiation of TAG RAM block
109
//
110 481 julius
// Data widths are tag width plus one for valid
111 141 marcus.erl
   or1200_spram #
112
     (
113 481 julius
      .aw(`OR1200_DCTAG),
114
      .dw(`OR1200_DCTAG_W + 1)
115 141 marcus.erl
      )
116
   dc_tag0
117
     (
118 10 unneback
`ifdef OR1200_BIST
119 141 marcus.erl
      // RAM BIST
120
      .mbist_si_i(mbist_si_i),
121
      .mbist_so_o(mbist_so_o),
122
      .mbist_ctrl_i(mbist_ctrl_i),
123 10 unneback
`endif
124 141 marcus.erl
      .clk(clk),
125
      .ce(en),
126
      .we(we),
127
      .addr(addr),
128
      .di(datain),
129 258 julius
      .doq({tag, tag_v, dirty})
130 141 marcus.erl
      );
131 10 unneback
`endif
132
 
133 141 marcus.erl
endmodule // or1200_dc_tag

powered by: WebSVN 2.1.0

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