nms_top_16x32.v
6.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
//==================================================================
// NOVeA Memory System
// for 512 (16w x 32b )
//==================================================================
`resetall
`timescale 1 ns / 10 ps
`define ADR_MSB 3 /*Address Bus MSB*/
`define D_MSB 31 /*Data Bus MSB*/
`define NB 32 /*Number of Bits*/
`define PAR_I_MSB 2 /*Parallel Instruction MSB*/
`define NMS_NAME nms_top_16x32 /*NMS Name*/
`define NMS_CTRLR_NAME nvco_nc15gfh_16x32 /*NMS Controller Name*/
`define NOVEA_NAME nvrm_nc15gfh_16x32 /*NOVeA Name*/
`define CHPUMP_NAME nvcp_nc15gfh /*Charge Pump Name*/
`define SC_NAME nms_sc_16x32 /*SuperCell Name*/
// ================ `NMS_NAME (NMS) ===================
module `NMS_NAME(
SYS_CK,
TIME_B,
WRSTN,
WRCK,
WSI,
UpdateWR,
ShiftWR,
SelectWIR,
ADR_p,
D_p,
WE_p,
ME_p,
OE_p,
PAE_p,
PA_p,
RA_p,
WSO,
Q, // NOVeA Outputs
NMS_READY,
NMS_PASS,
KEEP_ON,
OE_NV, // Output for MUX
Q_CR // Config Register Outputs
);
input SYS_CK;
input TIME_B;
input WRSTN;
input WRCK;
input WSI;
input UpdateWR;
input ShiftWR;
input SelectWIR;
input [`ADR_MSB:0] ADR_p;
input [`D_MSB:0] D_p;
input WE_p;
input ME_p;
input OE_p;
input PAE_p;
input [`PAR_I_MSB:0] PA_p;
input RA_p;
output WSO;
output [`D_MSB:0] Q; // NOVeA Outputs
output NMS_READY;
output NMS_PASS;
output KEEP_ON;
output [`D_MSB:0] Q_CR; // Config Register Outputs
output OE_NV; // OutputEnable NOVeA Q Outputs
// ----------- Wires --------------
wire WSO;
wire NMS_READY;
wire NMS_PASS;
wire KEEP_ON;
wire RCREADY;
wire SO_NV;
wire MATCH;
wire UNLOCK;
wire PORST;
wire RST_i;
wire PE;
wire VPPRANGE;
wire [3:0] VPPSEL;
wire UDATA;
wire PCLKE;
wire SI_NV;
wire SME_NV;
wire STORE;
wire COMP;
wire RECALL;
wire MRCL0;
wire MRCL1;
wire TECC0;
wire TECC1;
wire BIAS0;
wire BIAS1;
wire PU1;
wire PU2;
wire VPP;
wire WE_NV;
wire ME_NV;
wire CLK;
wire SCLK_NV;
wire [`ADR_MSB:0] ADR_NV;
wire [`NB-1:0] D_NV;
// ----------- `NMS_CTRLR_NAME (NMS_Controller) Instantiation ----------
`NMS_CTRLR_NAME U_NMSC (
.SYS_CK(SYS_CK),
.TIME_B(TIME_B),
.WRSTN(WRSTN),
.WRCK(WRCK),
.WSI(WSI),
.UpdateWR(UpdateWR),
.ShiftWR(ShiftWR),
.SelectWIR(SelectWIR),
.PAE_p(PAE_p),
.PA_p(PA_p),
.RCREADY(RCREADY),
.SO_NV(SO_NV),
.MATCH(MATCH),
.UNLOCK(UNLOCK),
.PORST(PORST),
.ADR_p(ADR_p),
.D_p(D_p),
.RA_p(RA_p),
.WE_p(WE_p),
.ME_p(ME_p),
.OE_p(OE_p),
.WSO(WSO),
.NMS_READY(NMS_READY),
.NMS_PASS(NMS_PASS),
.KEEP_ON(KEEP_ON),
.RST_i(RST_i),
.PE(PE),
.VPPRANGE(VPPRANGE),
.VPPSEL(VPPSEL),
.UDATA(UDATA),
.PCLKE(PCLKE),
.SI_NV(SI_NV),
.SME_NV(SME_NV),
.STORE(STORE),
.COMP(COMP),
.RECALL(RECALL),
.MRCL0(MRCL0),
.MRCL1(MRCL1),
.TECC0(TECC0),
.TECC1(TECC1),
.BIAS0(BIAS0),
.BIAS1(BIAS1),
.Q(Q_CR), // To Output
.WE_NV(WE_NV),
.OE_NV(OE_NV), // To Output
.ME_NV(ME_NV),
.CLK(CLK),
.SCLK_NV(SCLK_NV),
.ADR_NV(ADR_NV),
.D_NV(D_NV)
);
// ----------- SuperCell Instantiation ----------
`SC_NAME U_SC (
.CLK(CLK),
.RST(RST_i),
.VPPRANGE(VPPRANGE),
.VPPSEL3(VPPSEL[3]),
.VPPSEL2(VPPSEL[2]),
.VPPSEL1(VPPSEL[1]),
.VPPSEL0(VPPSEL[0]),
.PE(PE),
.D(UDATA),
.CLKE(PCLKE),
.STORE(STORE),
.UNLOCK(UNLOCK),
.PORST(PORST),
.ADR3(ADR_NV[3]),
.ADR2(ADR_NV[2]),
.ADR1(ADR_NV[1]),
.ADR0(ADR_NV[0]),
.D31(D_NV[31]),
.D30(D_NV[30]),
.D29(D_NV[29]),
.D28(D_NV[28]),
.D27(D_NV[27]),
.D26(D_NV[26]),
.D25(D_NV[25]),
.D24(D_NV[24]),
.D23(D_NV[23]),
.D22(D_NV[22]),
.D21(D_NV[21]),
.D20(D_NV[20]),
.D19(D_NV[19]),
.D18(D_NV[18]),
.D17(D_NV[17]),
.D16(D_NV[16]),
.D15(D_NV[15]),
.D14(D_NV[14]),
.D13(D_NV[13]),
.D12(D_NV[12]),
.D11(D_NV[11]),
.D10(D_NV[10]),
.D9(D_NV[9]),
.D8(D_NV[8]),
.D7(D_NV[7]),
.D6(D_NV[6]),
.D5(D_NV[5]),
.D4(D_NV[4]),
.D3(D_NV[3]),
.D2(D_NV[2]),
.D1(D_NV[1]),
.D0(D_NV[0]),
.WE(WE_NV),
.ME(ME_NV),
.SI(SI_NV),
.SCLK(SCLK_NV),
.SME(SME_NV),
.COMP(COMP),
.RECALL(RECALL),
.MRCL0(MRCL0),
.MRCL1(MRCL1),
.TECC0(TECC0),
.TECC1(TECC1),
.BIAS0(BIAS0),
.BIAS1(BIAS1),
.Q31(Q[31]),
.Q30(Q[30]),
.Q29(Q[29]),
.Q28(Q[28]),
.Q27(Q[27]),
.Q26(Q[26]),
.Q25(Q[25]),
.Q24(Q[24]),
.Q23(Q[23]),
.Q22(Q[22]),
.Q21(Q[21]),
.Q20(Q[20]),
.Q19(Q[19]),
.Q18(Q[18]),
.Q17(Q[17]),
.Q16(Q[16]),
.Q15(Q[15]),
.Q14(Q[14]),
.Q13(Q[13]),
.Q12(Q[12]),
.Q11(Q[11]),
.Q10(Q[10]),
.Q9(Q[9]),
.Q8(Q[8]),
.Q7(Q[7]),
.Q6(Q[6]),
.Q5(Q[5]),
.Q4(Q[4]),
.Q3(Q[3]),
.Q2(Q[2]),
.Q1(Q[1]),
.Q0(Q[0]),
.SO(SO_NV),
.MATCH(MATCH),
.RCREADY(RCREADY),
// for NEC TestBus ( Normal Mode Setting )
.TEST(1'b0),
.BUNRI(1'b0),
.TBI21(1'b0),
.TBI20(1'b0),
.TBI19(1'b0),
.TBI18(1'b0),
.TBI17(1'b0),
.TBI16(1'b0),
.TBI15(1'b0),
.TBI14(1'b0),
.TBI13(1'b0),
.TBI12(1'b0),
.TBI11(1'b0),
.TBI10(1'b0),
.TBI9(1'b0),
.TBI8(1'b0),
.TBI7(1'b0),
.TBI6(1'b0),
.TBI5(1'b0),
.TBI4(1'b0),
.TBI3(1'b0),
.TBI2(1'b0),
.TBI1(1'b0),
.TBI0(1'b0),
.TBO4(),
.TBO3(),
.TBO2(),
.TBO1(),
.TBO0()
);
endmodule