1
2# Name of model to be built and evaluated
3ModelName                               = Router
4
5# Query string to choose what to evaluate (use '\' to enable multiline config)
6QueryString                             = \
7    Energy>>Router:WriteBuffer@0 \
8    Energy>>Router:ReadBuffer@0 \
9    Energy>>Router:TraverseCrossbar->Multicast1@0 \
10    Energy>>Router:ArbitrateSwitch->ArbitrateStage1@0 \
11    Energy>>Router:ArbitrateSwitch->ArbitrateStage2@0 \
12    Energy>>Router:DistributeClock@0 \
13    NddPower>>Router:Leakage@1 \
14    Area>>Router:Active@1 \
15
16
17# Injection rate (# flits per cycle per port), assuming that the router is not
18# saturated
19InjectionRate                           = 0.3
20# Evaluation string
21EvaluateString                          = \
22    ejection_rate   = $(NumberInputPorts) * $(InjectionRate) / $(NumberOutputPorts); \
23    buf_rd_dynamic  = $(Energy>>Router:ReadBuffer) * $(Frequency); \
24    buf_wr_dynamic  = $(Energy>>Router:WriteBuffer) * $(Frequency); \
25    buf_static      = $(NddPower>>Router->InputPort:Leakage) * $(NumberInputPorts) + ($(NddPower>>Router->PipelineReg0:Leakage) + $(NddPower>>Router->PipelineReg1:Leakage)) * $(NumberInputPorts) * $(NumberBitsPerFlit); \
26    xbar_o_dynamic  = $(Energy>>Router:TraverseCrossbar->Multicast1) * $(Frequency); \
27    xbar_static     = $(NddPower>>Router->Crossbar:Leakage) + $(NddPower>>Router->PipelineReg2_0:Leakage) * $(NumberOutputPorts) * $(NumberBitsPerFlit); \
28    sa_o_dynamic    = ($(Energy>>Router:ArbitrateSwitch->ArbitrateStage1) + $(Energy>>Router:ArbitrateSwitch->ArbitrateStage2)) * $(Frequency); \
29    sa_static       = $(NddPower>>Router->SwitchAllocator:Leakage); \
30    clock_o_dynamic = $(Energy>>Router:DistributeClock) * $(Frequency); \
31    clock_static    = $(NddPower>>Router->ClockTree:Leakage); \
32    buffer_dynamic  = buf_wr_dynamic * $(InjectionRate) * $(NumberInputPorts) + buf_rd_dynamic * ejection_rate * $(NumberOutputPorts); \
33    buffer_leakage  = buf_static; \
34    xbar_dynamic    = xbar_o_dynamic * ejection_rate * $(NumberOutputPorts); \
35    xbar_leakage    = xbar_static; \
36    sa_dynamic      = sa_o_dynamic * ejection_rate * $(NumberOutputPorts); \
37    sa_leakage      = sa_static; \
38    clock_dynamic   = clock_o_dynamic; \
39    clock_leakage   = clock_static; \
40    total_dynamic   = buffer_dynamic + xbar_dynamic + sa_dynamic + clock_dynamic; \
41    total_leakage   = buffer_leakage + xbar_leakage + sa_leakage + clock_leakage; \
42    buf_area        = ($(Area>>Router->InputPort:Active) + ($(Area>>Router->PipelineReg0:Active) + $(Area>>Router->PipelineReg1:Active)) * $(NumberBitsPerFlit)) * $(NumberInputPorts); \
43    xbar_area       = $(Area>>Router->Crossbar:Active) + $(Area>>Router->Crossbar_Sel_DFF:Active) + $(Area>>Router->PipelineReg2_0:Active) * $(NumberBitsPerFlit) * $(NumberOutputPorts); \
44    sa_area         = $(Area>>Router->SwitchAllocator:Active); \
45    other_area      = $(Area>>Router->ClockTree:Active); \
46    print "Buffer:"; \
47    print "    Dynamic power: " buffer_dynamic; \
48    print "    Leakage power: " buffer_leakage; \
49    print "Crossbar:"; \
50    print "    Dynamic power: " xbar_dynamic; \
51    print "    Leakage power: " xbar_leakage; \
52    print "Switch allocator:"; \
53    print "    Dynamic power: " sa_dynamic; \
54    print "    Leakage power: " sa_leakage; \
55    print "Clock:"; \
56    print "    Dynamic power: " clock_dynamic; \
57    print "    Leakage power: " clock_leakage; \
58    print "Total:"; \
59    print "    Dynamic power: " total_dynamic; \
60    print "    Leakage power: " $(NddPower>>Router:Leakage); \
61    print "Area:"; \
62    print "    Buffer:           " buf_area; \
63    print "    Crossbar:         " xbar_area; \
64    print "    Switch allocator: " sa_area; \
65    print "    Other:            " other_area; \
66
67# Technology file (see other models in tech/models)
68ElectricalTechModelFilename             = ext/dsent/tech/tech_models/Bulk45LVT.model
69
70###############################################################################
71# Timing optimization
72###############################################################################
73
74# True if want to perform timing optimization; otherwise, false.
75IsPerformTimingOptimization             = true
76# Nets that the timing optimizer starts from
77TimingOptimization->StartNetNames       = [*]
78# Operating frequency (Hz)
79Frequency                               = 1.0e9
80
81###############################################################################
82# Model specifications
83###############################################################################
84
85# Number of input ports
86NumberInputPorts                        = 5
87# Number of output ports
88NumberOutputPorts                       = 5
89# Flit width (bit)
90NumberBitsPerFlit                       = 64
91
92# In this example, we define 2 virtual networks (message classes), VN1 and VN2. 
93#                           VN1 VN2
94# Number of VCs              2   3
95# Number of buffers / VC     4   5
96#
97# So in total, there are (2 * 4) + (3 * 5) = 23 flit buffers
98#
99# Number of virtual networks (number of message classes)
100NumberVirtualNetworks                   = 2
101# Number of virtual channels per virtual network
102NumberVirtualChannelsPerVirtualNetwork  = [2, 3]
103# Number of buffers per virtual channel
104NumberBuffersPerVirtualChannel          = [4, 5]
105
106# InputPort 
107# ---------
108# buffer model
109InputPort->BufferModel                  = DFFRAM
110
111# Crossbar
112# --------
113# crossbar model
114CrossbarModel                           = MultiplexerCrossbar
115
116# Switch allocator
117# ----------------
118# arbiter model
119SwitchAllocator->ArbiterModel           = MatrixArbiter
120
121# Clock tree
122# ----------
123# clock tree model
124ClockTreeModel                          = BroadcastHTree
125# number of levels
126ClockTree->NumberLevels                 = 5
127# wire layer
128ClockTree->WireLayer                    = Global
129# wire width multiplier
130ClockTree->WireWidthMultiplier          = 1.0
131
132