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

Subversion Repositories or1200_hp

[/] [or1200_hp/] [trunk/] [rtl/] [rtl_cm4/] [verilog/] [or1200_wb_biu.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tobil
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  OR1200's WISHBONE BIU                                       ////
4
////                                                              ////
5
////  This file is part of the OpenRISC 1200 project              ////
6
////  http://www.opencores.org/cores/or1k/                        ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Implements WISHBONE interface                               ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////   - if biu_cyc/stb are deasserted and wb_ack_i is asserted   ////
13
////   and this happens even before aborted_r is asssrted,        ////
14
////   wb_ack_i will be delivered even though transfer is         ////
15
////   internally considered already aborted. However most        ////
16
////   wb_ack_i are externally registered and delayed. Normally   ////
17
////   this shouldn't cause any problems.                         ////
18
////                                                              ////
19
////  Author(s):                                                  ////
20
////      - Damjan Lampret, lampret@opencores.org                 ////
21
////                                                              ////
22
//////////////////////////////////////////////////////////////////////
23
////                                                              ////
24
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
25
////                                                              ////
26
//// This source file may be used and distributed without         ////
27
//// restriction provided that this copyright statement is not    ////
28
//// removed from the file and that any derivative work contains  ////
29
//// the original copyright notice and the associated disclaimer. ////
30
////                                                              ////
31
//// This source file is free software; you can redistribute it   ////
32
//// and/or modify it under the terms of the GNU Lesser General   ////
33
//// Public License as published by the Free Software Foundation; ////
34
//// either version 2.1 of the License, or (at your option) any   ////
35
//// later version.                                               ////
36
////                                                              ////
37
//// This source is distributed in the hope that it will be       ////
38
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
39
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
40
//// PURPOSE.  See the GNU Lesser General Public License for more ////
41
//// details.                                                     ////
42
////                                                              ////
43
//// You should have received a copy of the GNU Lesser General    ////
44
//// Public License along with this source; if not, download it   ////
45
//// from http://www.opencores.org/lgpl.shtml                     ////
46
////                                                              ////
47
//////////////////////////////////////////////////////////////////////
48
//
49
// CVS Revision History
50
//
51
// $Log: not supported by cvs2svn $
52
// Revision 1.6.4.1  2003/07/08 15:36:37  lampret
53
// Added embedded memory QMEM.
54
//
55
// Revision 1.6  2003/04/07 20:57:46  lampret
56
// Fixed OR1200_CLKDIV_x_SUPPORTED defines. Fixed order of ifdefs.
57
//
58
// Revision 1.5  2002/12/08 08:57:56  lampret
59
// Added optional support for WB B3 specification (xwb_cti_o, xwb_bte_o). Made xwb_cab_o optional.
60
//
61
// Revision 1.4  2002/09/16 03:09:16  lampret
62
// Fixed a combinational loop.
63
//
64
// Revision 1.3  2002/08/12 05:31:37  lampret
65
// Added optional retry counter for wb_rty_i. Added graceful termination for aborted transfers.
66
//
67
// Revision 1.2  2002/07/14 22:17:17  lampret
68
// Added simple trace buffer [only for Xilinx Virtex target]. Fixed instruction fetch abort when new exception is recognized.
69
//
70
// Revision 1.1  2002/01/03 08:16:15  lampret
71
// New prefixes for RTL files, prefixed module names. Updated cache controllers and MMUs.
72
//
73
// Revision 1.12  2001/11/22 13:42:51  lampret
74
// Added wb_cyc_o assignment after it was removed by accident.
75
//
76
// Revision 1.11  2001/11/20 21:28:10  lampret
77
// Added optional sampling of inputs.
78
//
79
// Revision 1.10  2001/11/18 11:32:00  lampret
80
// OR1200_REGISTERED_OUTPUTS can now be enabled.
81
//
82
// Revision 1.9  2001/10/21 17:57:16  lampret
83
// Removed params from generic_XX.v. Added translate_off/on in sprs.v and id.v. Removed spr_addr from dc.v and ic.v. Fixed CR+LF.
84
//
85
// Revision 1.8  2001/10/14 13:12:10  lampret
86
// MP3 version.
87
//
88
// Revision 1.1.1.1  2001/10/06 10:18:35  igorm
89
// no message
90
//
91
// Revision 1.3  2001/08/09 13:39:33  lampret
92
// Major clean-up.
93
//
94
// Revision 1.2  2001/07/22 03:31:54  lampret
95
// Fixed RAM's oen bug. Cache bypass under development.
96
//
97
// Revision 1.1  2001/07/20 00:46:23  lampret
98
// Development version of RTL. Libraries are missing.
99
//
100
//
101
 
102
// synopsys translate_off
103
`include "timescale.v"
104
// synopsys translate_on
105
`include "or1200_defines.v"
106
 
107
module or1200_wb_biu_cm4(
108
                clk_i_cml_1,
109
                clk_i_cml_2,
110
                clk_i_cml_3,
111
 
112
        // RISC clock, reset and clock control
113
        clk, rst, clmode,
114
 
115
        // WISHBONE interface
116
        wb_clk_i, wb_rst_i, wb_ack_i, wb_err_i, wb_rty_i, wb_dat_i,
117
        wb_cyc_o, wb_adr_o, wb_stb_o, wb_we_o, wb_sel_o, wb_dat_o,
118
`ifdef OR1200_WB_CAB
119
        wb_cab_o,
120
`endif
121
`ifdef OR1200_WB_B3
122
        wb_cti_o, wb_bte_o,
123
`endif
124
 
125
        // Internal RISC bus
126
        biu_dat_i, biu_adr_i, biu_cyc_i, biu_stb_i, biu_we_i, biu_sel_i, biu_cab_i,
127
        biu_dat_o, biu_ack_o, biu_err_o
128
);
129
 
130
 
131
input clk_i_cml_1;
132
input clk_i_cml_2;
133
input clk_i_cml_3;
134
reg [ 1 : 0 ] clmode_cml_1;
135
reg  wb_ack_i_cml_3;
136
reg  wb_ack_i_cml_2;
137
reg  wb_ack_i_cml_1;
138
reg  wb_err_i_cml_3;
139
reg  wb_err_i_cml_2;
140
reg  wb_err_i_cml_1;
141
reg [ 32 - 1 : 0 ] wb_dat_i_cml_2;
142
reg [ 32 - 1 : 0 ] wb_dat_i_cml_1;
143
reg  wb_cyc_o_cml_3;
144
reg  wb_cyc_o_cml_2;
145
reg  wb_cyc_o_cml_1;
146
reg [ 32 - 1 : 0 ] wb_adr_o_cml_3;
147
reg [ 32 - 1 : 0 ] wb_adr_o_cml_2;
148
reg [ 32 - 1 : 0 ] wb_adr_o_cml_1;
149
reg  wb_stb_o_cml_3;
150
reg  wb_stb_o_cml_2;
151
reg  wb_stb_o_cml_1;
152
reg  wb_we_o_cml_3;
153
reg  wb_we_o_cml_2;
154
reg  wb_we_o_cml_1;
155
reg [ 3 : 0 ] wb_sel_o_cml_3;
156
reg [ 3 : 0 ] wb_sel_o_cml_2;
157
reg [ 3 : 0 ] wb_sel_o_cml_1;
158
reg [ 32 - 1 : 0 ] wb_dat_o_cml_3;
159
reg [ 32 - 1 : 0 ] wb_dat_o_cml_2;
160
reg [ 32 - 1 : 0 ] wb_dat_o_cml_1;
161
reg  wb_cab_o_cml_3;
162
reg  wb_cab_o_cml_2;
163
reg  wb_cab_o_cml_1;
164
reg [ 1 : 0 ] valid_div_cml_3;
165
reg [ 1 : 0 ] valid_div_cml_2;
166
reg [ 1 : 0 ] valid_div_cml_1;
167
reg  aborted_r_cml_3;
168
reg  aborted_r_cml_2;
169
reg  aborted_r_cml_1;
170
 
171
 
172
 
173
parameter dw = `OR1200_OPERAND_WIDTH;
174
parameter aw = `OR1200_OPERAND_WIDTH;
175
 
176
//
177
// RISC clock, reset and clock control
178
//
179
input                   clk;            // RISC clock
180
input                   rst;            // RISC reset
181
input   [1:0]            clmode;         // 00 WB=RISC, 01 WB=RISC/2, 10 N/A, 11 WB=RISC/4
182
 
183
//
184
// WISHBONE interface
185
//
186
input                   wb_clk_i;       // clock input
187
input                   wb_rst_i;       // reset input
188
input                   wb_ack_i;       // normal termination
189
input                   wb_err_i;       // termination w/ error
190
input                   wb_rty_i;       // termination w/ retry
191
input   [dw-1:0] wb_dat_i;       // input data bus
192
output                  wb_cyc_o;       // cycle valid output
193
output  [aw-1:0] wb_adr_o;       // address bus outputs
194
output                  wb_stb_o;       // strobe output
195
output                  wb_we_o;        // indicates write transfer
196
output  [3:0]            wb_sel_o;       // byte select outputs
197
output  [dw-1:0] wb_dat_o;       // output data bus
198
`ifdef OR1200_WB_CAB
199
output                  wb_cab_o;       // consecutive address burst
200
`endif
201
`ifdef OR1200_WB_B3
202
output  [2:0]            wb_cti_o;       // cycle type identifier
203
output  [1:0]            wb_bte_o;       // burst type extension
204
`endif
205
 
206
//
207
// Internal RISC interface
208
//
209
input   [dw-1:0] biu_dat_i;      // input data bus
210
input   [aw-1:0] biu_adr_i;      // address bus
211
input                   biu_cyc_i;      // WB cycle
212
input                   biu_stb_i;      // WB strobe
213
input                   biu_we_i;       // WB write enable
214
input                   biu_cab_i;      // CAB input
215
input   [3:0]            biu_sel_i;      // byte selects
216
output  [31:0]           biu_dat_o;      // output data bus
217
output                  biu_ack_o;      // ack output
218
output                  biu_err_o;      // err output
219
 
220
//
221
// Registers
222
//
223
reg     [1:0]            valid_div;      // Used for synchronization
224
`ifdef OR1200_REGISTERED_OUTPUTS
225
reg     [aw-1:0] wb_adr_o;       // address bus outputs
226
reg                     wb_cyc_o;       // cycle output
227
reg                     wb_stb_o;       // strobe output
228
reg                     wb_we_o;        // indicates write transfer
229
reg     [3:0]            wb_sel_o;       // byte select outputs
230
`ifdef OR1200_WB_CAB
231
reg                     wb_cab_o;       // CAB output
232
`endif
233
`ifdef OR1200_WB_B3
234
reg     [1:0]            burst_len;      // burst counter
235
reg     [2:0]            wb_cti_o;       // cycle type identifier
236
`endif
237
reg     [dw-1:0] wb_dat_o;       // output data bus
238
`endif
239
`ifdef OR1200_REGISTERED_INPUTS
240
reg                     long_ack_o;     // normal termination
241
reg                     long_err_o;     // error termination
242
reg     [dw-1:0] biu_dat_o;      // output data bus
243
`else
244
wire                    long_ack_o;     // normal termination
245
wire                    long_err_o;     // error termination
246
`endif
247
wire                    aborted;        // Graceful abort
248
reg                     aborted_r;      // Graceful abort
249
wire                    retry;          // Retry
250
`ifdef OR1200_WB_RETRY
251
reg     [`OR1200_WB_RETRY-1:0] retry_cntr;       // Retry counter
252
`endif
253
 
254
//
255
// WISHBONE I/F <-> Internal RISC I/F conversion
256
//
257
 
258
//
259
// Address bus
260
//
261
`ifdef OR1200_REGISTERED_OUTPUTS
262
 
263
// SynEDA CoreMultiplier
264
// assignment(s): wb_adr_o
265
// replace(s): wb_ack_i, wb_adr_o, wb_stb_o
266
always @(posedge wb_clk_i or posedge wb_rst_i)
267
        if (wb_rst_i)
268
                wb_adr_o <= #1 {aw{1'b0}};
269
        else begin  wb_adr_o <= wb_adr_o_cml_3; if ((biu_cyc_i & biu_stb_i) & ~wb_ack_i_cml_3 & ~aborted & ~(wb_stb_o_cml_3 & ~wb_ack_i_cml_3))
270
                wb_adr_o <= #1 biu_adr_i; end
271
`else
272
assign wb_adr_o = biu_adr_i;
273
`endif
274
 
275
//
276
// Input data bus
277
//
278
`ifdef OR1200_REGISTERED_INPUTS
279
always @(posedge wb_clk_i or posedge wb_rst_i)
280
        if (wb_rst_i)
281
                biu_dat_o <= #1 32'h0000_0000;
282
        else if (wb_ack_i)
283
                biu_dat_o <= #1 wb_dat_i_cml_2;
284
`else
285
 
286
// SynEDA CoreMultiplier
287
// assignment(s): biu_dat_o
288
// replace(s): wb_dat_i
289
assign biu_dat_o = wb_dat_i_cml_2;
290
`endif
291
 
292
//
293
// Output data bus
294
//
295
`ifdef OR1200_REGISTERED_OUTPUTS
296
 
297
// SynEDA CoreMultiplier
298
// assignment(s): wb_dat_o
299
// replace(s): wb_ack_i, wb_dat_o
300
always @(posedge wb_clk_i or posedge wb_rst_i)
301
        if (wb_rst_i)
302
                wb_dat_o <= #1 {dw{1'b0}};
303
        else begin  wb_dat_o <= wb_dat_o_cml_3; if ((biu_cyc_i & biu_stb_i) & ~wb_ack_i_cml_3 & ~aborted)
304
                wb_dat_o <= #1 biu_dat_i; end
305
`else
306
assign wb_dat_o = biu_dat_i;
307
`endif
308
 
309
//
310
// Valid_div counts RISC clock cycles by modulo 4
311
// and is used to synchronize external WB i/f to
312
// RISC clock
313
//
314
 
315
// SynEDA CoreMultiplier
316
// assignment(s): valid_div
317
// replace(s): valid_div
318
always @(posedge clk or posedge rst)
319
        if (rst)
320
                valid_div <= #1 2'b0;
321
        else begin  valid_div <= valid_div_cml_3;
322
                valid_div <= #1 valid_div_cml_3 + 1'd1; end
323
 
324
//
325
// biu_ack_o is one RISC clock cycle long long_ack_o.
326
// long_ack_o is one, two or four RISC clock cycles long because
327
// WISHBONE can work at 1, 1/2 or 1/4 RISC clock.
328
//
329
assign biu_ack_o = long_ack_o
330
`ifdef OR1200_CLKDIV_2_SUPPORTED
331
                & (valid_div[0] | ~clmode[0])
332
`ifdef OR1200_CLKDIV_4_SUPPORTED
333
                & (valid_div[1] | ~clmode[1])
334
`endif
335
`endif
336
                ;
337
 
338
//
339
// Acknowledgment of the data to the RISC
340
//
341
// long_ack_o
342
//
343
`ifdef OR1200_REGISTERED_INPUTS
344
always @(posedge wb_clk_i or posedge wb_rst_i)
345
        if (wb_rst_i)
346
                long_ack_o <= #1 1'b0;
347
        else
348
                long_ack_o <= #1 wb_ack_i & ~aborted;
349
`else
350
assign long_ack_o = wb_ack_i & ~aborted_r;
351
`endif
352
 
353
//
354
// biu_err_o is one RISC clock cycle long long_err_o.
355
// long_err_o is one, two or four RISC clock cycles long because
356
// WISHBONE can work at 1, 1/2 or 1/4 RISC clock.
357
//
358
 
359
// SynEDA CoreMultiplier
360
// assignment(s): biu_err_o
361
// replace(s): clmode, valid_div
362
assign biu_err_o = long_err_o
363
`ifdef OR1200_CLKDIV_2_SUPPORTED
364
                & (valid_div_cml_1[0] | ~clmode_cml_1[0])
365
`ifdef OR1200_CLKDIV_4_SUPPORTED
366
                & (valid_div_cml_1[1] | ~clmode_cml_1[1])
367
`endif
368
`endif
369
                ;
370
 
371
//
372
// Error termination
373
//
374
// long_err_o
375
//
376
`ifdef OR1200_REGISTERED_INPUTS
377
always @(posedge wb_clk_i or posedge wb_rst_i)
378
        if (wb_rst_i)
379
                long_err_o <= #1 1'b0;
380
        else
381
                long_err_o <= #1 wb_err_i_cml_1 & ~aborted;
382
`else
383
 
384
// SynEDA CoreMultiplier
385
// assignment(s): long_err_o
386
// replace(s): wb_err_i, aborted_r
387
assign long_err_o = wb_err_i_cml_1 & ~aborted_r_cml_1;
388
`endif
389
 
390
//
391
// Retry counter
392
//
393
// Assert 'retry' when 'wb_rty_i' is sampled high and keep it high
394
// until retry counter doesn't expire
395
// 
396
`ifdef OR1200_WB_RETRY
397
assign retry = wb_rty_i | (|retry_cntr);
398
`else
399
assign retry = 1'b0;
400
`endif
401
`ifdef OR1200_WB_RETRY
402
always @(posedge wb_clk_i or posedge wb_rst_i)
403
        if (wb_rst_i)
404
                retry_cntr <= #1 1'b0;
405
        else if (wb_rty_i)
406
                retry_cntr <= #1 {`OR1200_WB_RETRY{1'b1}};
407
        else if (retry_cntr)
408
                retry_cntr <= #1 retry_cntr - 7'd1;
409
`endif
410
 
411
//
412
// Graceful completion of aborted transfers
413
//
414
// Assert 'aborted' when 1) current transfer is in progress (wb_stb_o; which
415
// we know is only asserted together with wb_cyc_o) 2) and in next WB clock cycle
416
// wb_stb_o would be deasserted (biu_cyc_i and biu_stb_i are low) 3) and
417
// there is no termination of current transfer in this WB clock cycle (wb_ack_i
418
// and wb_err_i are low).
419
// 'aborted_r' is registered 'aborted' and extended until this "aborted" transfer
420
// is properly terminated with wb_ack_i/wb_err_i.
421
// 
422
 
423
// SynEDA CoreMultiplier
424
// assignment(s): aborted
425
// replace(s): wb_ack_i, wb_err_i, wb_stb_o
426
assign aborted = wb_stb_o_cml_3 & ~(biu_cyc_i & biu_stb_i) & ~(wb_ack_i_cml_3 | wb_err_i_cml_3);
427
 
428
// SynEDA CoreMultiplier
429
// assignment(s): aborted_r
430
// replace(s): wb_ack_i, wb_err_i, aborted_r
431
always @(posedge wb_clk_i or posedge wb_rst_i)
432
        if (wb_rst_i)
433
                aborted_r <= #1 1'b0;
434
        else begin  aborted_r <= aborted_r_cml_3; if (wb_ack_i_cml_3 | wb_err_i_cml_3)
435
                aborted_r <= #1 1'b0;
436
        else if (aborted)
437
                aborted_r <= #1 1'b1; end
438
 
439
//
440
// WB cyc_o
441
//
442
// Either 1) normal transfer initiated by biu_cyc_i (and biu_cab_i if
443
// bursts are enabled) and possibly suspended by 'retry'
444
// or 2) extended "aborted" transfer
445
//
446
`ifdef OR1200_REGISTERED_OUTPUTS
447
 
448
// SynEDA CoreMultiplier
449
// assignment(s): wb_cyc_o
450
// replace(s): wb_ack_i, wb_cyc_o
451
always @(posedge wb_clk_i or posedge wb_rst_i)
452
        if (wb_rst_i)
453
                wb_cyc_o <= #1 1'b0;
454
        else begin  wb_cyc_o <= wb_cyc_o_cml_3;
455
`ifdef OR1200_NO_BURSTS
456
                wb_cyc_o <= #1 biu_cyc_i & ~wb_ack_i_cml_3 & ~retry | aborted & ~wb_ack_i_cml_3;
457
`else
458
                wb_cyc_o <= #1 biu_cyc_i & ~wb_ack_i_cml_3 & ~retry | biu_cab_i | aborted & ~wb_ack_i_cml_3; end
459
`endif
460
`else
461
`ifdef OR1200_NO_BURSTS
462
assign wb_cyc_o = biu_cyc_i & ~retry;
463
`else
464
assign wb_cyc_o = biu_cyc_i | biu_cab_i & ~retry;
465
`endif
466
`endif
467
 
468
//
469
// WB stb_o
470
//
471
`ifdef OR1200_REGISTERED_OUTPUTS
472
 
473
// SynEDA CoreMultiplier
474
// assignment(s): wb_stb_o
475
// replace(s): wb_ack_i, wb_stb_o
476
always @(posedge wb_clk_i or posedge wb_rst_i)
477
        if (wb_rst_i)
478
                wb_stb_o <= #1 1'b0;
479
        else begin  wb_stb_o <= wb_stb_o_cml_3;
480
                wb_stb_o <= #1 (biu_cyc_i & biu_stb_i) & ~wb_ack_i_cml_3 & ~retry | aborted & ~wb_ack_i_cml_3; end
481
`else
482
assign wb_stb_o = biu_cyc_i & biu_stb_i;
483
`endif
484
 
485
//
486
// WB we_o
487
//
488
`ifdef OR1200_REGISTERED_OUTPUTS
489
 
490
// SynEDA CoreMultiplier
491
// assignment(s): wb_we_o
492
// replace(s): wb_we_o
493
always @(posedge wb_clk_i or posedge wb_rst_i)
494
        if (wb_rst_i)
495
                wb_we_o <= #1 1'b0;
496
        else begin  wb_we_o <= wb_we_o_cml_3;
497
                wb_we_o <= #1 biu_cyc_i & biu_stb_i & biu_we_i | aborted & wb_we_o_cml_3; end
498
`else
499
assign wb_we_o = biu_cyc_i & biu_stb_i & biu_we_i;
500
`endif
501
 
502
//
503
// WB sel_o
504
//
505
`ifdef OR1200_REGISTERED_OUTPUTS
506
 
507
// SynEDA CoreMultiplier
508
// assignment(s): wb_sel_o
509
// replace(s): wb_sel_o
510
always @(posedge wb_clk_i or posedge wb_rst_i)
511
        if (wb_rst_i)
512
                wb_sel_o <= #1 4'b0000;
513
        else begin  wb_sel_o <= wb_sel_o_cml_3;
514
                wb_sel_o <= #1 biu_sel_i; end
515
`else
516
assign wb_sel_o = biu_sel_i;
517
`endif
518
 
519
`ifdef OR1200_WB_CAB
520
//
521
// WB cab_o
522
//
523
`ifdef OR1200_REGISTERED_OUTPUTS
524
 
525
// SynEDA CoreMultiplier
526
// assignment(s): wb_cab_o
527
// replace(s): wb_cab_o
528
always @(posedge wb_clk_i or posedge wb_rst_i)
529
        if (wb_rst_i)
530
                wb_cab_o <= #1 1'b0;
531
        else begin  wb_cab_o <= wb_cab_o_cml_3;
532
                wb_cab_o <= #1 biu_cab_i; end
533
`else
534
assign wb_cab_o = biu_cab_i;
535
`endif
536
`endif
537
 
538
`ifdef OR1200_WB_B3
539
//
540
// Count burst beats
541
//
542
always @(posedge wb_clk_i or posedge wb_rst_i)
543
        if (wb_rst_i)
544
                burst_len <= #1 2'b00;
545
        else if (biu_cab_i && burst_len && wb_ack_i)
546
                burst_len <= #1 burst_len - 1'b1;
547
        else if (~biu_cab_i)
548
                burst_len <= #1 2'b11;
549
 
550
//
551
// WB cti_o
552
//
553
`ifdef OR1200_REGISTERED_OUTPUTS
554
always @(posedge wb_clk_i or posedge wb_rst_i)
555
        if (wb_rst_i)
556
                wb_cti_o <= #1 3'b000;  // classic cycle
557
`ifdef OR1200_NO_BURSTS
558
        else
559
                wb_cti_o <= #1 3'b111;  // end-of-burst
560
`else
561
        else if (biu_cab_i && burst_len[1])
562
                wb_cti_o <= #1 3'b010;  // incrementing burst cycle
563
        else if (biu_cab_i && wb_ack_i)
564
                wb_cti_o <= #1 3'b111;  // end-of-burst
565
`endif  // OR1200_NO_BURSTS
566
`else
567
Unsupported !!!;
568
`endif
569
 
570
//
571
// WB bte_o
572
//
573
assign wb_bte_o = 2'b01;        // 4-beat wrap burst
574
 
575
`endif  // OR1200_WB_B3
576
 
577
 
578
always @ (posedge clk_i_cml_1) begin
579
clmode_cml_1 <= clmode;
580
wb_ack_i_cml_1 <= wb_ack_i;
581
wb_err_i_cml_1 <= wb_err_i;
582
wb_dat_i_cml_1 <= wb_dat_i;
583
wb_cyc_o_cml_1 <= wb_cyc_o;
584
wb_adr_o_cml_1 <= wb_adr_o;
585
wb_stb_o_cml_1 <= wb_stb_o;
586
wb_we_o_cml_1 <= wb_we_o;
587
wb_sel_o_cml_1 <= wb_sel_o;
588
wb_dat_o_cml_1 <= wb_dat_o;
589
wb_cab_o_cml_1 <= wb_cab_o;
590
valid_div_cml_1 <= valid_div;
591
aborted_r_cml_1 <= aborted_r;
592
end
593
always @ (posedge clk_i_cml_2) begin
594
wb_ack_i_cml_2 <= wb_ack_i_cml_1;
595
wb_err_i_cml_2 <= wb_err_i_cml_1;
596
wb_dat_i_cml_2 <= wb_dat_i_cml_1;
597
wb_cyc_o_cml_2 <= wb_cyc_o_cml_1;
598
wb_adr_o_cml_2 <= wb_adr_o_cml_1;
599
wb_stb_o_cml_2 <= wb_stb_o_cml_1;
600
wb_we_o_cml_2 <= wb_we_o_cml_1;
601
wb_sel_o_cml_2 <= wb_sel_o_cml_1;
602
wb_dat_o_cml_2 <= wb_dat_o_cml_1;
603
wb_cab_o_cml_2 <= wb_cab_o_cml_1;
604
valid_div_cml_2 <= valid_div_cml_1;
605
aborted_r_cml_2 <= aborted_r_cml_1;
606
end
607
always @ (posedge clk_i_cml_3) begin
608
wb_ack_i_cml_3 <= wb_ack_i_cml_2;
609
wb_err_i_cml_3 <= wb_err_i_cml_2;
610
wb_cyc_o_cml_3 <= wb_cyc_o_cml_2;
611
wb_adr_o_cml_3 <= wb_adr_o_cml_2;
612
wb_stb_o_cml_3 <= wb_stb_o_cml_2;
613
wb_we_o_cml_3 <= wb_we_o_cml_2;
614
wb_sel_o_cml_3 <= wb_sel_o_cml_2;
615
wb_dat_o_cml_3 <= wb_dat_o_cml_2;
616
wb_cab_o_cml_3 <= wb_cab_o_cml_2;
617
valid_div_cml_3 <= valid_div_cml_2;
618
aborted_r_cml_3 <= aborted_r_cml_2;
619
end
620
endmodule
621
 

powered by: WebSVN 2.1.0

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