pyosys 0.55__cp38-cp38-manylinux_2_28_aarch64.whl → 0.55.23__cp38-cp38-manylinux_2_28_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.
pyosys/libyosys.so CHANGED
Binary file
@@ -101,7 +101,9 @@ struct SatGen
101
101
  else
102
102
  vec.push_back(bit == (undef_mode ? RTLIL::State::Sx : RTLIL::State::S1) ? ez->CONST_TRUE : ez->CONST_FALSE);
103
103
  } else {
104
- std::string name = pf + (bit.wire->width == 1 ? stringf("%s", log_id(bit.wire)) : stringf("%s [%d]", log_id(bit.wire->name), bit.offset));
104
+ std::string wire_name = RTLIL::unescape_id(bit.wire->name);
105
+ std::string name = pf +
106
+ (bit.wire->width == 1 ? wire_name : stringf("%s [%d]", wire_name.c_str(), bit.offset));
105
107
  vec.push_back(ez->frozen_literal(name));
106
108
  imported_signals[pf][bit] = vec.back();
107
109
  }
@@ -0,0 +1,232 @@
1
+ /*
2
+ * yosys -- Yosys Open SYnthesis Suite
3
+ *
4
+ * Copyright (C) 2012 Claire Xenia Wolf <claire@yosyshq.com>
5
+ *
6
+ * Permission to use, copy, modify, and/or distribute this software for any
7
+ * purpose with or without fee is hereby granted, provided that the above
8
+ * copyright notice and this permission notice appear in all copies.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+ *
18
+ */
19
+
20
+ #ifndef LIBPARSE_H
21
+ #define LIBPARSE_H
22
+
23
+ #include "kernel/yosys.h"
24
+ #include <stdio.h>
25
+ #include <string>
26
+ #include <vector>
27
+ #include <set>
28
+
29
+ /**
30
+ * This file is likely to change in the near future.
31
+ * Rely on it in your plugins at your own peril
32
+ */
33
+
34
+ namespace Yosys
35
+ {
36
+ struct LibertyAst
37
+ {
38
+ std::string id, value;
39
+ std::vector<std::string> args;
40
+ std::vector<LibertyAst*> children;
41
+ ~LibertyAst();
42
+ const LibertyAst *find(std::string name) const;
43
+
44
+ typedef std::set<std::string> sieve;
45
+ void dump(FILE *f, sieve &blacklist, sieve &whitelist, std::string indent = "", std::string path = "", bool path_ok = false) const;
46
+ };
47
+
48
+ struct LibertyExpression
49
+ {
50
+ struct Lexer {
51
+ std::string s, expr;
52
+
53
+ Lexer(std::string s) : s{s}, expr{s} {}
54
+
55
+ bool empty() { return s.empty();}
56
+ char peek() { return s[0]; }
57
+ std::string full_expr() { return expr; }
58
+
59
+ char next() {
60
+ char c = s[0];
61
+ s = s.substr(1, s.size());
62
+ return c;
63
+ }
64
+
65
+ std::string pin() {
66
+ auto length = s.find_first_of("\t()'!^*& +|");
67
+ if (length == std::string::npos) {
68
+ // nothing found so use size of s
69
+ length = s.size();
70
+ }
71
+ auto pin = s.substr(0, length);
72
+ s = s.substr(length, s.size());
73
+ return pin;
74
+ }
75
+ };
76
+
77
+ enum Kind {
78
+ AND,
79
+ OR,
80
+ NOT,
81
+ XOR,
82
+ // the standard specifies constants, but they're probably rare in practice.
83
+ PIN,
84
+ EMPTY
85
+ };
86
+
87
+ Kind kind;
88
+ std::string name;
89
+ std::vector<LibertyExpression> children;
90
+
91
+ LibertyExpression() : kind(Kind::EMPTY) {}
92
+
93
+ static LibertyExpression parse(Lexer &s, int min_prio = 0);
94
+ void get_pin_names(pool<std::string>& names);
95
+ bool eval(dict<std::string, bool>& values);
96
+ };
97
+
98
+ class LibertyInputStream {
99
+ std::istream &f;
100
+ std::vector<unsigned char> buffer;
101
+ size_t buf_pos = 0;
102
+ size_t buf_end = 0;
103
+ bool eof = false;
104
+
105
+ bool extend_buffer_once();
106
+ bool extend_buffer_at_least(size_t size = 1);
107
+
108
+ YS_COLD int get_cold();
109
+ YS_COLD int peek_cold(size_t offset);
110
+
111
+ public:
112
+ LibertyInputStream(std::istream &f) : f(f) {}
113
+
114
+ size_t buffered_size() { return buf_end - buf_pos; }
115
+ const unsigned char *buffered_data() { return buffer.data() + buf_pos; }
116
+
117
+ int get() {
118
+ if (buf_pos == buf_end)
119
+ return get_cold();
120
+ int c = buffer[buf_pos];
121
+ buf_pos += 1;
122
+ return c;
123
+ }
124
+
125
+ int peek(size_t offset = 0) {
126
+ if (buf_pos + offset >= buf_end)
127
+ return peek_cold(offset);
128
+ return buffer[buf_pos + offset];
129
+ }
130
+
131
+ void consume(size_t n = 1) {
132
+ buf_pos += n;
133
+ }
134
+
135
+ void unget() {
136
+ buf_pos -= 1;
137
+ }
138
+ };
139
+
140
+ #ifndef FILTERLIB
141
+ class LibertyAstCache {
142
+ LibertyAstCache() {};
143
+ ~LibertyAstCache() {};
144
+ public:
145
+ dict<std::string, std::shared_ptr<const LibertyAst>> cached;
146
+
147
+ bool cache_by_default = false;
148
+ bool verbose = false;
149
+ dict<std::string, bool> cache_path;
150
+
151
+ std::shared_ptr<const LibertyAst> cached_ast(const std::string &fname);
152
+ void parsed_ast(const std::string &fname, const std::shared_ptr<const LibertyAst> &ast);
153
+ static LibertyAstCache instance;
154
+ };
155
+ #endif
156
+
157
+ class LibertyMergedCells;
158
+ class LibertyParser
159
+ {
160
+ friend class LibertyMergedCells;
161
+ private:
162
+ LibertyInputStream f;
163
+ int line;
164
+
165
+ /* lexer return values:
166
+ 'v': identifier, string, array range [...] -> str holds the token string
167
+ 'n': newline
168
+ anything else is a single character.
169
+ */
170
+ int lexer(std::string &str);
171
+
172
+ void report_unexpected_token(int tok);
173
+ void parse_vector_range(int tok);
174
+ LibertyAst *parse(bool top_level);
175
+ void error() const;
176
+ void error(const std::string &str) const;
177
+
178
+ public:
179
+ std::shared_ptr<const LibertyAst> shared_ast;
180
+ const LibertyAst *ast = nullptr;
181
+
182
+ LibertyParser(std::istream &f) : f(f), line(1) {
183
+ shared_ast.reset(parse(true));
184
+ ast = shared_ast.get();
185
+ if (!ast) {
186
+ #ifdef FILTERLIB
187
+ fprintf(stderr, "No entries found in liberty file.\n");
188
+ exit(1);
189
+ #else
190
+ log_error("No entries found in liberty file.\n");
191
+ #endif
192
+ }
193
+ }
194
+
195
+ #ifndef FILTERLIB
196
+ LibertyParser(std::istream &f, const std::string &fname) : f(f), line(1) {
197
+ shared_ast = LibertyAstCache::instance.cached_ast(fname);
198
+ if (!shared_ast) {
199
+ shared_ast.reset(parse(true));
200
+ LibertyAstCache::instance.parsed_ast(fname, shared_ast);
201
+ }
202
+ ast = shared_ast.get();
203
+ if (!ast) {
204
+ log_error("No entries found in liberty file `%s'.\n", fname.c_str());
205
+ }
206
+ }
207
+ #endif
208
+ };
209
+
210
+ class LibertyMergedCells
211
+ {
212
+ std::vector<std::shared_ptr<const LibertyAst>> asts;
213
+
214
+ public:
215
+ std::vector<const LibertyAst *> cells;
216
+ void merge(LibertyParser &parser)
217
+ {
218
+ if (parser.ast) {
219
+ const LibertyAst *ast = parser.ast;
220
+ asts.push_back(parser.shared_ast);
221
+ if (ast->id != "library")
222
+ parser.error("Top level entity isn't \"library\".\n");
223
+ for (const LibertyAst *cell : ast->children)
224
+ if (cell->id == "cell" && cell->args.size() == 1)
225
+ cells.push_back(cell);
226
+ }
227
+ }
228
+ };
229
+
230
+ }
231
+
232
+ #endif
pyosys/yosys-abc CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyosys
3
- Version: 0.55
3
+ Version: 0.55.23
4
4
  Summary: Python access to libyosys
