najaeda 0.1.15__cp313-cp313t-macosx_11_0_arm64.whl → 0.1.17__cp313-cp313t-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.
Potentially problematic release.
This version of najaeda might be problematic. Click here for more details.
- najaeda/.dylibs/libtbb.12.15.dylib +0 -0
- najaeda/.dylibs/libtbbmalloc.2.15.dylib +0 -0
- najaeda/libnaja_bne.dylib +0 -0
- najaeda/libnaja_dnl.dylib +0 -0
- najaeda/libnaja_nl.dylib +0 -0
- najaeda/libnaja_opt.dylib +0 -0
- najaeda/libnaja_python.dylib +0 -0
- najaeda/{snl.so → naja.so} +0 -0
- najaeda/native/stats.py +4 -4
- najaeda/netlist.py +156 -132
- najaeda/primitives/xilinx.py +337 -337
- {najaeda-0.1.15.dist-info → najaeda-0.1.17.dist-info}/METADATA +2 -2
- {najaeda-0.1.15.dist-info → najaeda-0.1.17.dist-info}/RECORD +16 -11
- {najaeda-0.1.15.dist-info → najaeda-0.1.17.dist-info}/WHEEL +1 -1
- najaeda/libnaja_snl.dylib +0 -0
- najaeda/libnaja_snl_python.dylib +0 -0
- {najaeda-0.1.15.dist-info → najaeda-0.1.17.dist-info}/licenses/AUTHORS +0 -0
- {najaeda-0.1.15.dist-info → najaeda-0.1.17.dist-info}/licenses/LICENSE +0 -0
najaeda/primitives/xilinx.py
CHANGED
|
@@ -3,432 +3,432 @@
|
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
5
|
import logging
|
|
6
|
-
from najaeda import
|
|
6
|
+
from najaeda import naja
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def constructIBUF(lib):
|
|
10
|
-
ibuf =
|
|
11
|
-
i =
|
|
12
|
-
o =
|
|
10
|
+
ibuf = naja.SNLDesign.createPrimitive(lib, "IBUF")
|
|
11
|
+
i = naja.SNLScalarTerm.create(ibuf, naja.SNLTerm.Direction.Input, "I")
|
|
12
|
+
o = naja.SNLScalarTerm.create(ibuf, naja.SNLTerm.Direction.Output, "O")
|
|
13
13
|
ibuf.addCombinatorialArcs(i, o)
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def constructOBUF(lib):
|
|
17
|
-
obuf =
|
|
18
|
-
i =
|
|
19
|
-
o =
|
|
17
|
+
obuf = naja.SNLDesign.createPrimitive(lib, "OBUF")
|
|
18
|
+
i = naja.SNLScalarTerm.create(obuf, naja.SNLTerm.Direction.Input, "I")
|
|
19
|
+
o = naja.SNLScalarTerm.create(obuf, naja.SNLTerm.Direction.Output, "O")
|
|
20
20
|
obuf.addCombinatorialArcs(i, o)
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def constructBUFG(lib):
|
|
24
|
-
bufg =
|
|
25
|
-
i =
|
|
26
|
-
o =
|
|
24
|
+
bufg = naja.SNLDesign.createPrimitive(lib, "BUFG")
|
|
25
|
+
i = naja.SNLScalarTerm.create(bufg, naja.SNLTerm.Direction.Input, "I")
|
|
26
|
+
o = naja.SNLScalarTerm.create(bufg, naja.SNLTerm.Direction.Output, "O")
|
|
27
27
|
bufg.addCombinatorialArcs(i, o)
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def constructDSP48E1(lib):
|
|
31
|
-
dsp48e1 =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
31
|
+
dsp48e1 = naja.SNLDesign.createPrimitive(lib, "DSP48E1")
|
|
32
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, 29, 0, "ACOUT")
|
|
33
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, 17, 0, "BCOUT")
|
|
34
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, "CARRYCASCOUT")
|
|
35
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "MULTSIGNOUT")
|
|
36
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 47, 0, "PCOUT")
|
|
37
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, "OVERFLOW")
|
|
38
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, "PATTERNBDETECT")
|
|
39
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, "PATTERNDETECT")
|
|
40
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, "UNDERFLOW")
|
|
41
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, 3, 0, "CARRYOUT")
|
|
42
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Output, 47, 0, "P")
|
|
43
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 29, 0, "ACIN")
|
|
44
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 17, 0, "BCIN")
|
|
45
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CARRYCASCIN")
|
|
46
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "MULTSIGNIN")
|
|
47
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 47, 0, "PCIN")
|
|
48
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 3, 0, "ALUMODE")
|
|
49
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 2, 0, "CARRYINSEL")
|
|
50
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CLK")
|
|
51
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 4, 0, "INMODE")
|
|
52
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 6, 0, "OPMODE")
|
|
53
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 29, 0, "A")
|
|
54
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 17, 0, "B")
|
|
55
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 47, 0, "C")
|
|
56
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CARRYIN")
|
|
57
|
+
naja.SNLBusTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, 24, 0, "D")
|
|
58
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEA1")
|
|
59
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEA2")
|
|
60
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEAD")
|
|
61
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEALUMODE")
|
|
62
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEB1")
|
|
63
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEB2")
|
|
64
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEC")
|
|
65
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CECARRYIN")
|
|
66
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CECTRL")
|
|
67
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CED")
|
|
68
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEINMODE")
|
|
69
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEM")
|
|
70
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "CEP")
|
|
71
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTA")
|
|
72
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTALLCARRYIN")
|
|
73
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTALUMODE")
|
|
74
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTB")
|
|
75
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTC")
|
|
76
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTCTRL")
|
|
77
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTD")
|
|
78
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTINMODE")
|
|
79
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTM")
|
|
80
|
+
naja.SNLScalarTerm.create(dsp48e1, naja.SNLTerm.Direction.Input, "RSTP")
|
|
81
|
+
naja.SNLParameter.create_decimal(dsp48e1, "ACASCREG", 1)
|
|
82
|
+
naja.SNLParameter.create_decimal(dsp48e1, "ADREG", 1)
|
|
83
|
+
naja.SNLParameter.create_string(dsp48e1, "A_INPUT", "DIRECT")
|
|
84
|
+
naja.SNLParameter.create_decimal(dsp48e1, "ALUMODEREG", 1)
|
|
85
|
+
naja.SNLParameter.create_decimal(dsp48e1, "AREG", 1)
|
|
86
|
+
naja.SNLParameter.create_decimal(dsp48e1, "BCASCREG", 1)
|
|
87
|
+
naja.SNLParameter.create_string(dsp48e1, "B_INPUT", "DIRECT")
|
|
88
|
+
naja.SNLParameter.create_decimal(dsp48e1, "BREG", 1)
|
|
89
|
+
naja.SNLParameter.create_decimal(dsp48e1, "CARRYINREG", 1)
|
|
90
|
+
naja.SNLParameter.create_decimal(dsp48e1, "CARRYINSELREG", 1)
|
|
91
|
+
naja.SNLParameter.create_decimal(dsp48e1, "CREG", 1)
|
|
92
|
+
naja.SNLParameter.create_decimal(dsp48e1, "DREG", 1)
|
|
93
|
+
naja.SNLParameter.create_decimal(dsp48e1, "INMODEREG", 1)
|
|
94
|
+
naja.SNLParameter.create_decimal(dsp48e1, "MREG", 1)
|
|
95
|
+
naja.SNLParameter.create_decimal(dsp48e1, "OPMODEREG", 1)
|
|
96
|
+
naja.SNLParameter.create_decimal(dsp48e1, "PREG", 1)
|
|
97
|
+
naja.SNLParameter.create_boolean(dsp48e1, "USE_DPORT", False)
|
|
98
|
+
naja.SNLParameter.create_string(dsp48e1, "USE_MULT", "MULTIPLY")
|
|
99
|
+
naja.SNLParameter.create_string(dsp48e1, "USE_SIMD", "ONE48")
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
def constructINV(lib):
|
|
103
|
-
inv =
|
|
104
|
-
i =
|
|
105
|
-
o =
|
|
106
|
-
|
|
103
|
+
inv = naja.SNLDesign.createPrimitive(lib, "INV")
|
|
104
|
+
i = naja.SNLScalarTerm.create(inv, naja.SNLTerm.Direction.Input, "I")
|
|
105
|
+
o = naja.SNLScalarTerm.create(inv, naja.SNLTerm.Direction.Output, "O")
|
|
106
|
+
naja.SNLDesign.addCombinatorialArcs(i, o)
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
def constructCARRY4(lib):
|
|
110
|
-
carry4 =
|
|
111
|
-
o =
|
|
112
|
-
co =
|
|
113
|
-
di =
|
|
114
|
-
s =
|
|
115
|
-
cyinit =
|
|
116
|
-
ci =
|
|
110
|
+
carry4 = naja.SNLDesign.createPrimitive(lib, "CARRY4")
|
|
111
|
+
o = naja.SNLBusTerm.create(carry4, naja.SNLTerm.Direction.Output, 3, 0, "O")
|
|
112
|
+
co = naja.SNLBusTerm.create(carry4, naja.SNLTerm.Direction.Output, 3, 0, "CO")
|
|
113
|
+
di = naja.SNLBusTerm.create(carry4, naja.SNLTerm.Direction.Input, 3, 0, "DI")
|
|
114
|
+
s = naja.SNLBusTerm.create(carry4, naja.SNLTerm.Direction.Input, 3, 0, "S")
|
|
115
|
+
cyinit = naja.SNLScalarTerm.create(carry4, naja.SNLTerm.Direction.Input, "CYINIT")
|
|
116
|
+
ci = naja.SNLScalarTerm.create(carry4, naja.SNLTerm.Direction.Input, "CI")
|
|
117
117
|
o_bits = [b for b in o.getBits()]
|
|
118
118
|
co_bits = [b for b in co.getBits()]
|
|
119
119
|
di_bits = [b for b in di.getBits()]
|
|
120
120
|
s_bits = [b for b in s.getBits()]
|
|
121
121
|
# cyinit and ci are in combinatorial dependency with o and co outputs
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
naja.SNLDesign.addCombinatorialArcs([cyinit, ci], [o, co])
|
|
123
|
+
naja.SNLDesign.addCombinatorialArcs(s_bits[0], [o, co])
|
|
124
|
+
naja.SNLDesign.addCombinatorialArcs(s_bits[1], [o_bits[1], o_bits[2], o_bits[3]])
|
|
125
|
+
naja.SNLDesign.addCombinatorialArcs(s_bits[1], [co_bits[1], co_bits[2], co_bits[3]])
|
|
126
|
+
naja.SNLDesign.addCombinatorialArcs(s_bits[2], [o_bits[2], o_bits[3]])
|
|
127
|
+
naja.SNLDesign.addCombinatorialArcs(s_bits[2], [co_bits[2], co_bits[3]])
|
|
128
|
+
naja.SNLDesign.addCombinatorialArcs(s_bits[3], o_bits[3])
|
|
129
|
+
naja.SNLDesign.addCombinatorialArcs(s_bits[3], co_bits[3])
|
|
130
|
+
naja.SNLDesign.addCombinatorialArcs(di_bits[0], [o_bits[1], o_bits[2], o_bits[3]])
|
|
131
|
+
naja.SNLDesign.addCombinatorialArcs(di_bits[0], co)
|
|
132
|
+
naja.SNLDesign.addCombinatorialArcs(di_bits[1], [o_bits[2], o_bits[3]])
|
|
133
|
+
naja.SNLDesign.addCombinatorialArcs(di_bits[1], [co_bits[1], co_bits[2], co_bits[3]])
|
|
134
|
+
naja.SNLDesign.addCombinatorialArcs(di_bits[2], o_bits[3])
|
|
135
|
+
naja.SNLDesign.addCombinatorialArcs(di_bits[2], [co_bits[2], co_bits[3]])
|
|
136
|
+
naja.SNLDesign.addCombinatorialArcs(di_bits[3], co_bits[3])
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
def constructLUT1(lib):
|
|
140
|
-
lut1 =
|
|
141
|
-
i0 =
|
|
142
|
-
o =
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
lut1 = naja.SNLDesign.createPrimitive(lib, "LUT1")
|
|
141
|
+
i0 = naja.SNLScalarTerm.create(lut1, naja.SNLTerm.Direction.Input, "I0")
|
|
142
|
+
o = naja.SNLScalarTerm.create(lut1, naja.SNLTerm.Direction.Output, "O")
|
|
143
|
+
naja.SNLDesign.addCombinatorialArcs(i0, o)
|
|
144
|
+
naja.SNLParameter.create_binary(lut1, "INIT", 2, 0b00)
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
def constructLUT2(lib):
|
|
148
|
-
lut2 =
|
|
149
|
-
i0 =
|
|
150
|
-
i1 =
|
|
151
|
-
o =
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
lut2 = naja.SNLDesign.createPrimitive(lib, "LUT2")
|
|
149
|
+
i0 = naja.SNLScalarTerm.create(lut2, naja.SNLTerm.Direction.Input, "I0")
|
|
150
|
+
i1 = naja.SNLScalarTerm.create(lut2, naja.SNLTerm.Direction.Input, "I1")
|
|
151
|
+
o = naja.SNLScalarTerm.create(lut2, naja.SNLTerm.Direction.Output, "O")
|
|
152
|
+
naja.SNLDesign.addCombinatorialArcs([i0, i1], o)
|
|
153
|
+
naja.SNLParameter.create_binary(lut2, "INIT", 4, 0x0)
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
def constructLUT3(lib):
|
|
157
|
-
lut3 =
|
|
158
|
-
i0 =
|
|
159
|
-
i1 =
|
|
160
|
-
i2 =
|
|
161
|
-
o =
|
|
162
|
-
|
|
163
|
-
|
|
157
|
+
lut3 = naja.SNLDesign.createPrimitive(lib, "LUT3")
|
|
158
|
+
i0 = naja.SNLScalarTerm.create(lut3, naja.SNLTerm.Direction.Input, "I0")
|
|
159
|
+
i1 = naja.SNLScalarTerm.create(lut3, naja.SNLTerm.Direction.Input, "I1")
|
|
160
|
+
i2 = naja.SNLScalarTerm.create(lut3, naja.SNLTerm.Direction.Input, "I2")
|
|
161
|
+
o = naja.SNLScalarTerm.create(lut3, naja.SNLTerm.Direction.Output, "O")
|
|
162
|
+
naja.SNLDesign.addCombinatorialArcs([i0, i1, i2], o)
|
|
163
|
+
naja.SNLParameter.create_binary(lut3, "INIT", 8, 0x00)
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
def constructLUT4(lib):
|
|
167
|
-
lut4 =
|
|
168
|
-
i0 =
|
|
169
|
-
i1 =
|
|
170
|
-
i2 =
|
|
171
|
-
i3 =
|
|
172
|
-
o =
|
|
173
|
-
|
|
174
|
-
|
|
167
|
+
lut4 = naja.SNLDesign.createPrimitive(lib, "LUT4")
|
|
168
|
+
i0 = naja.SNLScalarTerm.create(lut4, naja.SNLTerm.Direction.Input, "I0")
|
|
169
|
+
i1 = naja.SNLScalarTerm.create(lut4, naja.SNLTerm.Direction.Input, "I1")
|
|
170
|
+
i2 = naja.SNLScalarTerm.create(lut4, naja.SNLTerm.Direction.Input, "I2")
|
|
171
|
+
i3 = naja.SNLScalarTerm.create(lut4, naja.SNLTerm.Direction.Input, "I3")
|
|
172
|
+
o = naja.SNLScalarTerm.create(lut4, naja.SNLTerm.Direction.Output, "O")
|
|
173
|
+
naja.SNLDesign.addCombinatorialArcs([i0, i1, i2, i3], o)
|
|
174
|
+
naja.SNLParameter.create_binary(lut4, "INIT", 16, 0x0000)
|
|
175
175
|
|
|
176
176
|
|
|
177
177
|
def constructLUT5(lib):
|
|
178
|
-
lut5 =
|
|
179
|
-
i0 =
|
|
180
|
-
i1 =
|
|
181
|
-
i2 =
|
|
182
|
-
i3 =
|
|
183
|
-
i4 =
|
|
184
|
-
o =
|
|
185
|
-
|
|
186
|
-
|
|
178
|
+
lut5 = naja.SNLDesign.createPrimitive(lib, "LUT5")
|
|
179
|
+
i0 = naja.SNLScalarTerm.create(lut5, naja.SNLTerm.Direction.Input, "I0")
|
|
180
|
+
i1 = naja.SNLScalarTerm.create(lut5, naja.SNLTerm.Direction.Input, "I1")
|
|
181
|
+
i2 = naja.SNLScalarTerm.create(lut5, naja.SNLTerm.Direction.Input, "I2")
|
|
182
|
+
i3 = naja.SNLScalarTerm.create(lut5, naja.SNLTerm.Direction.Input, "I3")
|
|
183
|
+
i4 = naja.SNLScalarTerm.create(lut5, naja.SNLTerm.Direction.Input, "I4")
|
|
184
|
+
o = naja.SNLScalarTerm.create(lut5, naja.SNLTerm.Direction.Output, "O")
|
|
185
|
+
naja.SNLDesign.addCombinatorialArcs([i0, i1, i2, i3, i4], o)
|
|
186
|
+
naja.SNLParameter.create_binary(lut5, "INIT", 32, 0x00000000)
|
|
187
187
|
|
|
188
188
|
|
|
189
189
|
def constructLUT6(lib):
|
|
190
|
-
lut6 =
|
|
191
|
-
i0 =
|
|
192
|
-
i1 =
|
|
193
|
-
i2 =
|
|
194
|
-
i3 =
|
|
195
|
-
i4 =
|
|
196
|
-
i5 =
|
|
197
|
-
o =
|
|
198
|
-
|
|
199
|
-
|
|
190
|
+
lut6 = naja.SNLDesign.createPrimitive(lib, "LUT6")
|
|
191
|
+
i0 = naja.SNLScalarTerm.create(lut6, naja.SNLTerm.Direction.Input, "I0")
|
|
192
|
+
i1 = naja.SNLScalarTerm.create(lut6, naja.SNLTerm.Direction.Input, "I1")
|
|
193
|
+
i2 = naja.SNLScalarTerm.create(lut6, naja.SNLTerm.Direction.Input, "I2")
|
|
194
|
+
i3 = naja.SNLScalarTerm.create(lut6, naja.SNLTerm.Direction.Input, "I3")
|
|
195
|
+
i4 = naja.SNLScalarTerm.create(lut6, naja.SNLTerm.Direction.Input, "I4")
|
|
196
|
+
i5 = naja.SNLScalarTerm.create(lut6, naja.SNLTerm.Direction.Input, "I5")
|
|
197
|
+
o = naja.SNLScalarTerm.create(lut6, naja.SNLTerm.Direction.Output, "O")
|
|
198
|
+
naja.SNLDesign.addCombinatorialArcs([i0, i1, i2, i3, i4, i5], o)
|
|
199
|
+
naja.SNLParameter.create_binary(lut6, "INIT", 64, 0x0000000000000000)
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
def constructMUXF7(lib):
|
|
203
|
-
muxf7 =
|
|
204
|
-
i0 =
|
|
205
|
-
i1 =
|
|
206
|
-
o =
|
|
207
|
-
s =
|
|
208
|
-
|
|
203
|
+
muxf7 = naja.SNLDesign.createPrimitive(lib, "MUXF7")
|
|
204
|
+
i0 = naja.SNLScalarTerm.create(muxf7, naja.SNLTerm.Direction.Input, "I0")
|
|
205
|
+
i1 = naja.SNLScalarTerm.create(muxf7, naja.SNLTerm.Direction.Input, "I1")
|
|
206
|
+
o = naja.SNLScalarTerm.create(muxf7, naja.SNLTerm.Direction.Output, "O")
|
|
207
|
+
s = naja.SNLScalarTerm.create(muxf7, naja.SNLTerm.Direction.Input, "S")
|
|
208
|
+
naja.SNLDesign.addCombinatorialArcs([i0, i1, s], o)
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
def constructMUXF8(lib):
|
|
212
|
-
muxf8 =
|
|
213
|
-
i0 =
|
|
214
|
-
i1 =
|
|
215
|
-
o =
|
|
216
|
-
s =
|
|
217
|
-
|
|
212
|
+
muxf8 = naja.SNLDesign.createPrimitive(lib, "MUXF8")
|
|
213
|
+
i0 = naja.SNLScalarTerm.create(muxf8, naja.SNLTerm.Direction.Input, "I0")
|
|
214
|
+
i1 = naja.SNLScalarTerm.create(muxf8, naja.SNLTerm.Direction.Input, "I1")
|
|
215
|
+
o = naja.SNLScalarTerm.create(muxf8, naja.SNLTerm.Direction.Output, "O")
|
|
216
|
+
s = naja.SNLScalarTerm.create(muxf8, naja.SNLTerm.Direction.Input, "S")
|
|
217
|
+
naja.SNLDesign.addCombinatorialArcs([i0, i1, s], o)
|
|
218
218
|
|
|
219
219
|
|
|
220
220
|
def constructSRL16E(lib):
|
|
221
|
-
srl16e =
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
221
|
+
srl16e = naja.SNLDesign.createPrimitive(lib, "SRL16E")
|
|
222
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Input, "CE")
|
|
223
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Input, "CLK")
|
|
224
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Input, "D")
|
|
225
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Output, "Q")
|
|
226
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Input, "A0")
|
|
227
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Input, "A1")
|
|
228
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Input, "A2")
|
|
229
|
+
naja.SNLScalarTerm.create(srl16e, naja.SNLTerm.Direction.Input, "A3")
|
|
230
|
+
naja.SNLParameter.create_binary(srl16e, "INIT", 16, 0x0000)
|
|
231
|
+
naja.SNLParameter.create_binary(srl16e, "IS_CLK_INVERTED", 1, 0)
|
|
232
232
|
|
|
233
233
|
|
|
234
234
|
def constructFDCE(lib):
|
|
235
|
-
fdce =
|
|
236
|
-
q =
|
|
237
|
-
c =
|
|
238
|
-
ce =
|
|
239
|
-
clr =
|
|
240
|
-
d =
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
235
|
+
fdce = naja.SNLDesign.createPrimitive(lib, "FDCE")
|
|
236
|
+
q = naja.SNLScalarTerm.create(fdce, naja.SNLTerm.Direction.Output, "Q")
|
|
237
|
+
c = naja.SNLScalarTerm.create(fdce, naja.SNLTerm.Direction.Input, "C")
|
|
238
|
+
ce = naja.SNLScalarTerm.create(fdce, naja.SNLTerm.Direction.Input, "CE")
|
|
239
|
+
clr = naja.SNLScalarTerm.create(fdce, naja.SNLTerm.Direction.Input, "CLR")
|
|
240
|
+
d = naja.SNLScalarTerm.create(fdce, naja.SNLTerm.Direction.Input, "D")
|
|
241
|
+
naja.SNLParameter.create_binary(fdce, "INIT", 1, 0b0)
|
|
242
|
+
naja.SNLDesign.addInputsToClockArcs([ce, clr, d], c)
|
|
243
|
+
naja.SNLDesign.addClockToOutputsArcs(c, q)
|
|
244
244
|
|
|
245
245
|
|
|
246
246
|
def constructFDPE(lib):
|
|
247
|
-
fdpe =
|
|
248
|
-
q =
|
|
249
|
-
c =
|
|
250
|
-
ce =
|
|
251
|
-
pre =
|
|
252
|
-
d =
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
fdpe = naja.SNLDesign.createPrimitive(lib, "FDPE")
|
|
248
|
+
q = naja.SNLScalarTerm.create(fdpe, naja.SNLTerm.Direction.Output, "Q")
|
|
249
|
+
c = naja.SNLScalarTerm.create(fdpe, naja.SNLTerm.Direction.Input, "C")
|
|
250
|
+
ce = naja.SNLScalarTerm.create(fdpe, naja.SNLTerm.Direction.Input, "CE")
|
|
251
|
+
pre = naja.SNLScalarTerm.create(fdpe, naja.SNLTerm.Direction.Input, "PRE")
|
|
252
|
+
d = naja.SNLScalarTerm.create(fdpe, naja.SNLTerm.Direction.Input, "D")
|
|
253
|
+
naja.SNLParameter.create_binary(fdpe, "INIT", 1, 0b1)
|
|
254
|
+
naja.SNLDesign.addInputsToClockArcs([ce, pre, d], c)
|
|
255
|
+
naja.SNLDesign.addClockToOutputsArcs(c, q)
|
|
256
256
|
|
|
257
257
|
|
|
258
258
|
def constructFDRE(lib):
|
|
259
|
-
fdre =
|
|
260
|
-
q =
|
|
261
|
-
c =
|
|
262
|
-
ce =
|
|
263
|
-
r =
|
|
264
|
-
d =
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
259
|
+
fdre = naja.SNLDesign.createPrimitive(lib, "FDRE")
|
|
260
|
+
q = naja.SNLScalarTerm.create(fdre, naja.SNLTerm.Direction.Output, "Q")
|
|
261
|
+
c = naja.SNLScalarTerm.create(fdre, naja.SNLTerm.Direction.Input, "C")
|
|
262
|
+
ce = naja.SNLScalarTerm.create(fdre, naja.SNLTerm.Direction.Input, "CE")
|
|
263
|
+
r = naja.SNLScalarTerm.create(fdre, naja.SNLTerm.Direction.Input, "R")
|
|
264
|
+
d = naja.SNLScalarTerm.create(fdre, naja.SNLTerm.Direction.Input, "D")
|
|
265
|
+
naja.SNLParameter.create_binary(fdre, "INIT", 1, 0b0)
|
|
266
|
+
naja.SNLDesign.addInputsToClockArcs([ce, r, d], c)
|
|
267
|
+
naja.SNLDesign.addClockToOutputsArcs(c, q)
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
def constructFDSE(lib):
|
|
271
|
-
fdse =
|
|
272
|
-
q =
|
|
273
|
-
c =
|
|
274
|
-
ce =
|
|
275
|
-
s =
|
|
276
|
-
d =
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
271
|
+
fdse = naja.SNLDesign.createPrimitive(lib, "FDSE")
|
|
272
|
+
q = naja.SNLScalarTerm.create(fdse, naja.SNLTerm.Direction.Output, "Q")
|
|
273
|
+
c = naja.SNLScalarTerm.create(fdse, naja.SNLTerm.Direction.Input, "C")
|
|
274
|
+
ce = naja.SNLScalarTerm.create(fdse, naja.SNLTerm.Direction.Input, "CE")
|
|
275
|
+
s = naja.SNLScalarTerm.create(fdse, naja.SNLTerm.Direction.Input, "S")
|
|
276
|
+
d = naja.SNLScalarTerm.create(fdse, naja.SNLTerm.Direction.Input, "D")
|
|
277
|
+
naja.SNLParameter.create_binary(fdse, "INIT", 1, 0b0)
|
|
278
|
+
naja.SNLDesign.addInputsToClockArcs([ce, s, d], c)
|
|
279
|
+
naja.SNLDesign.addClockToOutputsArcs(c, q)
|
|
280
280
|
|
|
281
281
|
|
|
282
282
|
def constructRAM32M(lib):
|
|
283
|
-
ram32m =
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
283
|
+
ram32m = naja.SNLDesign.createPrimitive(lib, "RAM32M")
|
|
284
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Output, 1, 0, "DOA")
|
|
285
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Output, 1, 0, "DOB")
|
|
286
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Output, 1, 0, "DOC")
|
|
287
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Output, 1, 0, "DOD")
|
|
288
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 4, 0, "ADDRA")
|
|
289
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 4, 0, "ADDRB")
|
|
290
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 4, 0, "ADDRC")
|
|
291
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 4, 0, "ADDRD")
|
|
292
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 1, 0, "DIA")
|
|
293
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 1, 0, "DIB")
|
|
294
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 1, 0, "DIC")
|
|
295
|
+
naja.SNLBusTerm.create(ram32m, naja.SNLTerm.Direction.Input, 1, 0, "DID")
|
|
296
|
+
naja.SNLScalarTerm.create(ram32m, naja.SNLTerm.Direction.Input, "WCLK")
|
|
297
|
+
naja.SNLScalarTerm.create(ram32m, naja.SNLTerm.Direction.Input, "WE")
|
|
298
|
+
naja.SNLParameter.create_binary(ram32m, "INIT_A", 64, 0)
|
|
299
|
+
naja.SNLParameter.create_binary(ram32m, "INIT_B", 64, 0)
|
|
300
|
+
naja.SNLParameter.create_binary(ram32m, "INIT_C", 64, 0)
|
|
301
|
+
naja.SNLParameter.create_binary(ram32m, "INIT_D", 64, 0)
|
|
302
302
|
|
|
303
303
|
|
|
304
304
|
def constructRAM64M(lib):
|
|
305
|
-
ram64m =
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
305
|
+
ram64m = naja.SNLDesign.createPrimitive(lib, "RAM64M")
|
|
306
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Output, "DOA")
|
|
307
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Output, "DOB")
|
|
308
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Output, "DOC")
|
|
309
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Output, "DOD")
|
|
310
|
+
naja.SNLBusTerm.create(ram64m, naja.SNLTerm.Direction.Input, 5, 0, "ADDRA")
|
|
311
|
+
naja.SNLBusTerm.create(ram64m, naja.SNLTerm.Direction.Input, 5, 0, "ADDRB")
|
|
312
|
+
naja.SNLBusTerm.create(ram64m, naja.SNLTerm.Direction.Input, 5, 0, "ADDRC")
|
|
313
|
+
naja.SNLBusTerm.create(ram64m, naja.SNLTerm.Direction.Input, 5, 0, "ADDRD")
|
|
314
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Input, "DIA")
|
|
315
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Input, "DIB")
|
|
316
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Input, "DIC")
|
|
317
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Input, "DID")
|
|
318
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Input, "WCLK")
|
|
319
|
+
naja.SNLScalarTerm.create(ram64m, naja.SNLTerm.Direction.Input, "WE")
|
|
320
|
+
naja.SNLParameter.create_binary(ram64m, "INIT_A", 64, 0)
|
|
321
|
+
naja.SNLParameter.create_binary(ram64m, "INIT_B", 64, 0)
|
|
322
|
+
naja.SNLParameter.create_binary(ram64m, "INIT_C", 64, 0)
|
|
323
|
+
naja.SNLParameter.create_binary(ram64m, "INIT_D", 64, 0)
|
|
324
324
|
|
|
325
325
|
|
|
326
326
|
def constructRAMB18E1(lib):
|
|
327
|
-
ramb18e1 =
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
327
|
+
ramb18e1 = naja.SNLDesign.createPrimitive(lib, "RAMB18E1")
|
|
328
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 13, 0, "ADDRARDADDR")
|
|
329
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 13, 0, "ADDRBWRADDR")
|
|
330
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "CLKARDCLK")
|
|
331
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "CLKBWRCLK")
|
|
332
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 15, 0, "DIADI")
|
|
333
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 15, 0, "DIBDI")
|
|
334
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 1, 0, "DIPADIP")
|
|
335
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 1, 0, "DIPBDIP")
|
|
336
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Output, 15, 0, "DOADO")
|
|
337
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Output, 15, 0, "DOBDO")
|
|
338
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Output, 1, 0, "DOPADOP")
|
|
339
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Output, 1, 0, "DOPBDOP")
|
|
340
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "ENARDEN")
|
|
341
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "ENBWREN")
|
|
342
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "REGCEAREGCE")
|
|
343
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "REGCEB")
|
|
344
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "RSTRAMARSTRAM")
|
|
345
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "RSTRAMB")
|
|
346
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "RSTREGARSTREG")
|
|
347
|
+
naja.SNLScalarTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, "RSTREGB")
|
|
348
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 1, 0, "WEA")
|
|
349
|
+
naja.SNLBusTerm.create(ramb18e1, naja.SNLTerm.Direction.Input, 3, 0, "WEBWE")
|
|
350
|
+
naja.SNLParameter.create_decimal(ramb18e1, "DOA_REG", 0)
|
|
351
|
+
naja.SNLParameter.create_decimal(ramb18e1, "DOB_REG", 0)
|
|
352
|
+
naja.SNLParameter.create_binary(ramb18e1, "INIT_A", 18, 0x00000)
|
|
353
|
+
naja.SNLParameter.create_binary(ramb18e1, "INIT_B", 18, 0x00000)
|
|
354
354
|
for i in range(64):
|
|
355
355
|
paramName = "INIT_" + hex(i)[2:].zfill(2).upper()
|
|
356
|
-
|
|
356
|
+
naja.SNLParameter.create_binary(ramb18e1, paramName, 256, 0)
|
|
357
357
|
for i in range(8):
|
|
358
358
|
paramName = "INITP_" + hex(i)[2:].zfill(2).upper()
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
359
|
+
naja.SNLParameter.create_binary(ramb18e1, paramName, 256, 0)
|
|
360
|
+
naja.SNLParameter.create_string(ramb18e1, "RAM_MODE", "TDP")
|
|
361
|
+
naja.SNLParameter.create_decimal(ramb18e1, "READ_WIDTH_A", 0)
|
|
362
|
+
naja.SNLParameter.create_decimal(ramb18e1, "READ_WIDTH_B", 0)
|
|
363
|
+
naja.SNLParameter.create_binary(ramb18e1, "SRVAL_A", 18, 0)
|
|
364
|
+
naja.SNLParameter.create_binary(ramb18e1, "SRVAL_B", 18, 0)
|
|
365
|
+
naja.SNLParameter.create_string(ramb18e1, "WRITE_MODE_A", "WRITE_FIRST")
|
|
366
|
+
naja.SNLParameter.create_string(ramb18e1, "WRITE_MODE_B", "WRITE_FIRST")
|
|
367
|
+
naja.SNLParameter.create_decimal(ramb18e1, "WRITE_WIDTH_A", 0)
|
|
368
|
+
naja.SNLParameter.create_decimal(ramb18e1, "WRITE_WIDTH_B", 0)
|
|
369
369
|
|
|
370
370
|
|
|
371
371
|
def constructRAMB36E1(lib):
|
|
372
|
-
ramb36e1 =
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
372
|
+
ramb36e1 = naja.SNLDesign.createPrimitive(lib, "RAMB36E1")
|
|
373
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 15, 0, "ADDRARDADDR")
|
|
374
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 15, 0, "ADDRBWRADDR")
|
|
375
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "CASCADEINA")
|
|
376
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "CASCADEINB")
|
|
377
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, "CASCADEOUTA")
|
|
378
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, "CASCADEOUTB")
|
|
379
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "CLKARDCLK")
|
|
380
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "CLKBWRCLK")
|
|
381
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, "DBITERR")
|
|
382
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 31, 0, "DIADI")
|
|
383
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 31, 0, "DIBDI")
|
|
384
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 3, 0, "DIPADIP")
|
|
385
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 3, 0, "DIPBDIP")
|
|
386
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, 31, 0, "DOADO")
|
|
387
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, 31, 0, "DOBDO")
|
|
388
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, 3, 0, "DOPADOP")
|
|
389
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, 3, 0, "DOPBDOP")
|
|
390
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, 7, 0, "ECCPARITY")
|
|
391
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "ENARDEN")
|
|
392
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "ENBWREN")
|
|
393
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "INJECTDBITERR")
|
|
394
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "INJECTSBITERR")
|
|
395
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, 8, 0, "RDADDRECC")
|
|
396
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "REGCEAREGCE")
|
|
397
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "REGCEB")
|
|
398
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "RSTRAMARSTRAM")
|
|
399
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "RSTRAMB")
|
|
400
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "RSTREGARSTREG")
|
|
401
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, "RSTREGB")
|
|
402
|
+
naja.SNLScalarTerm.create(ramb36e1, naja.SNLTerm.Direction.Output, "SBITERR")
|
|
403
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 3, 0, "WEA")
|
|
404
|
+
naja.SNLBusTerm.create(ramb36e1, naja.SNLTerm.Direction.Input, 7, 0, "WEBWE")
|
|
405
|
+
|
|
406
|
+
naja.SNLParameter.create_decimal(ramb36e1, "DOA_REG", 0)
|
|
407
|
+
naja.SNLParameter.create_decimal(ramb36e1, "DOB_REG", 0)
|
|
408
|
+
naja.SNLParameter.create_binary(ramb36e1, "INIT_A", 36, 0)
|
|
409
|
+
naja.SNLParameter.create_binary(ramb36e1, "INIT_B", 36, 0)
|
|
410
410
|
for i in range(128):
|
|
411
411
|
paramName = "INIT_" + hex(i)[2:].zfill(2).upper()
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
naja.SNLParameter.create_binary(ramb36e1, paramName, 256, 0)
|
|
413
|
+
naja.SNLParameter.create_string(ramb36e1, "RAM_EXTENSION_A", "NONE")
|
|
414
|
+
naja.SNLParameter.create_string(ramb36e1, "RAM_EXTENSION_B", "NONE")
|
|
415
415
|
for i in range(16):
|
|
416
416
|
paramName = "INITP_" + hex(i)[2:].zfill(2).upper()
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
417
|
+
naja.SNLParameter.create_binary(ramb36e1, paramName, 256, 0)
|
|
418
|
+
naja.SNLParameter.create_string(ramb36e1, "RAM_MODE", "TDP")
|
|
419
|
+
naja.SNLParameter.create_decimal(ramb36e1, "READ_WIDTH_A", 0)
|
|
420
|
+
naja.SNLParameter.create_decimal(ramb36e1, "READ_WIDTH_B", 0)
|
|
421
|
+
naja.SNLParameter.create_decimal(ramb36e1, "WRITE_WIDTH_A", 0)
|
|
422
|
+
naja.SNLParameter.create_decimal(ramb36e1, "WRITE_WIDTH_B", 0)
|
|
423
|
+
naja.SNLParameter.create_binary(ramb36e1, "SRVAL_A", 36, 0)
|
|
424
|
+
naja.SNLParameter.create_binary(ramb36e1, "SRVAL_B", 36, 0)
|
|
425
|
+
naja.SNLParameter.create_string(ramb36e1, "WRITE_MODE_A", "WRITE_FIRST")
|
|
426
|
+
naja.SNLParameter.create_string(ramb36e1, "WRITE_MODE_B", "WRITE_FIRST")
|
|
427
427
|
|
|
428
428
|
|
|
429
429
|
def load(db):
|
|
430
430
|
logging.info("Loading Xilinx primitives")
|
|
431
|
-
lib =
|
|
431
|
+
lib = naja.NLLibrary.createPrimitives(db, "xilinx")
|
|
432
432
|
constructIBUF(lib)
|
|
433
433
|
constructOBUF(lib)
|
|
434
434
|
constructBUFG(lib)
|