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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [verilog/] [smii_phy.v] - Blame information for rev 502

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

Line No. Rev Author Line
1 44 julius
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  SMII Receiver/Decoder (usually at PHY end)                  ////
4
////                                                              ////
5
////  Description                                                 ////
6
////  Low pin count serial MII ethernet interface                 ////
7
////                                                              ////
8
////  To Do:                                                      ////
9
////   -                                                          ////
10
////                                                              ////
11
////  Author(s):                                                  ////
12
////      - Michael Unneback, unneback@opencores.org              ////
13
////        ORSoC AB          michael.unneback@orsoc.se           ////
14
////      - Julius Baxter, jb@orsoc.se                            ////
15
////                                                              ////
16
//////////////////////////////////////////////////////////////////////
17
////                                                              ////
18
//// Copyright (C) 2009 Authors and OPENCORES.ORG                 ////
19
////                                                              ////
20
//// This source file may be used and distributed without         ////
21
//// restriction provided that this copyright statement is not    ////
22
//// removed from the file and that any derivative work contains  ////
23
//// the original copyright notice and the associated disclaimer. ////
24
////                                                              ////
25
//// This source file is free software; you can redistribute it   ////
26
//// and/or modify it under the terms of the GNU Lesser General   ////
27
//// Public License as published by the Free Software Foundation; ////
28
//// either version 2.1 of the License, or (at your option) any   ////
29
//// later version.                                               ////
30
////                                                              ////
31
//// This source is distributed in the hope that it will be       ////
32
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
33
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
34
//// PURPOSE.  See the GNU Lesser General Public License for more ////
35
//// details.                                                     ////
36
////                                                              ////
37
//// You should have received a copy of the GNU Lesser General    ////
38
//// Public License along with this source; if not, download it   ////
39
//// from http://www.opencores.org/lgpl.shtml                     ////
40
////                                                              ////
41
//////////////////////////////////////////////////////////////////////
42
module smii_phy
43
  (
44
   // SMII
45
    input     smii_tx,
46
    input     smii_sync,
47 49 julius
    output reg    smii_rx,
48 44 julius
 
49
   // MII
50
   // TX
51
   /* ALL I/Os swapped compared to SMII on MAC end MAC - jb */
52
    output reg [3:0] ethphy_mii_tx_d,
53
    output reg       ethphy_mii_tx_en,
54
    output reg       ethphy_mii_tx_err,
55
    input            ethphy_mii_tx_clk,
56
   // RX
57
    input [3:0]      ethphy_mii_rx_d,
58
    input            ethphy_mii_rx_dv,
59
    input            ethphy_mii_rx_err,
60
    input            ethphy_mii_rx_clk,
61
    input            ethphy_mii_mcoll,
62
    input            ethphy_mii_crs,
63
 
64
    input            fast_ethernet,
65
    input            duplex,
66
    input            link,
67
 
68
   // internal
69
    //input [10:1] state,
70
   // clock and reset
71
    input        clk, /* Global reference clock for both SMII modules */
72
    input        rst_n
73
   );
74
 
75
   reg [3:0]      rx_tmp;
76
 
77
   reg           jabber = 0;
78
 
79
   reg           mtx_clk_tmp, mrx_clk_tmp;
80
 
81
   reg [3:0]      tx_cnt;
82
   reg [3:0]      rx_cnt;
83
 
84
 
85
/**************************************************************************/
86
/* Counters */
87
/**************************************************************************/
88
 
89
   /* Generate the state counter, based on incoming sync signal */
90
   /* 10-bit shift register, indicating where we are */
91
   reg [10:1]    state_shiftreg;
92 49 julius
 
93
   /* A wire hooked up from bit 0 with the last byte of the state counter/shiftreg */
94
   wire [7:0] state_shiftreg_top_byte;
95
   assign state_shiftreg_top_byte[7:0] = state_shiftreg[10:3];
96 44 julius
 
97
   always @(posedge clk)
98
     begin
99 403 julius
        if (smii_sync) /* sync signal from MAC */
100
          state_shiftreg <= 10'b0000000010;
101
        else if (state_shiftreg[10])
102
          state_shiftreg <= 10'b0000000001;
103 44 julius
        else
104 403 julius
          state_shiftreg[10:2] <= state_shiftreg[9:1];