5
5
  Classifier: License :: OSI Approved :: MIT License
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,7 +1,12 @@
1
1
  pyosys.libs/libcrypt-258f54d5.so.1.1.0,sha256=mA1Hga6a2NGy9gvlLPu_F20yzGLs-IiSDzR-mVdjbuI,198433
2
- pyosys/yosys-abc,sha256=HNT3_tE-9K6LxMR0XLDQlTYS9GDBMGVab1ELB2bQcko,21814928
2
+ pyosys-0.55.23.dist-info/RECORD,,
3
+ pyosys-0.55.23.dist-info/COPYING,sha256=kWqnpIV2zL_kFC_d1-S_PF1uzksfJPPS7HAZjJnaOpI,777
4
+ pyosys-0.55.23.dist-info/WHEEL,sha256=8TiLLyYGHVCmWg-lrmZc6gDHfeqzdQXt9aoJoMvqinU,112
5
+ pyosys-0.55.23.dist-info/top_level.txt,sha256=3EZwjfudmKdDRzFQF8euvJfeGeSfXuoVNoaHzvlEva4,16
6
+ pyosys-0.55.23.dist-info/METADATA,sha256=aX1dbkDOzKHFuUs_-M8Rm9iuDxl3FIpgjGpOK1If5HA,9222
7
+ pyosys/yosys-abc,sha256=VlF3Nm7qXFgAxrf6L1S7EetqAConFAdfmuQ-FAww_q8,21814928
3
8
  pyosys/py_wrap_generator.py,sha256=A_cJYHt3BrRuFfh1-IAJrIXYyLAzqAyCiCp1gX6rpCk,81656
