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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [trunk/] [vc/] [src/] [fcctl.v] - Blame information for rev 78

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

Line No. Rev Author Line
1 39 wsong0210
/*
2
 Asynchronous SDM NoC
3
 (C)2011 Wei Song
4
 Advanced Processor Technologies Group
5
 Computer Science, the Univ. of Manchester, UK
6
 
7
 Authors:
8
 Wei Song     wsong83@gmail.com
9
 
10
 License: LGPL 3.0 or later
11
 
12
 Flow control unit.
13
 
14
 History:
15
 31/03/2010  Initial version. <wsong83@gmail.com>
16
 12/05/2010  Use MPxP crossbar. <wsong83@gmail.com>
17
 02/06/2011  Clean up for opensource. <wsong83@gmail.com>
18
 
19
*/
20
 
21
module fcctl ( /*AUTOARG*/
22
   // Outputs
23
   afc, ro,
24
   // Inputs
25
   credit, ri, rst
26
   );
27
   parameter VCN = 2;           // number of VCs per direction
28
   parameter PD = 3;            // depth of an input VC buffer
29
 
30
   input [VCN-1:0]  credit;      // credit input from the next router
31
   output [VCN-1:0] afc; // ack for the credit input
32
   input [VCN-1:0]  ri;          // VC request from VCA
33
   output [VCN-1:0] ro;          // credit grant output
34
   input            rst;        // active high reset
35
 
36
   wire [PD:0][VCN-1:0] cp, cpa;
37
 
38
   genvar                 i,j;
39
 
40
   // the credit pipeline
41
   generate
42
      for(i=0; i<PD; i++) begin: P
43
         for(j=0; j<VCN; j++) begin: V
44
            cpipe CP (.cia(cpa[i][j]), .co(cp[i+1][j]), .rst(rst), .ci(cp[i][j]), .coa(cpa[i+1][j]));
45
         end
46
      end
47
   endgenerate
48
 
49
   // grant a credit to a VC request
50
   generate
51
      for(i=0; i<VCN; i++) begin:R
52
         dc2 CR (.a(ri[i]), .d(cp[PD][i]), .q(cpa[PD][i]));
53
      end
54
   endgenerate
55
 
56
   assign ro = cpa[PD];
57
   assign cp[0] = credit;
58
   assign afc = cpa[0];
59
 
60
endmodule // fcctl
61
 
62
 

powered by: WebSVN 2.1.0

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