105
     end
106
 
107 44 julius
   /* counter from 0 to 9, counting the 10-bit segments we'll transmit
108
    via SMII*/
109
   reg [3:0] segment_ctr;
110
 
111
   always @(posedge clk)
112
     begin
113
        if(!rst_n)
114
          segment_ctr <= 4'h0;
115
        else
116
          begin
117
             if(fast_ethernet) /* If using 100Mbs, then each segment is
118
                            different, we don't count the repeats */
119
               segment_ctr <= 4'h0;
120
             else if (state_shiftreg[10])
121
               if (segment_ctr == 4'h9) /* Wrap */
122
                 segment_ctr <= 4'h0;
123
               else /* Increment */
124
                 segment_ctr <= segment_ctr + 1'b1;
125
          end
126 49 julius
     end // always @ (posedge clk)
127
 
128
 
129 44 julius
/**************************************************************************/
130
/* RX path logic PHY->(MII->SMII)->MAC */
131
/**************************************************************************/
132
 
133 49 julius
   reg [7:0] rx_data_byte_rx_clk;
134 44 julius
 
135 49 julius
   reg [4:0] rx_dv_nib_0;
136
   reg       rx_nib_first,rx_nib_first_r;  // if high, nib_0 contains the "first" of the pair of nibs
137
   reg [3:0] rx_segment_begin_num;
138
 
139
   // Allow us to check if RX DV has been low for a while
140
   reg [3:0] rx_dv_long_low_sr;
141 403 julius
   wire      dv_long_low;
142 49 julius
   always @(posedge ethphy_mii_rx_clk)
143
     rx_dv_long_low_sr[3:0] <= {rx_dv_long_low_sr[2:0], ethphy_mii_rx_dv};
144 403 julius
   assign rx_dv_long_low = ~(|rx_dv_long_low_sr);
145
   wire [9:0] rx_fifo_out;
146 49 julius
   wire       rx_fifo_empty,rx_fifo_almost_empty;
147
 
148 44 julius
   always @(posedge ethphy_mii_rx_clk or negedge rst_n)
149
     begin
150
        if(!rst_n)
151
          begin
152 49 julius
             rx_dv_nib_0 <= 0;
153
             rx_nib_first <= 0;
154
             rx_nib_first_r <= 0;
155 44 julius
          end
156
        else
157
          begin
158 49 julius
             if (!rx_nib_first)
159
               rx_dv_nib_0 <= {ethphy_mii_rx_dv,ethphy_mii_rx_d};
160
             if(ethphy_mii_rx_dv)
161
               rx_nib_first <= ~rx_nib_first;
162 44 julius
 
163 49 julius
             rx_nib_first_r <= rx_nib_first;
164
 
165
          end
166
     end // always @ (posedge ethphy_mii_rx_clk or negedge rst_n)
167 44 julius
 
168 403 julius
   wire rx_fifo_pop;
169
 
170
 
171
   reg ethphy_mii_rx_dv_r;
172
   wire ethphy_mii_rx_dv_re;
173
   wire ethphy_mii_rx_dv_fe;
174
 
175
   always @(posedge ethphy_mii_rx_clk)
176
        ethphy_mii_rx_dv_r <= ethphy_mii_rx_dv;
177 44 julius
 
178 403 julius
   assign ethphy_mii_rx_dv_re = ethphy_mii_rx_dv & !ethphy_mii_rx_dv_r;
179
   assign ethphy_mii_rx_dv_fe = !ethphy_mii_rx_dv & ethphy_mii_rx_dv_r;
180 44 julius
 
181 403 julius
   reg  rx_fifo_final_pop;
182
 
183 44 julius
   always @(posedge clk)
184 403 julius
     if (!rst_n)
185
       rx_fifo_final_pop <= 0;
186
     else if (rx_fifo_final_pop & state_shiftreg[1] &
187
              (((rx_segment_begin_num == segment_ctr) & !fast_ethernet) | fast_ethernet))
188
       rx_fifo_final_pop <= 0;
189
     else if (rx_fifo_pop & rx_fifo_empty)
190
       rx_fifo_final_pop <= 1;
191
 
192
   always @(posedge ethphy_mii_rx_clk)
193
        if (ethphy_mii_rx_dv_re)
194
          rx_segment_begin_num <= segment_ctr;
195 49 julius
 
196 403 julius
   reg do_fifo_pop;
197
   always @(posedge clk)
198
     if (!rst_n)
199
       do_fifo_pop <= 0;
200
     else if (rx_fifo_empty)
201
       do_fifo_pop <= 0;
202
     else if (!rx_fifo_almost_empty)
203
       do_fifo_pop <= 1;
204 44 julius
 
205 403 julius
   assign rx_fifo_pop = (state_shiftreg[9] & do_fifo_pop) &
206
                        (((rx_segment_begin_num == segment_ctr) & !fast_ethernet)
207
                         | fast_ethernet);
208 49 julius
 
209 403 julius
   reg rx_dv_r;
210
   wire rx_dv;
211
 
212
   // Error where rx_dv goes high one cycle too late, so is low for very first data frame - FIXME!
213
   //reg rx_dv;
214
   always @(posedge clk)
215
     if (!rst_n)
216
       rx_dv_r <= 0;
217
     else if (rx_fifo_final_pop & state_shiftreg[1] &
218
              (((rx_segment_begin_num == segment_ctr) & !fast_ethernet) | fast_ethernet))
219
       rx_dv_r <= 0;
220
     else if (rx_fifo_pop)
221
       rx_dv_r <= rx_fifo_out[9];
222
 
223
   assign rx_dv = rx_dv_r | rx_fifo_pop;
224
 
225
 
226
   reg sending_segment;
227
   always @(posedge clk)
228
     if (!rst_n)
229
       sending_segment <= 0;
230
     else if (rx_fifo_final_pop & state_shiftreg[1] & (((rx_segment_begin_num == segment_ctr) & !fast_ethernet) | fast_ethernet))
231
       sending_segment <= 0;
232
     else if ((state_shiftreg[9] & do_fifo_pop) & (((rx_segment_begin_num == segment_ctr) & !fast_ethernet) | fast_ethernet))
233
       sending_segment <= !rx_fifo_empty;
234
 
235 49 julius
     /* A fifo, storing RX bytes coming from the PHY interface */
236 403 julius
   generic_fifo #(10, 1024, 10) rx_fifo
237 49 julius
     (
238
      // Outputs
239
      .psh_full                         (),
240
      .pop_q                            (rx_fifo_out),
241
      .pop_empty                        (rx_fifo_empty),
242
      .almost_empty                     (rx_fifo_almost_empty),
243
      // Inputs
244
      .async_rst_n                      (rst_n),
245
      .psh_clk                          (ethphy_mii_rx_clk),
246
      .psh_we                           (rx_nib_first_r),
247 403 julius
      .psh_d                            ({ethphy_mii_rx_dv,ethphy_mii_rx_err,ethphy_mii_rx_d,rx_dv_nib_0[3:0]}),
248 49 julius
      .pop_clk                          (clk),
249 403 julius
      .pop_re                           (rx_fifo_pop)
250
      );
251 49 julius
 
252 403 julius
   reg [9:0] smii_rx_frame_next;
253 49 julius
   always @(posedge clk)
254 403 julius
     if (state_shiftreg[10])
255
       smii_rx_frame_next <= rx_dv ? {rx_fifo_out[7:0],1'b1,ethphy_mii_crs} :
256
                             {3'b101,jabber,link,duplex,fast_ethernet,
257
                              ethphy_mii_rx_err,1'b0,ethphy_mii_crs};
258 49 julius
 
259
   always @(posedge clk)
260 403 julius
     smii_rx <= state_shiftreg[10] &  smii_rx_frame_next[0] |
261
                state_shiftreg[1] &  smii_rx_frame_next[1] |
262
                state_shiftreg[2] &  smii_rx_frame_next[2] |
263
                state_shiftreg[3] &  smii_rx_frame_next[3] |
264
                state_shiftreg[4] &  smii_rx_frame_next[4] |
265
                state_shiftreg[5] &  smii_rx_frame_next[5] |
266
                state_shiftreg[6] &  smii_rx_frame_next[6] |
267
                state_shiftreg[7] &  smii_rx_frame_next[7] |
268
                state_shiftreg[8] &  smii_rx_frame_next[8] |
269
                state_shiftreg[9] &  smii_rx_frame_next[9];
270 49 julius
 
271 403 julius
 
272
 
273
   reg [79:0] rx_statename;
274
  always @* begin
275
    case (1)
276
      state_shiftreg[1]   :
277
        rx_statename = "CRS";
278
      state_shiftreg[2] :
279
        rx_statename = "RX_DV";
280
      state_shiftreg[3]:
281
        rx_statename = "RXD0/RXERR";
282
      state_shiftreg[4]:
283
        rx_statename = "RXD1/Fast";
284
      state_shiftreg[5]:
285
        rx_statename = "RXD2/Dupl";
286
      state_shiftreg[6]:
287
        rx_statename = "RXD3/Link";
288
      state_shiftreg[7]:
289
        rx_statename = "RXD4/Jabb";
290
      state_shiftreg[8]:
291
        rx_statename = "RXD5/UNV";
292
      state_shiftreg[9]:
293
        rx_statename = "RXD6/FCD";
294
      state_shiftreg[10] :
295
        rx_statename = "RXD7/AS1";
296
      default:
297
        rx_statename = "XXXXXXX";
298
    endcase // case (1)
299
  end // always @ *
300
 
301
 
302 49 julius
 
303 44 julius
   /* Status seq.: CRS, DV, ER, Speed, Duplex, Link, Jabber, UPV, FCD, 1 */
304 49 julius
   //    {1'b1,1'b0,1'b1,jabber,link,duplex,,ethphy_mii_rx_err});
305
 
306 44 julius
 
307
/**************************************************************************/
308
/* TX path logic MAC->(SMII->MII)->PHY */
309
/**************************************************************************/
310
 
311
   /* We ignore the data when TX_EN bit is not high -
312
    it's only used in MAC to MAC comms*/
313
 
314
 
315
   /* Register the sequence appropriately as it comes in */
316
   reg tx_er_seqbit_scratch;
317
   reg tx_en_seqbit_scratch;
318
   reg [7:0] tx_data_byte_scratch;
319
 
320 49 julius
   reg [2:0] tx_byte_to_phy; /* PHY sourced TX_CLK domain */
321 44 julius
 
322 49 julius
   wire      tx_fifo_empty, tx_fifo_almost_empty;
323 44 julius
   wire      tx_fifo_full;
324
   wire [7:0] tx_fifo_q_dat;
325
   wire       tx_fifo_q_err;
326
   reg        tx_fifo_pop;
327 49 julius
   reg [3:0]  tx_segment_begin_num;
328
   wire [3:0] tx_segment_load_num;
329 44 julius
 
330 49 julius
   assign tx_segment_load_num = (tx_segment_begin_num == 0) ? 4'h9 : tx_segment_begin_num - 1;
331
 
332 44 julius
   /* Signal to tell us an appropriate time to copy the values out of the
333
    temp regs we put the incoming TX line into when we've received a
334
    sequence off the SMII TX line that has TX_EN high */
335
   wire      tx_seqbits_copy;
336 49 julius
   assign tx_seqbits_copy = (
337
                             (
338
                              ((!fast_ethernet) & (segment_ctr == tx_segment_load_num)) |
339
                              fast_ethernet
340
                             )
341
                             & tx_en_seqbit_scratch & state_shiftreg[1]
342
                            );
343 44 julius
 
344
   always @(posedge clk)
345
     begin
346 49 julius
        /* remember which counter value we were at when tx enable/valid
347
         went high.
348
         This is only useful when not doing fast ethernet*/
349
 
350
        /* tx en has gone high - remember the sequence number we're in */
351
        if ((tx_segment_begin_num == 4'hf) & (tx_en_seqbit_scratch))
352
          tx_segment_begin_num <= segment_ctr;
353
 
354
        /* If tx enable goes low again, reset the segment number */
355
        if (!tx_en_seqbit_scratch)
356
             /* reset to 0xf */
357
             tx_segment_begin_num <= 4'hf;
358
     end
359
 
360
 
361
   always @(posedge clk)
362
     begin
363 44 julius
        if (!rst_n)
364
          begin
365
             tx_er_seqbit_scratch <= 0;
366
             tx_en_seqbit_scratch <= 0;
367
             tx_data_byte_scratch <= 0;
368
          end
369
        else
370
          begin
371 49 julius
             if(state_shiftreg[1])
372
               tx_er_seqbit_scratch <= smii_tx;
373
 
374
             if(state_shiftreg[2])
375
               tx_en_seqbit_scratch <= smii_tx;
376
 
377
             /* Preserve all but current bit of interest, as indicated
378
              by state vector bit (reversed, becuase we get MSbit
379
              first) and OR in the current smii_tx line value at this
380
              position*/
381
             if((|state_shiftreg[10:3]) & tx_en_seqbit_scratch)
382
               tx_data_byte_scratch <= (tx_data_byte_scratch & ~state_shiftreg_top_byte) |
383
                                       ({8{smii_tx}} & state_shiftreg_top_byte);
384
 
385 44 julius
          end
386
     end // always @ (posedge clk)
387 49 julius
 
388
   reg [3:0] nib;
389
 
390
 
391
 
392 44 julius
   /* In the event we have a valid byte frame then get it to the
393
    PHY as quickly as possible - this is TX_CLK domain */
394
   always @(posedge ethphy_mii_tx_clk or negedge rst_n)
395
     begin
396
        if(!rst_n)
397
          begin
398
             tx_byte_to_phy <= 0;
399
             tx_fifo_pop <= 1'b0;
400
             /* Output MII registers to the PHY */
401
             ethphy_mii_tx_d <= 0;
402
             ethphy_mii_tx_en <= 0;
403
             ethphy_mii_tx_err <= 0;
404
 
405
          end
406
        else
407
          begin
408 49 julius
             /* If fast_ethernet/100mbs we wait until the FIFO is full
409
              otherwise, we push out the byte each time we get one */
410
             //if((!tx_fifo_empty && !fast_ethernet) ||
411
             //(tx_fifo_full && fast_ethernet))
412
             if (!tx_fifo_almost_empty)
413 44 julius
               begin
414 49 julius
                  if(tx_byte_to_phy == 0)
415 44 julius
                    begin
416 49 julius
                       tx_byte_to_phy <= 1;
417 44 julius
                       tx_fifo_pop <= 1;
418
                    end
419
               end
420 49 julius
 
421 44 julius
             /* FIFO control loop */
422 49 julius
             if (tx_byte_to_phy == 1)/* Output bits 3-0 (bottom nibble ) */
423 44 julius
               begin
424 49 julius
 
425
                  ethphy_mii_tx_en <= 1;
426
 
427
                  tx_fifo_pop <= 0;
428
 
429
                  tx_byte_to_phy <= 2;
430
 
431 44 julius
                  ethphy_mii_tx_d <= tx_fifo_q_dat[3:0];
432 49 julius
                  nib <= tx_fifo_q_dat[7:4];
433 44 julius
                  ethphy_mii_tx_err <= tx_fifo_q_err;
434 49 julius
 
435 44 julius
               end
436 49 julius
             else if (tx_byte_to_phy == 2) /* Output bits 7-4 (top nibble) */
437 44 julius
               begin
438 49 julius
                  //ethphy_mii_tx_d <= tx_fifo_q_dat[7:4];
439
 
440
                  ethphy_mii_tx_d <= nib;
441
 
442 44 julius
                  if(!tx_fifo_empty) /* Check if more in FIFO */
443
                    begin
444 49 julius
                       tx_fifo_pop <= 1;
445
                       tx_byte_to_phy <= 1;
446 44 julius
                    end
447
                  else /* Finish up */
448
                    begin
449 49 julius
                       tx_byte_to_phy <= 3;
450 44 julius
                    end
451
               end
452 49 julius
             else if (tx_byte_to_phy == 3) /* De-assert TX_EN */
453 44 julius
               begin
454
                  tx_byte_to_phy <= 2'b00;
455 403 julius
                  ethphy_mii_tx_en <= 0;
456 44 julius
               end
457
          end // else: !if(!rst_n)
458
     end // always @ (posedge ethphy_mii_tx_clk or negedge rst_n)
459
 
460
   /* A fifo, storing TX bytes coming from the SMII interface */
461 403 julius
   generic_fifo #(9, 64, 6) tx_fifo
462 44 julius
     (
463
      // Outputs
464
      .psh_full                         (tx_fifo_full),
465
      .pop_q                            ({tx_fifo_q_err,tx_fifo_q_dat}),
466
      .pop_empty                        (tx_fifo_empty),
467 49 julius
      .almost_empty                     (tx_fifo_almost_empty),
468 44 julius
      // Inputs
469
      .async_rst_n                      (rst_n),
470
      .psh_clk                          (clk),
471
      .psh_we                           (tx_seqbits_copy),
472
      .psh_d                            ({tx_er_seqbit_scratch,tx_data_byte_scratch}),
473 49 julius
      .pop_clk                          (ethphy_mii_tx_clk),
474 44 julius
      .pop_re                           (tx_fifo_pop));
475
 
476
 
477
   //assign mcoll = mcrs & mtxen;
478
 
479
endmodule // smii_top
480
 
481
 
482
 
483
/* Generic fifo - this is bad, should probably be done some other way */
484 49 julius
module generic_fifo (async_rst_n, psh_clk, psh_we, psh_d, psh_full, pop_clk, pop_re, pop_q, pop_empty, almost_empty);
485 44 julius
 
486
   parameter dw = 8;
487 49 julius
   parameter size = 16;
488
   parameter size_log_2 = 4;
489
 
490 44 julius
   /* Asynch. reset, active low */
491
   input async_rst_n;
492
 
493
   /* Push side signals */
494
   input psh_clk;
495
   input psh_we;
496
   input [dw-1:0] psh_d;
497
   output         psh_full;
498
 
499
   /* Pop side signals */
500
   input          pop_clk;
501
   input          pop_re;
502 49 julius
   //output reg [dw-1:0] pop_q;
503 44 julius
   output reg [dw-1:0] pop_q;
504
   output              pop_empty;
505 49 julius
   output wire         almost_empty;
506 403 julius
 
507
   integer     i;
508 44 julius
 
509
   /* Actual FIFO memory */
510
   reg [dw-1:0]   fifo_mem [0:size-1];
511
 
512 403 julius
   initial
513
     begin
514
        for (i=0;i<size;i=i+1)
515
          begin
516
             fifo_mem[i] = {dw{1'b0}};
517
          end
518
     end
519
 
520 44 julius
 
521 49 julius
   /* FIFO position ptr regs */
522
   reg [size_log_2 - 1 : 0 ]   wr_ptr, rd_ptr, ctr;
523 44 julius
 
524 49 julius
 
525 44 julius
   /* FIFO full signal for push side */
526 49 julius
   //assign psh_full = (ptr == size-1) ? 1 : 0;
527
   /* This full logic means we all but one slot in the FIFO */
528
   assign psh_full = ctr == size;
529
 
530 44 julius
   /* FIFO empty signal for pop side */
531 49 julius
   //assign pop_empty = (ptr == 0) ? 1 : 0;
532
   //assign pop_empty = ctr==0;
533
   assign pop_empty = rd_ptr == wr_ptr;
534
 
535 403 julius
   assign almost_empty = ctr < 16;
536 44 julius
 
537 49 julius
   always @(posedge pop_re or negedge async_rst_n)
538
     begin
539
        if (!async_rst_n)
540 403 julius
          begin
541
             rd_ptr <= 0;
542
             pop_q <= 0;
543
          end
544 49 julius
        else
545
          begin
546 403 julius
             if (!pop_empty)
547
               begin
548
                  pop_q <= fifo_mem[rd_ptr];
549
                  ctr <= ctr - 1;
550
                  rd_ptr <= rd_ptr + 1;
551
               end
552
 
553 49 julius
          end
554
     end
555 44 julius
 
556 49 julius
   always @(posedge psh_we or negedge async_rst_n)
557 44 julius
     begin
558
        if (!async_rst_n)
559
          begin
560
             for (i=0;i<size;i=i+1) fifo_mem[i] <= 0;
561 49 julius
             wr_ptr <= 0;
562
             ctr <= 0;
563 44 julius
          end
564 49 julius
        else
565 44 julius
          begin
566 49 julius
             fifo_mem[wr_ptr] <= psh_d;
567
             wr_ptr <= #1 wr_ptr + 1;
568
             ctr <= ctr + 1;
569
          end
570
     end
571 44 julius
 
572 49 julius
 
573 44 julius
endmodule // generic_fifo

powered by: WebSVN 2.1.0

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