4
- pyosys/libyosys.so,sha256=xBMkhusy6KnCtCJK55jyakMKjrDOzPbDyvq298pSosM,36845697
9
+ pyosys/libyosys.so,sha256=Ul59nOo75yjg8OemZskvuFlQ0X0Gu2oyDeb58f2ztTc,36845777
5
10
  pyosys/__init__.py,sha256=chS2qX2oRlor9bCqzi9u9XfZVDjeLb5YmieRVG-AvaM,522
6
11
  pyosys/share/techmap.v,sha256=YCvM3QLs6BuUo8fOdQzHyI4OUm9_teQZbvmkDp3vrFQ,16974
7
12
  pyosys/share/gate2lut.v,sha256=j5EJAuBnWNw15j0sjK-Seq2BTgleebDF3aAN0pc-8L0,1447
@@ -287,6 +292,7 @@ pyosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi.h,sha256=Ll
287
292
  pyosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi_vcd.cc,sha256=5A6IK46tg8BWgs_vzS183p9HMZfWP7FZfJzCjnB3vW8,2815
288
293
  pyosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi_vcd.h,sha256=P6KBEs-76IK4LwKBhXbju9nwkH3rmmqUm4uSuiaS88M,4286
289
294
  pyosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi.cc,sha256=4WH8B0B7Y7GY43BXZX0-6PGFPYcbOcavJseI0wM_VJQ,4559
