pyosys 0.55__cp312-cp312-macosx_11_0_arm64.whl → 0.55.23__cp312-cp312-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.
- pyosys/libyosys.so +0 -0
- pyosys/share/include/kernel/satgen.h +3 -1
- pyosys/share/include/passes/techmap/libparse.h +232 -0
- pyosys/yosys-abc +0 -0
- {pyosys-0.55.dist-info → pyosys-0.55.23.dist-info}/METADATA +1 -1
- {pyosys-0.55.dist-info → pyosys-0.55.23.dist-info}/RECORD +9 -8
- {pyosys-0.55.dist-info → pyosys-0.55.23.dist-info}/WHEEL +0 -0
- {pyosys-0.55.dist-info → pyosys-0.55.23.dist-info}/licenses/COPYING +0 -0
- {pyosys-0.55.dist-info → pyosys-0.55.23.dist-info}/top_level.txt +0 -0
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
|
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,12 +1,12 @@
|
|
1
|
-
pyosys-0.55.dist-info/RECORD,,
|
2
|
-
pyosys-0.55.dist-info/WHEEL,sha256=CltXN3lQvXbHxKDtiDwW0RNzF8s2WyBuPbOAX_ZeQlA,109
|
3
|
-
pyosys-0.55.dist-info/top_level.txt,sha256=3EZwjfudmKdDRzFQF8euvJfeGeSfXuoVNoaHzvlEva4,16
|
4
|
-
pyosys-0.55.dist-info/METADATA,sha256=
|
5
|
-
pyosys-0.55.dist-info/licenses/COPYING,sha256=kWqnpIV2zL_kFC_d1-S_PF1uzksfJPPS7HAZjJnaOpI,777
|
6
|
-
pyosys/yosys-abc,sha256=
|
1
|
+
pyosys-0.55.23.dist-info/RECORD,,
|
2
|
+
pyosys-0.55.23.dist-info/WHEEL,sha256=CltXN3lQvXbHxKDtiDwW0RNzF8s2WyBuPbOAX_ZeQlA,109
|
3
|
+
pyosys-0.55.23.dist-info/top_level.txt,sha256=3EZwjfudmKdDRzFQF8euvJfeGeSfXuoVNoaHzvlEva4,16
|
4
|
+
pyosys-0.55.23.dist-info/METADATA,sha256=TRJBmpZQTkPiqPBIugKEapJ6wSTIcfVBWLMLN62ybmg,9384
|
5
|
+
pyosys-0.55.23.dist-info/licenses/COPYING,sha256=kWqnpIV2zL_kFC_d1-S_PF1uzksfJPPS7HAZjJnaOpI,777
|
6
|
+
pyosys/yosys-abc,sha256=WNkqviV9NtA_zlPSG6LZo-o9bsJXQePxfF_LPESzAHc,24835016
|
7
7
|
pyosys/py_wrap_generator.py,sha256=A_cJYHt3BrRuFfh1-IAJrIXYyLAzqAyCiCp1gX6rpCk,81656
|
8
8
|
pyosys/__init__.py,sha256=chS2qX2oRlor9bCqzi9u9XfZVDjeLb5YmieRVG-AvaM,522
|
9
|
-
pyosys/libyosys.so,sha256
|
9
|
+
pyosys/libyosys.so,sha256=-oWG1M0dJPYMJLBQrOrq_qw2HRfGQodBcZvXBeVxbkU,28440072
|
10
10
|
pyosys/share/cmp2softlogic.v,sha256=IjDw9-8Rt8dqzhpoFx2mHRX8E5KbFewJYSBIgTtaJWs,2716
|
11
11
|
pyosys/share/techmap.v,sha256=YCvM3QLs6BuUo8fOdQzHyI4OUm9_teQZbvmkDp3vrFQ,16974
|
12
12
|
pyosys/share/simlib.v,sha256=EKWY8VYq5IpCmDTQAi4TtEmn_6oU2orx3-jn5WB815Q,78011
|
@@ -113,6 +113,7 @@ pyosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi.h,sha256=Ll
|
|
113
113
|
pyosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi_vcd.h,sha256=P6KBEs-76IK4LwKBhXbju9nwkH3rmmqUm4uSuiaS88M,4286
|
114
114
|
pyosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi.cc,sha256=4WH8B0B7Y7GY43BXZX0-6PGFPYcbOcavJseI0wM_VJQ,4559
|
115
115
|
pyosys/share/include/passes/fsm/fsmdata.h,sha256=hQPbdxU2f0uflXJceSCXNuEv60XR24maHanlVj_B7ZU,6772
|
116
|
+
pyosys/share/include/passes/techmap/libparse.h,sha256=_2J7RBOUiJxdtxeoxX4p_81npsUUopsctC3SAaYXkRE,5672
|
116
117
|
pyosys/share/include/libs/sha1/sha1.h,sha256=_BhYRVniKTAQYi8KZBTog6PpkwwJMSWKVBgpnykhyCs,1382
|
117
118
|
pyosys/share/include/libs/json11/json11.hpp,sha256=00gwSOcdaIm25bhJvB3Y3_GJVbpme7ElTuMthXYDtOg,9268
|
118
119
|
pyosys/share/include/libs/ezsat/ezminisat.h,sha256=bSrDL6VRinpXdULoR8P9lQaT1Dy4kAEZfTcKjRKOdjg,2098
|
@@ -138,7 +139,7 @@ pyosys/share/include/kernel/yosys.h,sha256=bx9lTnEhsorxUoLhz2hu0__pSvVAyrthvGjoq
|
|
138
139
|
pyosys/share/include/kernel/fmt.h,sha256=0UT-aDVX7_KnzlaNyK3iMsSzoICa4Q0HhqsFIrwHBMw,2790
|
139
140
|
pyosys/share/include/kernel/celltypes.h,sha256=W44T0u789-fy_tj7fGRTNI7s1jshewrPwmS3_-Oz6-A,18561
|
140
141
|
pyosys/share/include/kernel/ff.h,sha256=vVJqxmyfJ1z9qnnUA3CAoX5NavU33_J4U1Sd7TgPp5M,7631
|
141
|
-
pyosys/share/include/kernel/satgen.h,sha256=
|
142
|
+
pyosys/share/include/kernel/satgen.h,sha256=O7h0qkcsaX5g4XsUiLumlj8RAg63fxkFCLgZds5xgL8,10525
|
142
143
|
pyosys/share/include/kernel/drivertools.h,sha256=jHGOmnyVCjfvUvoBfQvD9O-Tu6pfs4WVbPbQZv1Mhd4,33537
|
143
144
|
pyosys/share/include/kernel/log.h,sha256=NZNJPBf-F_sISwfmJ_GQPm1Z9UzUCYQD6jHiWnsVorY,15380
|
144
145
|
pyosys/share/include/kernel/json.h,sha256=tE3AgUslbZd5TRFEipj0HptYjWgNfMjzV44l3A5zAu8,2851
|
File without changes
|
File without changes
|
File without changes
|