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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [trunk/] [sdm/] [src/] [cm_alloc.v] - Blame information for rev 23

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

Line No. Rev Author Line
1 19 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
 CM allocator (the CM dispatcher in the thesis)
13
 *** SystemVerilog is used ***
14
 
15
 References
16
 For the detail structure, please refer to Section 6.3.1 of the thesis:
17
   Wei Song, Spatial parallelism in the routers of asynchronous on-chip networks, PhD thesis, the University of Manchester, 2011.
18
 
19
 History:
20
 08/09/2009  Initial version. <wsong83@gmail.com>
21
 20/09/2010  Modified for the Clos SDM router <wsong83@cs.man.ac.uk>
22
 25/05/2011  Clean up for opensource. <wsong83@gmail.com>
23
 
24
*/
25
 
26
// the router structure definitions
27
`include "define.v"
28
 
29
module cm_alloc (/*AUTOARG*/
30
`ifndef ENABLE_CRRD
31
   s,
32
`endif
33
   // Outputs
34
   sra, wra, nra, era, lra, scfg, ncfg, wcfg, ecfg, lcfg,
35
   // Inputs
36
   wr, er, sr, nr, lr
37
   ) ;
38
 
39
   //requests from all IMs
40
   input [1:0]   wr, er;
41
   input [3:0]    sr, nr, lr;
42
 
43
   // ack to IMs
44
   output        sra, wra, nra, era, lra;
45
 
46
   // the configuration to the local CM
47
   output [1:0]  scfg, ncfg;
48
   output [3:0]  wcfg, ecfg, lcfg;
49
 
50
   // when using the asynchronous dispatching algorithm, status is sent back to IMs
51
`ifndef ENABLE_CRRD
52
   output [4:0]  s;
53
`endif
54
 
55
   // arbiters
56
   mutex_arb #(2)
57
   SA ( .req  ( {lr[0], nr[0]} ),
58
        .gnt  ( scfg           )
59
        );
60
 
61
   mutex_arb #(4)
62
   WA ( .req  ( {lr[1], er[0], nr[1], sr[0]} ),
63
        .gnt  ( wcfg                         )
64
        );
65
 
66
   mutex_arb #(2)
67
   NA ( .req  ( {lr[2], sr[1]} ),
68
        .gnt  ( ncfg           )
69
        );
70
 
71
   mutex_arb #(4)
72
   EA ( .req  ( {lr[3], nr[2], wr[0], sr[2]} ),
73
        .gnt  ( ecfg                         )
74
        );
75
 
76
   mutex_arb #(4)
77
   LA ( .req  ( {er[1], nr[3], wr[1], sr[3]} ),
78
        .gnt  ( lcfg                         )
79
        );
80
 
81
   // generating the ack
82
   assign sra = |{wcfg[0], ncfg[0], ecfg[0], lcfg[0]};
83
   assign wra = |{ecfg[1], lcfg[1]};
84
   assign nra = |{scfg[0], wcfg[1], ecfg[2], lcfg[2]};
85
   assign era = |{wcfg[2], lcfg[3]};
86
   assign lra = |{scfg[1], wcfg[3], ncfg[1], ecfg[3]};
87
 
88
   // generating the status
89
`ifndef ENABLE_CRRD
90
   assign s = {|lcfg, |ecfg, |ncfg, |wcfg, |scfg};
91
`endif
92
 
93
endmodule // cm_alloc
94
 
95
 

powered by: WebSVN 2.1.0

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