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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [rtl/] [verilog/] [or1200/] [or1200_ic_tag.v] - Blame information for rev 476

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

Line No. Rev Author Line
1 350 julius
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  OR1200's IC TAGs                                            ////
4
////                                                              ////
5
////  This file is part of the OpenRISC 1200 project              ////
6
////  http://www.opencores.org/cores/or1k/                        ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Instatiation of instruction 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
// CVS Revision History
45
//
46
// $Log: or1200_ic_tag.v,v $
47
// Revision 2.0  2010/06/30 11:00:00  ORSoC
48
// Minor update: 
49
// Coding style changed.
50
//
51
 
52
// synopsys translate_off
53
`include "timescale.v"
54
// synopsys translate_on
55
`include "or1200_defines.v"
56
 
57
module or1200_ic_tag(
58
        // Clock and reset
59
        clk, rst,
60
 
61
`ifdef OR1200_BIST
62
        // RAM BIST
63
        mbist_si_i, mbist_so_o, mbist_ctrl_i,
64
`endif
65
 
66
        // Internal i/f
67
        addr, en, we, datain, tag_v, tag
68
);
69
 
70
parameter dw = `OR1200_ICTAG_W;
71
parameter aw = `OR1200_ICTAG;
72
 
73
//
74
// I/O
75
//
76
 
77
//
78
// Clock and reset
79
//
80
input                           clk;
81
input                           rst;
82
 
83
`ifdef OR1200_BIST
84
//
85
// RAM BIST
86
//
87
input mbist_si_i;
88
input [`OR1200_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;
89
output mbist_so_o;
90
`endif
91
 
92
//
93
// Internal i/f
94
//
95
input   [aw-1:0]         addr;
96
input                           en;
97
input                           we;
98
input   [dw-1:0]         datain;
99
output                          tag_v;
100
output  [dw-2:0]         tag;
101
 
102
`ifdef OR1200_NO_IC
103
 
104
//
105
// Insn cache not implemented
106
//
107
assign tag = {dw-1{1'b0}};
108
assign tag_v = 1'b0;
109
`ifdef OR1200_BIST
110
assign mbist_so_o = mbist_si_i;
111
`endif
112
 
113
`else
114
 
115
//
116
// Instantiation of TAG RAM block
117
//
118
`ifdef OR1200_IC_1W_512B
119
   or1200_spram #
120
     (
121
      .aw(5),
122
      .dw(24)
123
      )
124
`endif
125
`ifdef OR1200_IC_1W_4KB
126
   or1200_spram #
127
     (
128
      .aw(8),
129
      .dw(21)
130
      )
131
`endif
132
`ifdef OR1200_IC_1W_8KB
133
   or1200_spram #
134
     (
135
      .aw(9),
136
      .dw(20)
137
      )
138
`endif
139 476 julius
`ifdef OR1200_IC_1W_16KB
140
   or1200_spram #
141
     (
142
      .aw(10),
143
      .dw(19)
144
      )
145
`endif
146 350 julius
   ic_tag0
147
     (
148
`ifdef OR1200_BIST
149
      // RAM BIST
150
      .mbist_si_i(mbist_si_i),
151
      .mbist_so_o(mbist_so_o),
152
      .mbist_ctrl_i(mbist_ctrl_i),
153
`endif
154
      .clk(clk),
155
      .ce(en),
156
      .we(we),
157
      //.oe(1'b1),
158
      .addr(addr),
159
      .di(datain),
160
      .doq({tag, tag_v})
161
      );
162
`endif
163
 
164
endmodule

powered by: WebSVN 2.1.0

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