najaeda 0.1.17__cp39-cp39-macosx_11_0_arm64.whl → 0.1.21__cp39-cp39-macosx_11_0_arm64.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.
najaeda/libnaja_dnl.dylib CHANGED
Binary file
najaeda/libnaja_opt.dylib CHANGED
Binary file
Binary file
najaeda/naja.so CHANGED
Binary file
najaeda/netlist.py CHANGED
@@ -1010,6 +1010,14 @@ class Instance:
1010
1010
  for net in self.__get_snl_model().getNets():
1011
1011
  yield Net(self.pathIDs, net)
1012
1012
 
1013
+ def count_nets(self) -> int:
1014
+ """Count the number of scalar nets and bus nets of this Instance.
1015
+
1016
+ :return: the number of nets of this Instance.
1017
+ :rtype: int
1018
+ """
1019
+ return sum(1 for _ in self.get_nets())
1020
+
1013
1021
  def get_flat_nets(self):
1014
1022
  """Iterate over all scalar nets and bus net bits.
1015
1023
 
@@ -1023,6 +1031,14 @@ class Instance:
1023
1031
  else:
1024
1032
  yield Net(self.pathIDs, net)
1025
1033
 
1034
+ def count_flat_nets(self) -> int:
1035
+ """Count the number of scalar nets and bus net bits of this Instance.
1036
+
1037
+ :return: the number of flat nets of this Instance.
1038
+ :rtype: int
1039
+ """
1040
+ return sum(1 for _ in self.get_flat_nets())
1041
+
1026
1042
  def get_net(self, name: str) -> Net:
1027
1043
  """
1028
1044
  :param str name: the name of the Net to get.
@@ -1050,6 +1066,14 @@ class Instance:
1050
1066
  for term in self.__get_snl_model().getTerms():
1051
1067
  yield Term(self.pathIDs, term)
1052
1068
 
1069
+ def count_terms(self) -> int:
1070
+ """Count the number of scalar terms and bus terms of this Instance.
1071
+
1072
+ :return: the number of terms of this Instance.
1073
+ :rtype: int
1074
+ """
1075
+ return sum(1 for _ in self.get_terms())
1076
+
1053
1077
  def get_flat_terms(self):
1054
1078
  """Iterate over all scalar terms and bus term bits.
1055
1079
 
@@ -1059,6 +1083,14 @@ class Instance:
1059
1083
  for term in self.__get_snl_model().getBitTerms():
1060
1084
  yield Term(self.pathIDs, term)
1061
1085
 
1086
+ def count_flat_terms(self) -> int:
1087
+ """Count the number of scalar terms and bus term bits of this Instance.
1088
+
1089
+ :return: the number of flat terms of this Instance.
1090
+ :rtype: int
1091
+ """
1092
+ return sum(1 for _ in self.get_flat_terms())
1093
+
1062
1094
  def get_term(self, name: str) -> Term:
1063
1095
  """
1064
1096
  :param str name: the name of the Term to get.
@@ -1081,6 +1113,15 @@ class Instance:
1081
1113
  if term.getDirection() != naja.SNLTerm.Direction.Output:
1082
1114
  yield Term(self.pathIDs, term)
1083
1115
 
1116
+ def count_input_terms(self) -> int:
1117
+ """Count the number of scalar input terms and bus input terms
1118
+ of this Instance.
1119
+
1120
+ :return: the number of input terms of this Instance.
1121
+ :rtype: int
1122
+ """
1123
+ return sum(1 for _ in self.get_input_terms())
1124
+
1084
1125
  def get_flat_input_terms(self):
1085
1126
  """Iterate over all scalar input terms and bus input term bits
1086
1127
  of this Instance.
@@ -1096,6 +1137,15 @@ class Instance:
1096
1137
  else:
1097
1138
  yield Term(self.pathIDs, term)
1098
1139
 
1140
+ def count_flat_input_terms(self) -> int:
1141
+ """Count the number of scalar input terms and bus input term bits
1142
+ of this Instance.
1143
+
1144
+ :return: the number of flat input terms of this Instance.
1145
+ :rtype: int
1146
+ """
1147
+ return sum(1 for _ in self.get_flat_input_terms())
1148
+
1099
1149
  def get_output_terms(self):
1100
1150
  """Iterate over all scalar output terms and bus output terms
