najaeda 0.3.3__cp314-cp314-win_amd64.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/__init__.py +20 -0
- najaeda/_version.py +16 -0
- najaeda/docs/.readthedocs.yaml +26 -0
- najaeda/docs/requirements.txt +7 -0
- najaeda/docs/source/api.rst +7 -0
- najaeda/docs/source/common_classes.rst +11 -0
- najaeda/docs/source/conf.py +57 -0
- najaeda/docs/source/equipotential.rst +15 -0
- najaeda/docs/source/examples.rst.in +66 -0
- najaeda/docs/source/index.rst +17 -0
- najaeda/docs/source/instance.rst +34 -0
- najaeda/docs/source/introduction.rst +68 -0
- najaeda/docs/source/net.rst +20 -0
- najaeda/docs/source/netlist_classes.rst +11 -0
- najaeda/docs/source/preprocessor.py +73 -0
- najaeda/docs/source/term.rst +20 -0
- najaeda/docs/source/visitors.rst +13 -0
- najaeda/instance_visitor.py +43 -0
- najaeda/naja.pyd +0 -0
- najaeda/naja_bne.dll +0 -0
- najaeda/naja_dnl.dll +0 -0
- najaeda/naja_metrics.dll +0 -0
- najaeda/naja_nl.dll +0 -0
- najaeda/naja_opt.dll +0 -0
- najaeda/naja_python.dll +0 -0
- najaeda/native/__init__.py +0 -0
- najaeda/native/stats.py +341 -0
- najaeda/net_visitor.py +53 -0
- najaeda/netlist.py +1990 -0
- najaeda/pandas_stats.py +32 -0
- najaeda/primitives/__init__.py +0 -0
- najaeda/primitives/utils.py +19 -0
- najaeda/primitives/xilinx.py +541 -0
- najaeda/primitives/yosys.py +288 -0
- najaeda/stats.py +410 -0
- najaeda-0.3.3.dist-info/DELVEWHEEL +2 -0
- najaeda-0.3.3.dist-info/METADATA +108 -0
- najaeda-0.3.3.dist-info/RECORD +44 -0
- najaeda-0.3.3.dist-info/WHEEL +5 -0
- najaeda-0.3.3.dist-info/licenses/AUTHORS +7 -0
- najaeda-0.3.3.dist-info/licenses/LICENSE +201 -0
- najaeda.libs/msvcp140.dll +0 -0
- najaeda.libs/tbb12.dll +0 -0
- najaeda.libs/tbbmalloc.dll +0 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 The Naja authors <https://github.com/najaeda/naja/blob/main/AUTHORS>
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
from najaeda import naja
|
|
7
|
+
from . import utils
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def constructAND(lib):
|
|
11
|
+
and2 = naja.SNLDesign.createPrimitive(lib, "$_AND_")
|
|
12
|
+
naja.SNLScalarTerm.create(and2, naja.SNLTerm.Direction.Input, "A")
|
|
13
|
+
naja.SNLScalarTerm.create(and2, naja.SNLTerm.Direction.Input, "B")
|
|
14
|
+
naja.SNLScalarTerm.create(and2, naja.SNLTerm.Direction.Output, "Y")
|
|
15
|
+
and2.setTruthTable(0x8)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def constructOR(lib):
|
|
19
|
+
or2 = naja.SNLDesign.createPrimitive(lib, "$_OR_")
|
|
20
|
+
naja.SNLScalarTerm.create(or2, naja.SNLTerm.Direction.Input, "A")
|
|
21
|
+
naja.SNLScalarTerm.create(or2, naja.SNLTerm.Direction.Input, "B")
|
|
22
|
+
naja.SNLScalarTerm.create(or2, naja.SNLTerm.Direction.Output, "Y")
|
|
23
|
+
or2.setTruthTable(0xE)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def constructXOR(lib):
|
|
27
|
+
xor2 = naja.SNLDesign.createPrimitive(lib, "$_XOR_")
|
|
28
|
+
naja.SNLScalarTerm.create(xor2, naja.SNLTerm.Direction.Input, "A")
|
|
29
|
+
naja.SNLScalarTerm.create(xor2, naja.SNLTerm.Direction.Input, "B")
|
|
30
|
+
naja.SNLScalarTerm.create(xor2, naja.SNLTerm.Direction.Output, "Y")
|
|
31
|
+
xor2.setTruthTable(0x6)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def constructXNOR(lib):
|
|
35
|
+
xnor2 = naja.SNLDesign.createPrimitive(lib, "$_XNOR_")
|
|
36
|
+
naja.SNLScalarTerm.create(xnor2, naja.SNLTerm.Direction.Input, "A")
|
|
37
|
+
naja.SNLScalarTerm.create(xnor2, naja.SNLTerm.Direction.Input, "B")
|
|
38
|
+
naja.SNLScalarTerm.create(xnor2, naja.SNLTerm.Direction.Output, "Y")
|
|
39
|
+
xnor2.setTruthTable(0x9)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def constructMUX(lib):
|
|
43
|
+
mux2 = naja.SNLDesign.createPrimitive(lib, "$_MUX_")
|
|
44
|
+
naja.SNLScalarTerm.create(mux2, naja.SNLTerm.Direction.Input, "A")
|
|
45
|
+
naja.SNLScalarTerm.create(mux2, naja.SNLTerm.Direction.Input, "B")
|
|
46
|
+
naja.SNLScalarTerm.create(mux2, naja.SNLTerm.Direction.Input, "S")
|
|
47
|
+
naja.SNLScalarTerm.create(mux2, naja.SNLTerm.Direction.Output, "Y")
|
|
48
|
+
mux2.setTruthTable(0xCA)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def constructNOT(lib):
|
|
52
|
+
not_gate = naja.SNLDesign.createPrimitive(lib, "$_NOT_")
|
|
53
|
+
naja.SNLScalarTerm.create(not_gate, naja.SNLTerm.Direction.Input, "A")
|
|
54
|
+
naja.SNLScalarTerm.create(not_gate, naja.SNLTerm.Direction.Output, "Y")
|
|
55
|
+
not_gate.setTruthTable(0b01)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def constructDFFP(lib):
|
|
59
|
+
dffp = naja.SNLDesign.createPrimitive(lib, "$_DFF_P_")
|
|
60
|
+
c = naja.SNLScalarTerm.create(dffp, naja.SNLTerm.Direction.Input, "C")
|
|
61
|
+
naja.SNLScalarTerm.create(dffp, naja.SNLTerm.Direction.Input, "D")
|
|
62
|
+
naja.SNLScalarTerm.create(dffp, naja.SNLTerm.Direction.Output, "Q")
|
|
63
|
+
utils.constructSequentialPrimitive(dffp, c)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def constructDFFE_PP(lib):
|
|
67
|
+
dffe_pp = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PP_")
|
|
68
|
+
c = naja.SNLScalarTerm.create(dffe_pp, naja.SNLTerm.Direction.Input, "C")
|
|
69
|
+
naja.SNLScalarTerm.create(dffe_pp, naja.SNLTerm.Direction.Input, "D")
|
|
70
|
+
naja.SNLScalarTerm.create(dffe_pp, naja.SNLTerm.Direction.Input, "E")
|
|
71
|
+
naja.SNLScalarTerm.create(dffe_pp, naja.SNLTerm.Direction.Output, "Q")
|
|
72
|
+
utils.constructSequentialPrimitive(dffe_pp, c)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def constructDFFE_PN(lib):
|
|
76
|
+
dffe_pn = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PN_")
|
|
77
|
+
c = naja.SNLScalarTerm.create(dffe_pn, naja.SNLTerm.Direction.Input, "C")
|
|
78
|
+
naja.SNLScalarTerm.create(dffe_pn, naja.SNLTerm.Direction.Input, "D")
|
|
79
|
+
naja.SNLScalarTerm.create(dffe_pn, naja.SNLTerm.Direction.Input, "E")
|
|
80
|
+
naja.SNLScalarTerm.create(dffe_pn, naja.SNLTerm.Direction.Output, "Q")
|
|
81
|
+
utils.constructSequentialPrimitive(dffe_pn, c)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def constructDFF_PP0(lib):
|
|
85
|
+
dff_pp0 = naja.SNLDesign.createPrimitive(lib, "$_DFF_PP0_")
|
|
86
|
+
c = naja.SNLScalarTerm.create(dff_pp0, naja.SNLTerm.Direction.Input, "C")
|
|
87
|
+
naja.SNLScalarTerm.create(dff_pp0, naja.SNLTerm.Direction.Input, "D")
|
|
88
|
+
naja.SNLScalarTerm.create(dff_pp0, naja.SNLTerm.Direction.Output, "Q")
|
|
89
|
+
naja.SNLScalarTerm.create(dff_pp0, naja.SNLTerm.Direction.Input, "R")
|
|
90
|
+
utils.constructSequentialPrimitive(dff_pp0, c)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def constructDFF_PN0(lib):
|
|
94
|
+
dff_pn0 = naja.SNLDesign.createPrimitive(lib, "$_DFF_PN0_")
|
|
95
|
+
c = naja.SNLScalarTerm.create(dff_pn0, naja.SNLTerm.Direction.Input, "C")
|
|
96
|
+
naja.SNLScalarTerm.create(dff_pn0, naja.SNLTerm.Direction.Input, "D")
|
|
97
|
+
naja.SNLScalarTerm.create(dff_pn0, naja.SNLTerm.Direction.Output, "Q")
|
|
98
|
+
naja.SNLScalarTerm.create(dff_pn0, naja.SNLTerm.Direction.Input, "R")
|
|
99
|
+
utils.constructSequentialPrimitive(dff_pn0, c)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def constructDFF_PN1(lib):
|
|
103
|
+
dff_pn1 = naja.SNLDesign.createPrimitive(lib, "$_DFF_PN1_")
|
|
104
|
+
c = naja.SNLScalarTerm.create(dff_pn1, naja.SNLTerm.Direction.Input, "C")
|
|
105
|
+
naja.SNLScalarTerm.create(dff_pn1, naja.SNLTerm.Direction.Input, "D")
|
|
106
|
+
naja.SNLScalarTerm.create(dff_pn1, naja.SNLTerm.Direction.Output, "Q")
|
|
107
|
+
naja.SNLScalarTerm.create(dff_pn1, naja.SNLTerm.Direction.Input, "R")
|
|
108
|
+
utils.constructSequentialPrimitive(dff_pn1, c)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def constructDFF_PP1(lib):
|
|
112
|
+
dffe_pp1 = naja.SNLDesign.createPrimitive(lib, "$_DFF_PP1_")
|
|
113
|
+
c = naja.SNLScalarTerm.create(dffe_pp1, naja.SNLTerm.Direction.Input, "C")
|
|
114
|
+
naja.SNLScalarTerm.create(dffe_pp1, naja.SNLTerm.Direction.Input, "D")
|
|
115
|
+
naja.SNLScalarTerm.create(dffe_pp1, naja.SNLTerm.Direction.Output, "Q")
|
|
116
|
+
naja.SNLScalarTerm.create(dffe_pp1, naja.SNLTerm.Direction.Input, "R")
|
|
117
|
+
utils.constructSequentialPrimitive(dffe_pp1, c)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def constructDFFE_PP0P(lib):
|
|
121
|
+
dffe_pp0p = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PP0P_")
|
|
122
|
+
c = naja.SNLScalarTerm.create(dffe_pp0p, naja.SNLTerm.Direction.Input, "C")
|
|
123
|
+
naja.SNLScalarTerm.create(dffe_pp0p, naja.SNLTerm.Direction.Input, "D")
|
|
124
|
+
naja.SNLScalarTerm.create(dffe_pp0p, naja.SNLTerm.Direction.Input, "E")
|
|
125
|
+
naja.SNLScalarTerm.create(dffe_pp0p, naja.SNLTerm.Direction.Output, "Q")
|
|
126
|
+
naja.SNLScalarTerm.create(dffe_pp0p, naja.SNLTerm.Direction.Input, "R")
|
|
127
|
+
utils.constructSequentialPrimitive(dffe_pp0p, c)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def constructDFFE_PP1P(lib):
|
|
131
|
+
dffe_pp1p = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PP1P_")
|
|
132
|
+
c = naja.SNLScalarTerm.create(dffe_pp1p, naja.SNLTerm.Direction.Input, "C")
|
|
133
|
+
naja.SNLScalarTerm.create(dffe_pp1p, naja.SNLTerm.Direction.Input, "D")
|
|
134
|
+
naja.SNLScalarTerm.create(dffe_pp1p, naja.SNLTerm.Direction.Input, "E")
|
|
135
|
+
naja.SNLScalarTerm.create(dffe_pp1p, naja.SNLTerm.Direction.Output, "Q")
|
|
136
|
+
naja.SNLScalarTerm.create(dffe_pp1p, naja.SNLTerm.Direction.Input, "R")
|
|
137
|
+
utils.constructSequentialPrimitive(dffe_pp1p, c)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def constructDFFE_PP0N(lib):
|
|
141
|
+
dffe_pp0n = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PP0N_")
|
|
142
|
+
c = naja.SNLScalarTerm.create(dffe_pp0n, naja.SNLTerm.Direction.Input, "C")
|
|
143
|
+
naja.SNLScalarTerm.create(dffe_pp0n, naja.SNLTerm.Direction.Input, "D")
|
|
144
|
+
naja.SNLScalarTerm.create(dffe_pp0n, naja.SNLTerm.Direction.Input, "E")
|
|
145
|
+
naja.SNLScalarTerm.create(dffe_pp0n, naja.SNLTerm.Direction.Output, "Q")
|
|
146
|
+
naja.SNLScalarTerm.create(dffe_pp0n, naja.SNLTerm.Direction.Input, "R")
|
|
147
|
+
utils.constructSequentialPrimitive(dffe_pp0n, c)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def constructDFFE_PN0P(lib):
|
|
151
|
+
dffe_pn0p = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PN0P_")
|
|
152
|
+
c = naja.SNLScalarTerm.create(dffe_pn0p, naja.SNLTerm.Direction.Input, "C")
|
|
153
|
+
naja.SNLScalarTerm.create(dffe_pn0p, naja.SNLTerm.Direction.Input, "D")
|
|
154
|
+
naja.SNLScalarTerm.create(dffe_pn0p, naja.SNLTerm.Direction.Input, "E")
|
|
155
|
+
naja.SNLScalarTerm.create(dffe_pn0p, naja.SNLTerm.Direction.Output, "Q")
|
|
156
|
+
naja.SNLScalarTerm.create(dffe_pn0p, naja.SNLTerm.Direction.Input, "R")
|
|
157
|
+
utils.constructSequentialPrimitive(dffe_pn0p, c)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def constructDFFE_PN0N(lib):
|
|
161
|
+
dffe_pn0n = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PN0N_")
|
|
162
|
+
c = naja.SNLScalarTerm.create(dffe_pn0n, naja.SNLTerm.Direction.Input, "C")
|
|
163
|
+
naja.SNLScalarTerm.create(dffe_pn0n, naja.SNLTerm.Direction.Input, "D")
|
|
164
|
+
naja.SNLScalarTerm.create(dffe_pn0n, naja.SNLTerm.Direction.Input, "E")
|
|
165
|
+
naja.SNLScalarTerm.create(dffe_pn0n, naja.SNLTerm.Direction.Output, "Q")
|
|
166
|
+
naja.SNLScalarTerm.create(dffe_pn0n, naja.SNLTerm.Direction.Input, "R")
|
|
167
|
+
utils.constructSequentialPrimitive(dffe_pn0n, c)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def constructDFFE_PN1P(lib):
|
|
171
|
+
dffe_pn1p = naja.SNLDesign.createPrimitive(lib, "$_DFFE_PN1P_")
|
|
172
|
+
c = naja.SNLScalarTerm.create(dffe_pn1p, naja.SNLTerm.Direction.Input, "C")
|
|
173
|
+
naja.SNLScalarTerm.create(dffe_pn1p, naja.SNLTerm.Direction.Input, "D")
|
|
174
|
+
naja.SNLScalarTerm.create(dffe_pn1p, naja.SNLTerm.Direction.Input, "E")
|
|
175
|
+
naja.SNLScalarTerm.create(dffe_pn1p, naja.SNLTerm.Direction.Output, "Q")
|
|
176
|
+
naja.SNLScalarTerm.create(dffe_pn1p, naja.SNLTerm.Direction.Input, "R")
|
|
177
|
+
utils.constructSequentialPrimitive(dffe_pn1p, c)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def constructSDFF_PP0(lib):
|
|
181
|
+
sdff_pp0 = naja.SNLDesign.createPrimitive(lib, "$_SDFF_PP0_")
|
|
182
|
+
c = naja.SNLScalarTerm.create(sdff_pp0, naja.SNLTerm.Direction.Input, "C")
|
|
183
|
+
naja.SNLScalarTerm.create(sdff_pp0, naja.SNLTerm.Direction.Input, "D")
|
|
184
|
+
naja.SNLScalarTerm.create(sdff_pp0, naja.SNLTerm.Direction.Output, "Q")
|
|
185
|
+
naja.SNLScalarTerm.create(sdff_pp0, naja.SNLTerm.Direction.Input, "R")
|
|
186
|
+
utils.constructSequentialPrimitive(sdff_pp0, c)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def constructSDFFE_PP0N(lib):
|
|
190
|
+
sdffe_pp0n = naja.SNLDesign.createPrimitive(lib, "$_SDFFE_PP0N_")
|
|
191
|
+
c = naja.SNLScalarTerm.create(sdffe_pp0n, naja.SNLTerm.Direction.Input, "C")
|
|
192
|
+
naja.SNLScalarTerm.create(sdffe_pp0n, naja.SNLTerm.Direction.Input, "D")
|
|
193
|
+
naja.SNLScalarTerm.create(sdffe_pp0n, naja.SNLTerm.Direction.Input, "E")
|
|
194
|
+
naja.SNLScalarTerm.create(sdffe_pp0n, naja.SNLTerm.Direction.Output, "Q")
|
|
195
|
+
naja.SNLScalarTerm.create(sdffe_pp0n, naja.SNLTerm.Direction.Input, "R")
|
|
196
|
+
utils.constructSequentialPrimitive(sdffe_pp0n, c)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def constructSDFFE_PN0P(lib):
|
|
200
|
+
sdffe_pn0p = naja.SNLDesign.createPrimitive(lib, "$_SDFFE_PN0P_")
|
|
201
|
+
c = naja.SNLScalarTerm.create(sdffe_pn0p, naja.SNLTerm.Direction.Input, "C")
|
|
202
|
+
naja.SNLScalarTerm.create(sdffe_pn0p, naja.SNLTerm.Direction.Input, "D")
|
|
203
|
+
naja.SNLScalarTerm.create(sdffe_pn0p, naja.SNLTerm.Direction.Input, "E")
|
|
204
|
+
naja.SNLScalarTerm.create(sdffe_pn0p, naja.SNLTerm.Direction.Output, "Q")
|
|
205
|
+
naja.SNLScalarTerm.create(sdffe_pn0p, naja.SNLTerm.Direction.Input, "R")
|
|
206
|
+
utils.constructSequentialPrimitive(sdffe_pn0p, c)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def constructSDFFE_PN0N(lib):
|
|
210
|
+
sdffe_pn0n = naja.SNLDesign.createPrimitive(lib, "$_SDFFE_PN0N_")
|
|
211
|
+
c = naja.SNLScalarTerm.create(sdffe_pn0n, naja.SNLTerm.Direction.Input, "C")
|
|
212
|
+
naja.SNLScalarTerm.create(sdffe_pn0n, naja.SNLTerm.Direction.Input, "D")
|
|
213
|
+
naja.SNLScalarTerm.create(sdffe_pn0n, naja.SNLTerm.Direction.Input, "E")
|
|
214
|
+
naja.SNLScalarTerm.create(sdffe_pn0n, naja.SNLTerm.Direction.Output, "Q")
|
|
215
|
+
naja.SNLScalarTerm.create(sdffe_pn0n, naja.SNLTerm.Direction.Input, "R")
|
|
216
|
+
utils.constructSequentialPrimitive(sdffe_pn0n, c)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def constructSDFFCE_PP0P(lib):
|
|
220
|
+
sdffce_pp0p = naja.SNLDesign.createPrimitive(lib, "$_SDFFCE_PP0P_")
|
|
221
|
+
c = naja.SNLScalarTerm.create(sdffce_pp0p, naja.SNLTerm.Direction.Input, "C")
|
|
222
|
+
naja.SNLScalarTerm.create(sdffce_pp0p, naja.SNLTerm.Direction.Input, "D")
|
|
223
|
+
naja.SNLScalarTerm.create(sdffce_pp0p, naja.SNLTerm.Direction.Input, "E")
|
|
224
|
+
naja.SNLScalarTerm.create(sdffce_pp0p, naja.SNLTerm.Direction.Output, "Q")
|
|
225
|
+
naja.SNLScalarTerm.create(sdffce_pp0p, naja.SNLTerm.Direction.Input, "R")
|
|
226
|
+
utils.constructSequentialPrimitive(sdffce_pp0p, c)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
def constructSDFFCE_PP1P(lib):
|
|
230
|
+
sdffce_pp1p = naja.SNLDesign.createPrimitive(lib, "$_SDFFCE_PP1P_")
|
|
231
|
+
c = naja.SNLScalarTerm.create(sdffce_pp1p, naja.SNLTerm.Direction.Input, "C")
|
|
232
|
+
naja.SNLScalarTerm.create(sdffce_pp1p, naja.SNLTerm.Direction.Input, "D")
|
|
233
|
+
naja.SNLScalarTerm.create(sdffce_pp1p, naja.SNLTerm.Direction.Input, "E")
|
|
234
|
+
naja.SNLScalarTerm.create(sdffce_pp1p, naja.SNLTerm.Direction.Output, "Q")
|
|
235
|
+
naja.SNLScalarTerm.create(sdffce_pp1p, naja.SNLTerm.Direction.Input, "R")
|
|
236
|
+
utils.constructSequentialPrimitive(sdffce_pp1p, c)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def constructSDFFCE_PN0N(lib):
|
|
240
|
+
sdffce_pn0n = naja.SNLDesign.createPrimitive(lib, "$_SDFFCE_PN0N_")
|
|
241
|
+
c = naja.SNLScalarTerm.create(sdffce_pn0n, naja.SNLTerm.Direction.Input, "C")
|
|
242
|
+
naja.SNLScalarTerm.create(sdffce_pn0n, naja.SNLTerm.Direction.Input, "D")
|
|
243
|
+
naja.SNLScalarTerm.create(sdffce_pn0n, naja.SNLTerm.Direction.Input, "E")
|
|
244
|
+
naja.SNLScalarTerm.create(sdffce_pn0n, naja.SNLTerm.Direction.Output, "Q")
|
|
245
|
+
naja.SNLScalarTerm.create(sdffce_pn0n, naja.SNLTerm.Direction.Input, "R")
|
|
246
|
+
utils.constructSequentialPrimitive(sdffce_pn0n, c)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def constructSDFFCE_PN1P(lib):
|
|
250
|
+
sdffce_pn1p = naja.SNLDesign.createPrimitive(lib, "$_SDFFCE_PN1P_")
|
|
251
|
+
c = naja.SNLScalarTerm.create(sdffce_pn1p, naja.SNLTerm.Direction.Input, "C")
|
|
252
|
+
naja.SNLScalarTerm.create(sdffce_pn1p, naja.SNLTerm.Direction.Input, "D")
|
|
253
|
+
naja.SNLScalarTerm.create(sdffce_pn1p, naja.SNLTerm.Direction.Input, "E")
|
|
254
|
+
naja.SNLScalarTerm.create(sdffce_pn1p, naja.SNLTerm.Direction.Output, "Q")
|
|
255
|
+
naja.SNLScalarTerm.create(sdffce_pn1p, naja.SNLTerm.Direction.Input, "R")
|
|
256
|
+
utils.constructSequentialPrimitive(sdffce_pn1p, c)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
def load(db):
|
|
260
|
+
logging.info("Loading Yosys primitives")
|
|
261
|
+
lib = naja.NLLibrary.createPrimitives(db, "yosys")
|
|
262
|
+
constructAND(lib)
|
|
263
|
+
constructOR(lib)
|
|
264
|
+
constructXOR(lib)
|
|
265
|
+
constructXNOR(lib)
|
|
266
|
+
constructMUX(lib)
|
|
267
|
+
constructNOT(lib)
|
|
268
|
+
constructDFFP(lib)
|
|
269
|
+
constructDFFE_PP(lib)
|
|
270
|
+
constructDFFE_PN(lib)
|
|
271
|
+
constructDFF_PP0(lib)
|
|
272
|
+
constructDFF_PN0(lib)
|
|
273
|
+
constructDFF_PN1(lib)
|
|
274
|
+
constructDFF_PP1(lib)
|
|
275
|
+
constructDFFE_PP0P(lib)
|
|
276
|
+
constructDFFE_PP1P(lib)
|
|
277
|
+
constructDFFE_PP0N(lib)
|
|
278
|
+
constructDFFE_PN0P(lib)
|
|
279
|
+
constructDFFE_PN0N(lib)
|
|
280
|
+
constructDFFE_PN1P(lib)
|
|
281
|
+
constructSDFF_PP0(lib)
|
|
282
|
+
constructSDFFE_PP0N(lib)
|
|
283
|
+
constructSDFFE_PN0P(lib)
|
|
284
|
+
constructSDFFE_PN0N(lib)
|
|
285
|
+
constructSDFFCE_PP0P(lib)
|
|
286
|
+
constructSDFFCE_PP1P(lib)
|
|
287
|
+
constructSDFFCE_PN0N(lib)
|
|
288
|
+
constructSDFFCE_PN1P(lib)
|