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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 350 julius
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  OR1200's IC RAMs                                            ////
4
////                                                              ////
5
////  This file is part of the OpenRISC 1200 project              ////
6
////  http://www.opencores.org/cores/or1k/                        ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Instantiation of Instruction cache data 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_ram.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_ram(
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 483 julius
`ifdef OR1200_RAM_PARITY
67
        // Parity error indicator
68
        p_err,
69
`endif
70
 
71 350 julius
        // Internal i/f
72
        addr, en, we, datain, dataout
73
);
74
 
75
parameter dw = `OR1200_OPERAND_WIDTH;
76
parameter aw = `OR1200_ICINDX;
77
 
78
//
79
// I/O
80
//
81
input                           clk;
82
input                           rst;
83
input   [aw-1:0]         addr;
84
input                           en;
85
input   [3:0]                    we;
86
input   [dw-1:0]         datain;
87
output  [dw-1:0]         dataout;
88
 
89
`ifdef OR1200_BIST
90
//
91
// RAM BIST
92
//
93
input mbist_si_i;
94
input [`OR1200_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;
95
output mbist_so_o;
96
`endif
97
 
98 483 julius
`ifdef OR1200_RAM_PARITY
99
output                          p_err;
100
`endif
101
 
102 350 julius
`ifdef OR1200_NO_IC
103
 
104
//
105
// Insn cache not implemented
106
//
107
assign dataout = {dw{1'b0}};
108
`ifdef OR1200_BIST
109
assign mbist_so_o = mbist_si_i;
110
`endif
111
 
112 483 julius
`ifdef OR1200_RAM_PARITY
113
assign          p_err = 0;
114
`endif
115
 
116 350 julius
`else
117
 
118
//
119
// Instantiation of IC RAM block
120
//
121
   or1200_spram #
122
     (
123 477 julius
      .aw(`OR1200_ICINDX),
124 350 julius
      .dw(32)
125
      )
126
   ic_ram0
127
     (
128
`ifdef OR1200_BIST
129
      // RAM BIST
130
      .mbist_si_i(mbist_si_i),
131
      .mbist_so_o(mbist_so_o),
132
      .mbist_ctrl_i(mbist_ctrl_i),
133
`endif
134 483 julius
`ifdef OR1200_RAM_PARITY
135
      .p_err(p_err),
136
`endif
137
      .rst(rst),
138 350 julius
      .clk(clk),
139
      .ce(en),
140
      .we(we[0]),
141
      //.oe(1'b1),
142
      .addr(addr),
143
      .di(datain),
144
      .doq(dataout)
145
      );
146
`endif
147
 
148
endmodule
149
 

powered by: WebSVN 2.1.0

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