1101
1151
  of this Instance.
@@ -1107,6 +1157,15 @@ class Instance:
1107
1157
  if term.getDirection() != naja.SNLTerm.Direction.Input:
1108
1158
  yield Term(self.pathIDs, term)
1109
1159
 
1160
+ def count_output_terms(self) -> int:
1161
+ """Count the number of scalar output terms and bus output terms
1162
+ of this Instance.
1163
+
1164
+ :return: the number of output terms of this Instance.
1165
+ :rtype: int
1166
+ """
1167
+ return sum(1 for _ in self.get_output_terms())
1168
+
1110
1169
  def get_flat_output_terms(self):
1111
1170
  """Iterate over all scalar output terms and bus output term bits
1112
1171
  of this Instance.
@@ -1122,6 +1181,15 @@ class Instance:
1122
1181
  else:
1123
1182
  yield Term(self.pathIDs, term)
1124
1183
 
1184
+ def count_flat_output_terms(self) -> int:
1185
+ """Count the number of scalar output terms and bus output term bits
1186
+ of this Instance.
1187
+
1188
+ :return: the number of flat output terms of this Instance.
1189
+ :rtype: int
1190
+ """
1191
+ return sum(1 for _ in self.get_flat_output_terms())
1192
+
1125
1193
  def get_attributes(self):
1126
1194
  """Iterate over the attributes of this Instance.
1127
1195
 
@@ -1477,3 +1545,17 @@ def get_model_name(id: tuple[int, int, int]) -> str:
1477
1545
  if model:
1478
1546
  return model.getName()
1479
1547
  return None
1548
+
1549
+
1550
+ def apply_dle():
1551
+ """Apply the DLE (Dead Logic Elimination) to the top design."""
1552
+ top = naja.NLUniverse.get().getTopDesign()
1553
+ if top is not None:
1554
+ naja.NLUniverse.get().applyDLE()
1555
+
1556
+
1557
+ def apply_constant_propagation():
1558
+ """Apply constant propagation to the top design."""
1559
+ top = naja.NLUniverse.get().getTopDesign()
1560
+ if top is not None:
1561
+ naja.NLUniverse.get().applyConstantPropagation()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: najaeda
3
- Version: 0.1.17
3
+ Version: 0.1.21
4
4
  Summary: Naja EDA Python package
5
5
  Author-Email: Naja Authors <contact@keplertech.io>
6
6
  License: Apache License 2.0
@@ -1,20 +1,15 @@
1
- najaeda-0.1.17.dist-info/RECORD,,
2
- najaeda-0.1.17.dist-info/WHEEL,sha256=gUcXopd-K2IKuDoaEe4uBUYaf2fjHRiHplXdACpNr9A,112
3
- najaeda-0.1.17.dist-info/METADATA,sha256=kOcF0pRa4WGiLp5MFPu1H2cfTeTz66ZaLNDuHVSmvWs,2475
4
- najaeda-0.1.17.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
5
- najaeda-0.1.17.dist-info/licenses/AUTHORS,sha256=7NYEGDAX_1QZvCCHfq8YVXC5ZbwH_pbNI8DcSmm70GU,377
6
- najaeda/netlist.py,sha256=f_lr0sbwk6NZbLWDfgCNqwqbIaxZxac0GA8JhTJ5DS4,50187
1
+ najaeda/netlist.py,sha256=vDzsRYZDM7svKEJHVquM-pyfIikALY-RkvLm6vm-MSM,52810
7
2
  najaeda/libnaja_nl.dylib,sha256=O1pfUil1jLkWu89X3JGpKyTwuVqmpsnwZDOESYqjqeU,713152
