-
Notifications
You must be signed in to change notification settings - Fork 0
/
Network3x3-all-tx-wires.py
35 lines (28 loc) · 1.42 KB
/
Network3x3-all-tx-wires.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from collections import OrderedDict
from LogSamplePlot import Plotter as pltr
from LogSamplePlot import Filter as fltr
from Config import Mappings as mappingConfig
from Config import Input as inputConfig
if __name__ == "__main__":
dataFilter = fltr.Filter(inputConfig.logFile, mappingConfig.wireToFloatValueMapping)
dataPlotter = pltr.Plotter()
numRows = 3
numColumns = 3
nodesTotal = numRows * numColumns
# column 1
for id in range(0, numRows * numColumns):
filter = fltr.SampleFilter(domain="WIRE", name="tx-north", nodeId=id)
dataFilter.filter(filter)
xData, yData, annotations = dataFilter.getData(filter)
dataPlotter.addPlot(xData, yData, annotations, "[%s] %s" % (filter.nodeId, filter.name))
filter = fltr.SampleFilter(domain="WIRE", name="tx-east", nodeId=id)
dataFilter.filter(filter)
xData, yData, annotations = dataFilter.getData(filter)
dataPlotter.addPlot(xData, yData, annotations, "[%s] %s" % (filter.nodeId, filter.name))
filter = fltr.SampleFilter(domain="WIRE", name="tx-south", nodeId=id)
dataFilter.filter(filter)
xData, yData, annotations = dataFilter.getData(filter)
dataPlotter.addPlot(xData, yData, annotations, "[%s] %s" % (filter.nodeId, filter.name))
dataPlotter.setWindowTitle("Network %sx%s Simulation - tx wires" % (numRows, numColumns))
dataFilter.printValues()
dataPlotter.plot()