295
+ pyosys/share/include/passes/techmap/libparse.h,sha256=_2J7RBOUiJxdtxeoxX4p_81npsUUopsctC3SAaYXkRE,5672
290
296
  pyosys/share/include/passes/fsm/fsmdata.h,sha256=hQPbdxU2f0uflXJceSCXNuEv60XR24maHanlVj_B7ZU,6772
291
297
  pyosys/share/include/kernel/sexpr.h,sha256=CUDKFehVoGmakYBYLpEKUtlM0Dd3oI6TNW_cKz-qe0g,4720
292
298
  pyosys/share/include/kernel/macc.h,sha256=LHm507daCT57lGCNNwia1LJVk3pkBB5ZteCZihxD5Qw,8926
@@ -300,7 +306,7 @@ pyosys/share/include/kernel/json.h,sha256=tE3AgUslbZd5TRFEipj0HptYjWgNfMjzV44l3A
300
306
  pyosys/share/include/kernel/scopeinfo.h,sha256=EAU3vSTIwH1RrbSC7HVoTWh4SLfHMSIoidQPvT1Mo7g,11797
301
307
  pyosys/share/include/kernel/ffmerge.h,sha256=I3mXyytzRyP92T9XhSQTlv7EN2G31nJhspBxlLYiMEY,6305
302
308
  pyosys/share/include/kernel/mem.h,sha256=xKz0HxXap_PTdzpK-NUcbxybF3YisRc2JoCv17TXOc4,15505
303
- pyosys/share/include/kernel/satgen.h,sha256=zx8LptIgds0Z9sxXx6HGxNNYuk05dHqQZy1aXFWEXC0,10483
309
+ pyosys/share/include/kernel/satgen.h,sha256=O7h0qkcsaX5g4XsUiLumlj8RAg63fxkFCLgZds5xgL8,10525
304
310
  pyosys/share/include/kernel/utils.h,sha256=5bJFi7SNf18SL7icrEQEDDYnqT9TrjBMlPZGHbinFK8,7315
305
311
  pyosys/share/include/kernel/consteval.h,sha256=oEPSKbbgqvNmlLqYFSozZX2cjFQA5IM-d69HmyuZiGo,10864
306
312
  pyosys/share/include/kernel/rtlil.h,sha256=4kP9hgPjbPFLy9kH9JdmOEbp6E1OI5Nn5P-eK0rc8pw,99416
@@ -322,8 +328,3 @@ pyosys/share/include/kernel/yw.h,sha256=Gr5zqBNUSKXOKhdw7tl9-KcCiZg3xFcK9Msj7LMa
322
328
  pyosys/share/include/kernel/sigtools.h,sha256=Tb1hUOLJD-AV4ojLVcjx0Dc00QSy6nGJyTwNMa4eqw0,8074
323
329
  pyosys/share/include/kernel/constids.inc,sha256=9a-cTYvGkDQr4W1WJpK9PfzvaoiMKhz_MV2mkbBQnbY,3730
324
330
  pyosys/share/include/kernel/fmt.h,sha256=0UT-aDVX7_KnzlaNyK3iMsSzoICa4Q0HhqsFIrwHBMw,2790
325
- pyosys-0.55.dist-info/RECORD,,
326
- pyosys-0.55.dist-info/COPYING,sha256=kWqnpIV2zL_kFC_d1-S_PF1uzksfJPPS7HAZjJnaOpI,777
327
- pyosys-0.55.dist-info/WHEEL,sha256=8TiLLyYGHVCmWg-lrmZc6gDHfeqzdQXt9aoJoMvqinU,112
328
- pyosys-0.55.dist-info/top_level.txt,sha256=3EZwjfudmKdDRzFQF8euvJfeGeSfXuoVNoaHzvlEva4,16
329
- pyosys-0.55.dist-info/METADATA,sha256=GPG7qeuzyUamHAg6qL2yJ99uMLc72zyNwH8f2zdaKTI,9219