8
3
  najaeda/pandas_stats.py,sha256=yOb4ka965U7rN4D6AwvSGmRyeT_O7Ed-5cmT8BFbfeo,1070
9
4
  najaeda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- najaeda/naja.so,sha256=CUaXZt5Q5dUvyS-Y3oRUMiJlcljdW0NWgsAmR1HUNec,99440
5
+ najaeda/naja.so,sha256=wSN6dKKqhK3f77ylSjgItoT-5o52oVdM7I3C7ZdnZZw,99440
11
6
  najaeda/net_visitor.py,sha256=P_esjibYb-wBDuF-AyF7es9sJYw1Ha8RhTPu-qKe7G4,1940
12
- najaeda/libnaja_opt.dylib,sha256=-k7rJk_5L6nwKfBhgy3zAWU9GKdVjfp1r0iIx_K8mC0,190816
13
- najaeda/libnaja_python.dylib,sha256=MGD5pydoh4mRtpFnw_xgDqkTS1OlTDzZKF9CKRsDF6k,903808
7
+ najaeda/libnaja_opt.dylib,sha256=91kz37-SLpztC7x1F_VYZlddwzCBoNVaD6NqL7OL2GQ,190816
8
+ najaeda/libnaja_python.dylib,sha256=kDeCSvi4HEvtugixIvxrQxVmQlHdiiFVmrHrXuCxvCY,904240
14
9
  najaeda/stats.py,sha256=wackXsf0x24ic9v-UifECHj4t5yveUWssMDZp2B057A,16187
15
10
  najaeda/instance_visitor.py,sha256=JMsPSQaWNiDjxS05rxg83a0PIsrOIuTi9G35hkwdibs,1530
16
11
  najaeda/libnaja_bne.dylib,sha256=r9-g0qCILL6w_BgXYg62karCWloSPSpdNGEeS2Ey0Jk,134064
17
- najaeda/libnaja_dnl.dylib,sha256=kH9Jzdbvj14dlzSSU8hPctvWn6r1qBh6GYOdPWFwLBs,145840
12
+ najaeda/libnaja_dnl.dylib,sha256=zWsiT-RPDJz9koiDDUHqGNFzSFz7x2SmlIo5PTLkTUs,145936
18
13
  najaeda/native/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
14
  najaeda/native/stats.py,sha256=t50hhE9pEFNtlssjES0A-K9TsO_2ZSUAb-e9L3Rt6yc,13063
20
15
  najaeda/docs/requirements.txt,sha256=1XIBGTIplm2arC9HhDCfLuAjozGdVSXkqmOj8ybuT6U,121
@@ -38,3 +33,8 @@ najaeda/.dylibs/libtbb.12.15.dylib,sha256=MGGmYnvwo6PQYq7aVv_m2gKHBbOkAdwjPLJtYZ
38
33
  najaeda/.dylibs/libkj-1.1.0.dylib,sha256=pB7dMks8b8ybJ6xKWqFR_hHjKsmpf7wzbcunZaS7gO4,578320
39
34
  najaeda/primitives/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
35
  najaeda/primitives/xilinx.py,sha256=Ka-jlu-OxixEZ_yR_niXLHtaUL8HxT1Bg9H9Kpnr4ns,26551
36
+ najaeda-0.1.21.dist-info/RECORD,,
37
+ najaeda-0.1.21.dist-info/WHEEL,sha256=Bp5NfjQuMM_4-YV1MlnhqEfxPV5ySj3kUtyINz66rJc,112
38
+ najaeda-0.1.21.dist-info/METADATA,sha256=F9KxuiPDRio9g80RxoIDE7lwBcbAwk85-8GA5c5Mmxo,2475
39
+ najaeda-0.1.21.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
+ najaeda-0.1.21.dist-info/licenses/AUTHORS,sha256=7NYEGDAX_1QZvCCHfq8YVXC5ZbwH_pbNI8DcSmm70GU,377
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: scikit-build-core 0.11.4
2
+ Generator: scikit-build-core 0.11.5
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp39-cp39-macosx_11_0_arm64
5
5