najaeda 0.2.4__cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 0.2.6__cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of najaeda might be problematic. Click here for more details.
- najaeda/docs/source/instance.rst +1 -1
- najaeda/docs/source/introduction.rst +9 -2
- najaeda/libnaja_dnl.so +0 -0
- najaeda/libnaja_metrics.so +0 -0
- najaeda/libnaja_nl.so +0 -0
- najaeda/libnaja_opt.so +0 -0
- najaeda/libnaja_python.so +0 -0
- najaeda/naja.so +0 -0
- najaeda/netlist.py +110 -89
- najaeda/stats.py +6 -9
- {najaeda-0.2.4.dist-info → najaeda-0.2.6.dist-info}/METADATA +1 -1
- {najaeda-0.2.4.dist-info → najaeda-0.2.6.dist-info}/RECORD +15 -14
- {najaeda-0.2.4.dist-info → najaeda-0.2.6.dist-info}/WHEEL +0 -0
- {najaeda-0.2.4.dist-info → najaeda-0.2.6.dist-info}/licenses/AUTHORS +0 -0
- {najaeda-0.2.4.dist-info → najaeda-0.2.6.dist-info}/licenses/LICENSE +0 -0
najaeda/docs/source/instance.rst
CHANGED
|
@@ -23,7 +23,7 @@ In this model:
|
|
|
23
23
|
- **n-input gates** have a **single scalar output** and a **bus input terminal** (of size *n*).
|
|
24
24
|
- **n-output gates** have a **scalar input** and a **bus output terminal** (of size *n*).
|
|
25
25
|
|
|
26
|
-
All terminals in these generic instances are **unnamed
|
|
26
|
+
All terminals in these generic instances are **unnamed** (see :py:attr:`najaeda.netlist.Instance.is_unnamed`).
|
|
27
27
|
|
|
28
28
|
Instance Attributes
|
|
29
29
|
-------------------
|
|
@@ -52,8 +52,15 @@ Installation
|
|
|
52
52
|
|
|
53
53
|
Bug Reports
|
|
54
54
|
-----------
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
|
|
56
|
+
If you encounter any bugs, please report them on the `najaeda` issue tracker:
|
|
57
|
+
https://github.com/najaeda/naja/issues
|
|
58
|
+
|
|
59
|
+
You’re also welcome to join the discussion on Matrix:
|
|
60
|
+
|
|
61
|
+
.. image:: https://img.shields.io/badge/Matrix-Join%20Chat-success?logo=matrix
|
|
62
|
+
:target: https://matrix.to/#/#naja:fossi-chat.org
|
|
63
|
+
:alt: Join the Matrix chat
|
|
57
64
|
|
|
58
65
|
License
|
|
59
66
|
-------
|
najaeda/libnaja_dnl.so
CHANGED
|
Binary file
|
|
Binary file
|
najaeda/libnaja_nl.so
CHANGED
|
Binary file
|
najaeda/libnaja_opt.so
CHANGED
|
Binary file
|
najaeda/libnaja_python.so
CHANGED
|
Binary file
|
najaeda/naja.so
CHANGED
|
Binary file
|
najaeda/netlist.py
CHANGED
|
@@ -10,7 +10,7 @@ import struct
|
|
|
10
10
|
import sys
|
|
11
11
|
import os
|
|
12
12
|
from enum import Enum
|
|
13
|
-
from typing import Union, List
|
|
13
|
+
from typing import Union, List, Iterator
|
|
14
14
|
from dataclasses import dataclass
|
|
15
15
|
|
|
16
16
|
from najaeda import naja
|
|
@@ -561,11 +561,11 @@ class Term:
|
|
|
561
561
|
:return: True if the term is a sequential term.
|
|
562
562
|
:rtype: bool
|
|
563
563
|
"""
|
|
564
|
-
for term in self.get_instance().
|
|
565
|
-
clockRelatedInputs = term.
|
|
564
|
+
for term in self.get_instance().get_bit_terms():
|
|
565
|
+
clockRelatedInputs = term.get_clock_related_inputs()
|
|
566
566
|
if self in clockRelatedInputs:
|
|
567
567
|
return True
|
|
568
|
-
clockRelatedOutputs = term.
|
|
568
|
+
clockRelatedOutputs = term.get_clock_related_outputs()
|
|
569
569
|
if self in clockRelatedOutputs:
|
|
570
570
|
return True
|
|
571
571
|
if (len(clockRelatedInputs) > 0 or len(clockRelatedOutputs) > 0) and (term == self):
|
|
@@ -635,6 +635,56 @@ class Term:
|
|
|
635
635
|
elif snlterm.getDirection() == naja.SNLTerm.Direction.InOut:
|
|
636
636
|
return Term.Direction.INOUT
|
|
637
637
|
|
|
638
|
+
def get_combinatorial_inputs(self):
|
|
639
|
+
"""Get all combinatorial input terms of this instance.
|
|
640
|
+
|
|
641
|
+
:return: a list of combinatorial input terms.
|
|
642
|
+
:rtype: List[Term]
|
|
643
|
+
"""
|
|
644
|
+
terms = self.__get_snl_model().getCombinatorialInputs(
|
|
645
|
+
get_snl_term_for_ids(self.pathIDs, self.termIDs))
|
|
646
|
+
# Convert SNL terms to Term objects
|
|
647
|
+
return [Term(self.pathIDs, term) for term in terms]
|
|
648
|
+
|
|
649
|
+
def get_combinatorial_outputs(self):
|
|
650
|
+
"""Get all combinatorial output terms of this instance.
|
|
651
|
+
|
|
652
|
+
:return: a list of combinatorial output terms.
|
|
653
|
+
:rtype: List[Term]
|
|
654
|
+
"""
|
|
655
|
+
terms = self.__get_snl_model().getCombinatorialOutputs(
|
|
656
|
+
get_snl_term_for_ids(self.pathIDs, self.termIDs))
|
|
657
|
+
# Convert SNL terms to Term objects
|
|
658
|
+
return [Term(self.pathIDs, term) for term in terms]
|
|
659
|
+
|
|
660
|
+
def get_clock_related_inputs(self):
|
|
661
|
+
"""Get all input terms that are related to the given clock term.
|
|
662
|
+
|
|
663
|
+
:param clock_term: the clock term to check for related inputs.
|
|
664
|
+
:return: a list of input terms that are related to the clock term.
|
|
665
|
+
:rtype: List[Term]
|
|
666
|
+
"""
|
|
667
|
+
terms = self.__get_snl_model().getClockRelatedInputs(
|
|
668
|
+
get_snl_term_for_ids(self.pathIDs, self.termIDs))
|
|
669
|
+
# Convert SNL terms to Term objects
|
|
670
|
+
return [Term(self.pathIDs, term) for term in terms]
|
|
671
|
+
|
|
672
|
+
def get_clock_related_outputs(self):
|
|
673
|
+
"""Get all output terms that are related to the given clock term.
|
|
674
|
+
|
|
675
|
+
:param clock_term: the clock term to check for related outputs.
|
|
676
|
+
:return: a list of output terms that are related to the clock term.
|
|
677
|
+
:rtype: List[Term]
|
|
678
|
+
"""
|
|
679
|
+
terms = self.__get_snl_model().getClockRelatedOutputs(
|
|
680
|
+
get_snl_term_for_ids(self.pathIDs, self.termIDs))
|
|
681
|
+
# Convert SNL terms to Term objects
|
|
682
|
+
return [Term(self.pathIDs, term) for term in terms]
|
|
683
|
+
|
|
684
|
+
def __get_snl_model(self):
|
|
685
|
+
snlterm = get_snl_term_for_ids(self.pathIDs, self.termIDs)
|
|
686
|
+
return snlterm.getDesign()
|
|
687
|
+
|
|
638
688
|
def __get_snl_bitnet(self, bit) -> Net:
|
|
639
689
|
# single bit
|
|
640
690
|
path = get_snl_path_from_id_list(self.pathIDs)
|
|
@@ -822,17 +872,7 @@ class Term:
|
|
|
822
872
|
|
|
823
873
|
|
|
824
874
|
def get_instance_by_path(names: list):
|
|
825
|
-
|
|
826
|
-
path = naja.SNLPath()
|
|
827
|
-
instance = None
|
|
828
|
-
top = naja.NLUniverse.get().getTopDesign()
|
|
829
|
-
design = top
|
|
830
|
-
for name in names:
|
|
831
|
-
path = naja.SNLPath(path, design.getInstance(name))
|
|
832
|
-
instance = design.getInstance(name)
|
|
833
|
-
assert instance is not None
|
|
834
|
-
design = instance.getModel()
|
|
835
|
-
return Instance(path)
|
|
875
|
+
return get_top().get_child_instance(names)
|
|
836
876
|
|
|
837
877
|
|
|
838
878
|
# def refresh_path(path: naja.SNLPath):
|
|
@@ -951,14 +991,13 @@ class Instance:
|
|
|
951
991
|
:return: True if this is the top design.
|
|
952
992
|
:rtype: bool
|
|
953
993
|
"""
|
|
954
|
-
return
|
|
994
|
+
return not self.pathIDs
|
|
955
995
|
|
|
956
996
|
def is_assign(self) -> bool:
|
|
957
997
|
"""(assign a=b) will create an instance of assign connecting
|
|
958
998
|
the wire a to the output of the assign and b to the input.
|
|
959
999
|
|
|
960
|
-
:return: True if this is an assign
|
|
961
|
-
unnamed Assign instances.
|
|
1000
|
+
:return: True if this is an assign (represented by an unnamed assign instance).
|
|
962
1001
|
:rtype: bool
|
|
963
1002
|
"""
|
|
964
1003
|
return self.__get_snl_model().isAssign()
|
|
@@ -1120,10 +1159,10 @@ class Instance:
|
|
|
1120
1159
|
"""
|
|
1121
1160
|
return sum(1 for _ in self.get_nets())
|
|
1122
1161
|
|
|
1123
|
-
def
|
|
1162
|
+
def get_bit_nets(self):
|
|
1124
1163
|
"""Iterate over all scalar nets and bus net bits.
|
|
1125
1164
|
|
|
1126
|
-
:return: an iterator over the
|
|
1165
|
+
:return: an iterator over the nets at bit level of this Instance.
|
|
1127
1166
|
:rtype: Iterator[Net]
|
|
1128
1167
|
"""
|
|
1129
1168
|
for net in self.__get_snl_model().getNets():
|
|
@@ -1133,13 +1172,13 @@ class Instance:
|
|
|
1133
1172
|
else:
|
|
1134
1173
|
yield Net(self.pathIDs, net)
|
|
1135
1174
|
|
|
1136
|
-
def
|
|
1175
|
+
def count_bit_nets(self) -> int:
|
|
1137
1176
|
"""Count the number of scalar nets and bus net bits of this Instance.
|
|
1138
1177
|
|
|
1139
|
-
:return: the number of
|
|
1178
|
+
:return: the number of bit nets of this Instance.
|
|
1140
1179
|
:rtype: int
|
|
1141
1180
|
"""
|
|
1142
|
-
return sum(1 for _ in self.
|
|
1181
|
+
return sum(1 for _ in self.get_bit_nets())
|
|
1143
1182
|
|
|
1144
1183
|
def get_net(self, name: str) -> Net:
|
|
1145
1184
|
"""
|
|
@@ -1183,22 +1222,22 @@ class Instance:
|
|
|
1183
1222
|
"""
|
|
1184
1223
|
return sum(1 for _ in self.get_terms())
|
|
1185
1224
|
|
|
1186
|
-
def
|
|
1225
|
+
def get_bit_terms(self):
|
|
1187
1226
|
"""Iterate over all scalar terms and bus term bits.
|
|
1188
1227
|
|
|
1189
|
-
:return: the
|
|
1228
|
+
:return: the bit terms of this Instance.
|
|
1190
1229
|
:rtype: Iterator[Term]
|
|
1191
1230
|
"""
|
|
1192
1231
|
for term in self.__get_snl_model().getBitTerms():
|
|
1193
1232
|
yield Term(self.pathIDs, term)
|
|
1194
1233
|
|
|
1195
|
-
def
|
|
1234
|
+
def count_bit_terms(self) -> int:
|
|
1196
1235
|
"""Count the number of scalar terms and bus term bits of this Instance.
|
|
1197
1236
|
|
|
1198
|
-
:return: the number of
|
|
1237
|
+
:return: the number of bit terms of this Instance.
|
|
1199
1238
|
:rtype: int
|
|
1200
1239
|
"""
|
|
1201
|
-
return sum(1 for _ in self.
|
|
1240
|
+
return sum(1 for _ in self.get_bit_terms())
|
|
1202
1241
|
|
|
1203
1242
|
def get_term(self, name: str) -> Term:
|
|
1204
1243
|
"""
|
|
@@ -1231,11 +1270,11 @@ class Instance:
|
|
|
1231
1270
|
"""
|
|
1232
1271
|
return sum(1 for _ in self.get_input_terms())
|
|
1233
1272
|
|
|
1234
|
-
def
|
|
1273
|
+
def get_input_bit_terms(self):
|
|
1235
1274
|
"""Iterate over all scalar input terms and bus input term bits
|
|
1236
1275
|
of this Instance.
|
|
1237
1276
|
|
|
1238
|
-
:return: the
|
|
1277
|
+
:return: the bit input terms of this Instance.
|
|
1239
1278
|
:rtype: Iterator[Term]
|
|
1240
1279
|
"""
|
|
1241
1280
|
for term in self.__get_snl_model().getTerms():
|
|
@@ -1246,14 +1285,14 @@ class Instance:
|
|
|
1246
1285
|
else:
|
|
1247
1286
|
yield Term(self.pathIDs, term)
|
|
1248
1287
|
|
|
1249
|
-
def
|
|
1288
|
+
def count_input_bit_terms(self) -> int:
|
|
1250
1289
|
"""Count the number of scalar input terms and bus input term bits
|
|
1251
1290
|
of this Instance.
|
|
1252
1291
|
|
|
1253
|
-
:return: the number of
|
|
1292
|
+
:return: the number of bit input terms of this Instance.
|
|
1254
1293
|
:rtype: int
|
|
1255
1294
|
"""
|
|
1256
|
-
return sum(1 for _ in self.
|
|
1295
|
+
return sum(1 for _ in self.get_input_bit_terms())
|
|
1257
1296
|
|
|
1258
1297
|
def get_output_terms(self):
|
|
1259
1298
|
"""Iterate over all scalar output terms and bus output terms
|
|
@@ -1275,11 +1314,11 @@ class Instance:
|
|
|
1275
1314
|
"""
|
|
1276
1315
|
return sum(1 for _ in self.get_output_terms())
|
|
1277
1316
|
|
|
1278
|
-
def
|
|
1317
|
+
def get_output_bit_terms(self):
|
|
1279
1318
|
"""Iterate over all scalar output terms and bus output term bits
|
|
1280
1319
|
of this Instance.
|
|
1281
1320
|
|
|
1282
|
-
:return: the
|
|
1321
|
+
:return: the bit output terms of this Instance.
|
|
1283
1322
|
:rtype: Iterator[Term]
|
|
1284
1323
|
"""
|
|
1285
1324
|
for term in self.__get_snl_model().getTerms():
|
|
@@ -1290,16 +1329,16 @@ class Instance:
|
|
|
1290
1329
|
else:
|
|
1291
1330
|
yield Term(self.pathIDs, term)
|
|
1292
1331
|
|
|
1293
|
-
def
|
|
1332
|
+
def count_output_bit_terms(self) -> int:
|
|
1294
1333
|
"""Count the number of scalar output terms and bus output term bits
|
|
1295
1334
|
of this Instance.
|
|
1296
1335
|
|
|
1297
|
-
:return: the number of
|
|
1336
|
+
:return: the number of bit output terms of this Instance.
|
|
1298
1337
|
:rtype: int
|
|
1299
1338
|
"""
|
|
1300
|
-
return sum(1 for _ in self.
|
|
1339
|
+
return sum(1 for _ in self.get_output_bit_terms())
|
|
1301
1340
|
|
|
1302
|
-
def get_attributes(self):
|
|
1341
|
+
def get_attributes(self) -> Iterator[Attribute]:
|
|
1303
1342
|
"""Iterate over the attributes of this Instance.
|
|
1304
1343
|
|
|
1305
1344
|
:return: the attributes of this Instance.
|
|
@@ -1341,7 +1380,7 @@ class Instance:
|
|
|
1341
1380
|
# Delete the last instance in uniq_path
|
|
1342
1381
|
self.__get_snl_model().getInstanceByID(id).destroy()
|
|
1343
1382
|
|
|
1344
|
-
def get_design(self):
|
|
1383
|
+
def get_design(self) -> "Instance":
|
|
1345
1384
|
"""
|
|
1346
1385
|
:return: the Instance containing this instance.
|
|
1347
1386
|
:rtype: Instance
|
|
@@ -1403,7 +1442,7 @@ class Instance:
|
|
|
1403
1442
|
model = self.__get_snl_model()
|
|
1404
1443
|
return model.getDB().getID(), model.getLibrary().getID(), model.getID()
|
|
1405
1444
|
|
|
1406
|
-
def create_child_instance(self, model: str, name: str):
|
|
1445
|
+
def create_child_instance(self, model: str, name: str) -> "Instance":
|
|
1407
1446
|
"""Create a child instance with the given model and name.
|
|
1408
1447
|
|
|
1409
1448
|
:param str model: the name of the model of the instance to create.
|
|
@@ -1524,7 +1563,7 @@ class Instance:
|
|
|
1524
1563
|
:rtype: Net
|
|
1525
1564
|
"""
|
|
1526
1565
|
path = get_snl_path_from_id_list(self.pathIDs)
|
|
1527
|
-
if path.size()
|
|
1566
|
+
if path.size():
|
|
1528
1567
|
naja.SNLUniquifier(path)
|
|
1529
1568
|
path = get_snl_path_from_id_list(self.pathIDs)
|
|
1530
1569
|
model = self.__get_snl_model()
|
|
@@ -1541,7 +1580,7 @@ class Instance:
|
|
|
1541
1580
|
:rtype: Net
|
|
1542
1581
|
"""
|
|
1543
1582
|
path = get_snl_path_from_id_list(self.pathIDs)
|
|
1544
|
-
if path.size()
|
|
1583
|
+
if path.size():
|
|
1545
1584
|
naja.SNLUniquifier(path)
|
|
1546
1585
|
path = get_snl_path_from_id_list(self.pathIDs)
|
|
1547
1586
|
model = self.__get_snl_model()
|
|
@@ -1583,18 +1622,6 @@ class Instance:
|
|
|
1583
1622
|
get_snl_term_for_ids(clock_term.pathIDs,
|
|
1584
1623
|
clock_term.termIDs))
|
|
1585
1624
|
|
|
1586
|
-
def get_clock_related_inputs(self, clock_term: Term) -> List[Term]:
|
|
1587
|
-
"""Get all input terms that are related to the given clock term.
|
|
1588
|
-
|
|
1589
|
-
:param clock_term: the clock term to check for related inputs.
|
|
1590
|
-
:return: a list of input terms that are related to the clock term.
|
|
1591
|
-
:rtype: List[Term]
|
|
1592
|
-
"""
|
|
1593
|
-
terms = self.__get_snl_model().getClockRelatedInputs(
|
|
1594
|
-
get_snl_term_for_ids(clock_term.pathIDs, clock_term.termIDs))
|
|
1595
|
-
# Convert SNL terms to Term objects
|
|
1596
|
-
return [Term(clock_term.pathIDs, term) for term in terms]
|
|
1597
|
-
|
|
1598
1625
|
def add_clock_related_outputs(self, clock_term: Term, output_terms: List[Term]):
|
|
1599
1626
|
"""Add output terms that are related to the given clock term.
|
|
1600
1627
|
|
|
@@ -1607,18 +1634,6 @@ class Instance:
|
|
|
1607
1634
|
self.__get_snl_model().addClockToOutputsArcs(
|
|
1608
1635
|
get_snl_term_for_ids(clock_term.pathIDs, clock_term.termIDs), snlterms)
|
|
1609
1636
|
|
|
1610
|
-
def get_clock_related_outputs(self, clock_term: Term) -> List[Term]:
|
|
1611
|
-
"""Get all output terms that are related to the given clock term.
|
|
1612
|
-
|
|
1613
|
-
:param clock_term: the clock term to check for related outputs.
|
|
1614
|
-
:return: a list of output terms that are related to the clock term.
|
|
1615
|
-
:rtype: List[Term]
|
|
1616
|
-
"""
|
|
1617
|
-
terms = self.__get_snl_model().getClockRelatedOutputs(
|
|
1618
|
-
get_snl_term_for_ids(clock_term.pathIDs, clock_term.termIDs))
|
|
1619
|
-
# Convert SNL terms to Term objects
|
|
1620
|
-
return [Term(clock_term.pathIDs, term) for term in terms]
|
|
1621
|
-
|
|
1622
1637
|
def add_combinatorial_arcs(self, input_terms: List[Term], output_terms: List[Term]):
|
|
1623
1638
|
"""Add input terms that are combinatorial inputs for the given output term.
|
|
1624
1639
|
|
|
@@ -1630,28 +1645,6 @@ class Instance:
|
|
|
1630
1645
|
[get_snl_term_for_ids(term.pathIDs, term.termIDs) for term in input_terms],
|
|
1631
1646
|
[get_snl_term_for_ids(term.pathIDs, term.termIDs) for term in output_terms])
|
|
1632
1647
|
|
|
1633
|
-
def get_combinatorial_inputs(self, output_term: Term) -> List[Term]:
|
|
1634
|
-
"""Get all combinatorial input terms of this instance.
|
|
1635
|
-
|
|
1636
|
-
:return: a list of combinatorial input terms.
|
|
1637
|
-
:rtype: List[Term]
|
|
1638
|
-
"""
|
|
1639
|
-
terms = self.__get_snl_model().getCombinatorialInputs(
|
|
1640
|
-
get_snl_term_for_ids(output_term.pathIDs, output_term.termIDs))
|
|
1641
|
-
# Convert SNL terms to Term objects
|
|
1642
|
-
return [Term(self.pathIDs, term) for term in terms]
|
|
1643
|
-
|
|
1644
|
-
def get_combinatorial_outputs(self, input_term: Term) -> List[Term]:
|
|
1645
|
-
"""Get all combinatorial output terms of this instance.
|
|
1646
|
-
|
|
1647
|
-
:return: a list of combinatorial output terms.
|
|
1648
|
-
:rtype: List[Term]
|
|
1649
|
-
"""
|
|
1650
|
-
terms = self.__get_snl_model().getCombinatorialOutputs(
|
|
1651
|
-
get_snl_term_for_ids(input_term.pathIDs, input_term.termIDs))
|
|
1652
|
-
# Convert SNL terms to Term objects
|
|
1653
|
-
return [Term(self.pathIDs, term) for term in terms]
|
|
1654
|
-
|
|
1655
1648
|
|
|
1656
1649
|
def __get_top_db() -> naja.NLDB:
|
|
1657
1650
|
if naja.NLUniverse.get() is None:
|
|
@@ -1840,3 +1833,31 @@ def apply_constant_propagation():
|
|
|
1840
1833
|
top = naja.NLUniverse.get().getTopDesign()
|
|
1841
1834
|
if top is not None:
|
|
1842
1835
|
naja.NLUniverse.get().applyConstantPropagation()
|
|
1836
|
+
|
|
1837
|
+
|
|
1838
|
+
def get_max_fanout() -> int:
|
|
1839
|
+
"""Get the maximum fanout of the top design.
|
|
1840
|
+
|
|
1841
|
+
:return: the maximum fanout of the top design.
|
|
1842
|
+
:rtype: int
|
|
1843
|
+
"""
|
|
1844
|
+
u = naja.NLUniverse.get()
|
|
1845
|
+
if u is not None:
|
|
1846
|
+
top = naja.NLUniverse.get().getTopDesign()
|
|
1847
|
+
if top is not None:
|
|
1848
|
+
return naja.NLUniverse.get().getMaxFanout()
|
|
1849
|
+
return 0
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
def get_max_logic_level() -> int:
|
|
1853
|
+
"""Get the maximum logic level of the top design.
|
|
1854
|
+
|
|
1855
|
+
:return: the maximum logic level of the top design.
|
|
1856
|
+
:rtype: int
|
|
1857
|
+
"""
|
|
1858
|
+
u = naja.NLUniverse.get()
|
|
1859
|
+
if u is not None:
|
|
1860
|
+
top = naja.NLUniverse.get().getTopDesign()
|
|
1861
|
+
if top is not None:
|
|
1862
|
+
return naja.NLUniverse.get().getMaxLogicLevel()
|
|
1863
|
+
return 0
|
najaeda/stats.py
CHANGED
|
@@ -236,7 +236,7 @@ def compute_instance_terms(instance, instance_stats):
|
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
def compute_instance_net_stats(instance, instance_stats):
|
|
239
|
-
for net in instance.
|
|
239
|
+
for net in instance.get_bit_nets():
|
|
240
240
|
if net.is_const():
|
|
241
241
|
pass
|
|
242
242
|
nb_components = sum(1 for c in net.get_terms())
|
|
@@ -372,21 +372,18 @@ def convert_instance_stats_to_json(instance_stats):
|
|
|
372
372
|
return json_top
|
|
373
373
|
|
|
374
374
|
|
|
375
|
-
def dump_instance_stats_json(instance,
|
|
376
|
-
# stats_files = [(InstanceStats.ReportType.JSON, stats_file)]
|
|
377
|
-
# stats_file.write("[\n")
|
|
378
|
-
# dump_instance_stats(design, stats_files)
|
|
379
|
-
# stats_file.write("]")
|
|
375
|
+
def dump_instance_stats_json(instance, path: str):
|
|
380
376
|
instances_stats = InstancesStats()
|
|
381
377
|
compute_instance_stats(instance, instances_stats)
|
|
382
378
|
json_dict = convert_instance_stats_to_json(instances_stats)
|
|
383
|
-
|
|
379
|
+
with open(path, "w") as f:
|
|
380
|
+
json.dump(json_dict, f, indent=4)
|
|
384
381
|
|
|
385
382
|
|
|
386
|
-
def dump_instance_stats_text(instance,
|
|
383
|
+
def dump_instance_stats_text(instance, path: str):
|
|
387
384
|
instances_stats = InstancesStats()
|
|
388
385
|
compute_instance_stats(instance, instances_stats)
|
|
389
|
-
instances_stats.dump_instance_stats_text(instance,
|
|
386
|
+
instances_stats.dump_instance_stats_text(instance, path)
|
|
390
387
|
|
|
391
388
|
|
|
392
389
|
def dump_constants(design, analyzed_models):
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
najaeda/libnaja_python.so,sha256=
|
|
1
|
+
najaeda/libnaja_python.so,sha256=u7YopxqKdCOS792rLZ46MeadAexjE4XRjiutzixLFsw,1953953
|
|
2
2
|
najaeda/_version.py,sha256=c-4hT20dyE-3BcdzOqR0vd92E7ydR5u2c-VmCc6oU8A,332
|
|
3
|
-
najaeda/libnaja_nl.so,sha256=
|
|
4
|
-
najaeda/naja.so,sha256=
|
|
3
|
+
najaeda/libnaja_nl.so,sha256=1jIqz5rxU7dcRKid66yzLgce3auXNdPtl4MAijDgBN4,1646960
|
|
4
|
+
najaeda/naja.so,sha256=9c0sIgDcauwpfS2l78O5mjQOCl_t5U-junFZdHPjXw0,206561
|
|
5
5
|
najaeda/pandas_stats.py,sha256=yOb4ka965U7rN4D6AwvSGmRyeT_O7Ed-5cmT8BFbfeo,1070
|
|
6
|
-
najaeda/stats.py,sha256=
|
|
6
|
+
najaeda/stats.py,sha256=g1F1CEBNVvGgzINOI7sK83123cCbclLDmyUjuep3-EU,16107
|
|
7
|
+
najaeda/libnaja_metrics.so,sha256=weTjkcgBVv_aY8Mdr2zPSJv2NtQoMgQYXJKAYrgEsRA,206361
|
|
7
8
|
najaeda/libnaja_bne.so,sha256=ejZf2Zl2AXQagN41HIj8x-3oeoyEffcPTPR0YeY40ng,272577
|
|
8
9
|
najaeda/__init__.py,sha256=6QrOzlqTfd558FH9Zm6ve54IzkHaDJ8ZO8hTCaEwsL8,218
|
|
9
|
-
najaeda/libnaja_opt.so,sha256=
|
|
10
|
-
najaeda/netlist.py,sha256=
|
|
10
|
+
najaeda/libnaja_opt.so,sha256=oFT5aS0zO_0UJMBCqEtOnVJeQgDytasPBBtfrGsBZbA,348713
|
|
11
|
+
najaeda/netlist.py,sha256=V-hoHtyjXVblXzKOObNV0Jz-_MIqbirZY-zV2YnZwjw,64203
|
|
11
12
|
najaeda/net_visitor.py,sha256=P_esjibYb-wBDuF-AyF7es9sJYw1Ha8RhTPu-qKe7G4,1940
|
|
12
|
-
najaeda/libnaja_dnl.so,sha256=
|
|
13
|
+
najaeda/libnaja_dnl.so,sha256=ErtKaZ2RWYxG_lqmzQXCFakI8yRItTXQEFSvDlaSCQc,276937
|
|
13
14
|
najaeda/instance_visitor.py,sha256=JMsPSQaWNiDjxS05rxg83a0PIsrOIuTi9G35hkwdibs,1530
|
|
14
15
|
najaeda/native/stats.py,sha256=t50hhE9pEFNtlssjES0A-K9TsO_2ZSUAb-e9L3Rt6yc,13063
|
|
15
16
|
najaeda/native/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -22,20 +23,20 @@ najaeda/docs/source/netlist_classes.rst,sha256=Zrha9MQVEdEwxmP2zhgC0K3iioZXXerze
|
|
|
22
23
|
najaeda/docs/source/examples.rst.in,sha256=4ZStOA3N5VHbKZgdn2kaEQZL7wPoJwODS2E1BO54uFY,2091
|
|
23
24
|
najaeda/docs/source/equipotential.rst,sha256=0MDi-4fPEsX7K_ezWj5DB3mCalnhqN-sicYbQKYQfNc,335
|
|
24
25
|
najaeda/docs/source/preprocessor.py,sha256=TK4LsTdNbv2dxkKQaJ7cEyo9PU5v_56vlrFCJYIPKf8,2625
|
|
25
|
-
najaeda/docs/source/introduction.rst,sha256=
|
|
26
|
+
najaeda/docs/source/introduction.rst,sha256=zrXsg7tItEqVhcTEHF9I19d97cTLynw6q0mx7XUNynE,2656
|
|
26
27
|
najaeda/docs/source/common_classes.rst,sha256=o20u3mcpFYINwy0sVdye90ZPMQcPqoH3V4ERKcG7SZI,181
|
|
27
28
|
najaeda/docs/source/net.rst,sha256=i6YEir8ZOldSY8-UmPxgVJ4Ot3y-Q6seRkBr2H-KmXc,732
|
|
28
29
|
najaeda/docs/source/index.rst,sha256=80VMfeEGHObnOUXRBxIzISQsG_HNkgT-pUpsDZsCfOY,387
|
|
29
30
|
najaeda/docs/source/visitors.rst,sha256=KScCr7BytrhFxWfZPyYWIrr3CEJuk5Tx-LjEuDnnBaA,227
|
|
30
31
|
najaeda/docs/source/api.rst,sha256=47VCPyF4Py_1cklZ3q9fmOMhqqI17rxwU_VUJETfCwY,151
|
|
31
32
|
najaeda/docs/source/term.rst,sha256=QKWT6u1xjEjusvcZYknKQ-M83ibohO5y1EYTQnnXqak,690
|
|
32
|
-
najaeda/docs/source/instance.rst,sha256
|
|
33
|
+
najaeda/docs/source/instance.rst,sha256=-a7QjaR6URnpMPw2L6vUJ7IOqKLAtWd78LI0Br52iKM,1010
|
|
33
34
|
najaeda/docs/source/conf.py,sha256=XqCFo29gZCbaoPe1xEan9ZonYyQW5NZnWHGEWrB7p8Q,2021
|
|
34
|
-
najaeda-0.2.
|
|
35
|
-
najaeda-0.2.
|
|
36
|
-
najaeda-0.2.
|
|
37
|
-
najaeda-0.2.
|
|
38
|
-
najaeda-0.2.
|
|
35
|
+
najaeda-0.2.6.dist-info/WHEEL,sha256=A3mvWTV2IcEc7qLoVrqpNTZ0QD1zGDiFoYw9zZpB5kA,158
|
|
36
|
+
najaeda-0.2.6.dist-info/METADATA,sha256=gF5bC4WqE1s8qne54K68ObdRuxLHpYCYmmCy9hAWB7o,3435
|
|
37
|
+
najaeda-0.2.6.dist-info/RECORD,,
|
|
38
|
+
najaeda-0.2.6.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
39
|
+
najaeda-0.2.6.dist-info/licenses/AUTHORS,sha256=7NYEGDAX_1QZvCCHfq8YVXC5ZbwH_pbNI8DcSmm70GU,377
|
|
39
40
|
najaeda.libs/libtbbmalloc-8bd2c113.so.2.15,sha256=t7EmHeYI7vtRrpUMImjQuzDv3a1gs8-lcUxotcVs3mA,198281
|
|
40
41
|
najaeda.libs/libcapnp-1-d562dcbf.1.0.so,sha256=oATbFuRyIBdV6dWAaarYlY3DDt3Wvyp1nC5FvgRIyzw,1152985
|
|
41
42
|
najaeda.libs/libtbb-58378cc2.so.12.15,sha256=yxzhDOGKoZHEHYUULdSu-uH9-Hr1Wh8JygBizKBxc_U,404105
|
|
File without changes
|
|
File without changes
|
|
File without changes
|