George Rennie
84ee345071
pyosys: support ObjRange
...
* this adds support for cells(), modules() and wires() that all return
ObjRanges, converting them into lists for python
2024-11-04 16:00:01 +01:00
Emil J
d1695ad998
Merge pull request #4666 from thorpej/dev/pkgsrc-patch-NetBSD-2
...
misc/yosys-config.in: don't use the non-portable '==' operator with test(1)
2024-10-22 13:10:52 +02:00
Emil J. Tywoniak
d5aadeae3b
py_wrap: remove some debug statements
2024-10-18 11:18:34 +02:00
Emil J. Tywoniak
f219bb357f
py_wrap: kinda fixed
2024-10-16 23:12:41 +02:00
Emil J. Tywoniak
86630bba08
py_wrap: nested classes
2024-10-16 22:55:17 +02:00
Emil J. Tywoniak
4b9c135098
py_wrap: refactor nesting_delta
2024-10-16 22:46:23 +02:00
Jason Thorpe
f75b1e838c
misc/yosys-config.in: don't use the non-portable '==' operator with
...
test(1).
2024-10-14 16:06:34 -07:00
Mohamed Gaber
3d6b8b8e1a
wheels: fix missing yosys-abc/share directory
...
* `misc/__init__.py`:
* checks if there's a `yosys-abc` in the same directory - if yes, sets the variable `sys._pyosys_abc`
* checks if there's a `share` in the same directory - if yes, sets the variable `sys._pyosys_share_dirname`
* `yosys.cc::init_share_dirname`: check for `sys._pyosys_share_dirname`, use it at the highest priority if Python is enabled
* `yosys.cc::init_abc_executable_name`: check for `sys._pyosys_abc`, use it at at the highest priority if Python is enabled
* `Makefile`: add new target, `share`, to only create the extra targets
* `setup.py`: compile libyosys.so, yosys-abc and share, and copy them all as part of the pyosys build
* `test/arch/ecp5/add_sub.py`: ported `add_sub.ys` to Python to act as a test for the share directory and abc with Python wheels, used in CI
2024-10-09 13:09:14 +03:00
Miodrag Milanovic
130dee6e56
Use alternate location for VS build required files
2024-07-09 14:19:33 +02:00
Miodrag Milanovic
2bbf3112d9
Update VS build to C++17 build
2024-06-17 17:29:20 +02:00
Rui Chen
b57a803f60
chore: fix master branch refs
...
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-03-24 00:41:54 -04:00
Roland Coeurjoly
5fa609b6bf
Fix help of yosys-config.in and provide backward compatibility
2024-02-25 18:48:21 +01:00
Roland Coeurjoly
cf7b6c66f0
Changes in misc/yosys-config.in. LDLIBS -> LIBS. LDFLAGS -> LINKFLAGS.
2024-02-25 18:35:43 +01:00
Martin Povišer
57db87c99f
py_wrap_generator: Handle const-qualified callbacks
2024-02-05 17:25:55 +01:00
Martin Povišer
bd06338172
py_wrap_generator: Fix handling of method name collisions
...
If two methods have the same signature but for qualifiers the Python
binding doesn't care about ('const'), do not generate a mangled name for
the method.
Fixes
.def<Wire (Module::*)(const IdString* )>("wire__YOSYS_NAMESPACE_RTLIL_IdString", &Module::wire__YOSYS_NAMESPACE_RTLIL_IdString)
.def<Cell (Module::*)(const IdString* )>("cell__YOSYS_NAMESPACE_RTLIL_IdString", &Module::cell__YOSYS_NAMESPACE_RTLIL_IdString)
in the output after the previous change.
2023-04-05 13:36:44 +02:00
Martin Povišer
f94f544b50
Fix the python generator for a bunch of const cases
...
Makes the below show up in the binding.
.def<const char * (IdString::*)(void)>("c_str", &IdString::c_str)
.def<boost::python::list (SigSpec::*)(void)>("chunks", &SigSpec::chunks)
.def<boost::python::list (SigSpec::*)(void)>("bits", &SigSpec::bits)
.def<SigBit (SigSpec::*)(int, const SigBit* )>("at", &SigSpec::at)
.def<SigSpec (Cell::*)(const IdString* )>("getPort", &Cell::getPort)
.def<boost::python::dict (Cell::*)(void)>("connections", &Cell::connections)
.def<Const (Cell::*)(const IdString* )>("getParam", &Cell::getParam)
.def<boost::python::list (Module::*)(void)>("connections", &Module::connections)
def<const char * (*)(const SigSpec* )>("log_signal", YOSYS_PYTHON::log_signal);
def<const char * (*)(const SigSpec* , bool)>("log_signal", YOSYS_PYTHON::log_signal);
def<const char * (*)(const Const* )>("log_const", YOSYS_PYTHON::log_const);
def<const char * (*)(const Const* , bool)>("log_const", YOSYS_PYTHON::log_const);
def<const char * (*)(const IdString* )>("log_id", YOSYS_PYTHON::log_id);
2023-04-05 13:36:44 +02:00
Aki Van Ness
7a73133c9f
backends: protobuf: removed protobuf backend
2022-10-10 10:41:11 -04:00
Henner Zeller
f09bf58b6e
Fix hard-coded path to /bin/bash -> /usr/bin/env bash
...
On Posix systems, the path /bin/bash is not guaranteed to
exist and it is more portable to use /usr/bin/env instead.
Fixing this for yosys-config with is the most important for
a functioning installation.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2022-09-24 22:52:42 -07:00
Aki Van Ness
e3074c044a
misc: Added JNY schema definition
2022-08-02 07:23:45 -04:00
Miodrag Milanović
63c9c9be5c
Merge pull request #3011 from DanielHuisman/pr-1
...
Update WaveDrom script URLs in YosysJS demo
2022-05-25 17:34:19 +02:00
Miodrag Milanović
62b89bb0d4
Update URL to zlib
2022-03-28 11:05:30 +02:00
Miodrag Milanovic
4a30c9cb94
Fix Visual Studio build
2022-02-02 11:46:06 +01:00
Daniel Huisman
1362ad0bf8
Update WaveDrom script URLs
2021-09-18 16:24:40 +02:00
Claire Xenia Wolf
0ada13cbe2
Use HTTPS for website links, gatecat email
...
git ls-tree -r --name-only HEAD | xargs sed -i -rf ~/fixemails.sed
s/((Claire|Xen|Xenia|Clifford)\s+)+(Wolf|Xen)\s+<(claire|clifford)@(symbioticeda.com|clifford.at|yosyshq.com)>/Claire Xenia Wolf <claire@yosyshq.com>/gi;
s/((Nina|Nak|N\.)\s+)+Engelhardt\s+<nak@(symbioticeda.com|yosyshq.com)>/N. Engelhardt <nak@yosyshq.com>/gi;
s/((David)\s+)+(Shah|gatecat)\s+<(dave|david|gatecat)@(symbioticeda.com|yosyshq.com|ds0.me)>/gatecat <gatecat@ds0.me>/gi;
s/((Miodrag)\s+)+Milanovic\s+<(miodrag|micko)@(symbioticeda.com|yosyshq.com)>/Miodrag Milanovic <micko@yosyshq.com>/gi;
s,https?://www.clifford.at/yosys/|http://yosyshq.net/yosys/,https://yosyshq.net/yosys/,g ;
2021-06-09 12:16:56 +02:00
Claire Xenia Wolf
72787f52fc
Fixing old e-mail addresses and deadnames
...
s/((Claire|Xen|Xenia|Clifford)\s+)+(Wolf|Xen)\s+<(claire|clifford)@(symbioticeda.com|clifford.at|yosyshq.com)>/Claire Xenia Wolf <claire@yosyshq.com>/gi;
s/((Nina|Nak|N\.)\s+)+Engelhardt\s+<nak@(symbioticeda.com|yosyshq.com)>/N. Engelhardt <nak@yosyshq.com>/gi;
s/((David)\s+)+Shah\s+<(dave|david)@(symbioticeda.com|yosyshq.com|ds0.me)>/David Shah <dave@ds0.me>/gi;
s/((Miodrag)\s+)+Milanovic\s+<(miodrag|micko)@(symbioticeda.com|yosyshq.com)>/Miodrag Milanovic <micko@yosyshq.com>/gi;
s,https?://www.clifford.at/yosys/,http://yosyshq.net/yosys/,g ;
2021-06-08 00:39:36 +02:00
Marcelina Kościelnicka
3d2aef0bde
Remove a few functions that, in fact, did not exist in the first place.
2021-03-06 01:19:49 +01:00
Xiretza
a367281d30
pyosys: Use C++11 override keyword for bindings
...
7191dd16
dropped the YS_OVERRIDE macro, but it was still being generated
by the python bindings generator, resulting in errors like these when
compiled with ENABLE_PYOSYS=1:
kernel/python_wrappers.cc:350:21: error: expected ‘;’ at end of member declaration
350 | virtual void help() YS_OVERRIDE;
| ^
| ;
kernel/python_wrappers.cc:350:23: error: ‘YS_OVERRIDE’ does not name a type
350 | virtual void help() YS_OVERRIDE;
| ^~~~~~~~~~~
2020-06-21 16:30:00 +02:00
Martin
43c34a7828
idict handling in wrapper
...
- Also, re-applied no-line-break workaround to rtlil.h to make parser
catch all methods.
2020-05-19 11:13:49 +02:00
Eddie Hung
4f847cb64a
yosys-config: spelling
2020-04-22 08:30:03 -07:00
Miodrag Milanovic
0d789c5a3b
Support custom PROGRAM_PREFIX
2020-04-10 10:38:40 +02:00
Stefan Biereigel
3d13b10859
remove namespace mention from inheritance information
2020-02-03 20:54:32 +01:00
Stefan Biereigel
362e3aa40f
expose polymorphism through python wrappers
2020-02-03 20:21:02 +01:00
Stefan Biereigel
3c9371589d
add inheritance for pywrap generators
2020-01-30 21:26:37 +01:00
Patrick Eibl
1e92e2d1de
handle anonymous unions to fix #1080
2019-11-21 14:10:34 -05:00
Benedikt Tutzer
79be986e22
Fix renaming all classes to Cpp*
...
(This is only relevant for classes that are exposed twice, one time as a
base class and one time as a derived class that can in turn be
overridden in python, but actually all others were renamed)
2019-10-09 14:21:52 +02:00
Benedikt Tutzer
9c59a56aa4
Expose global variables and allow logging to python streams
...
Global variables are now accessible via the Yosys class.
To capture Yosys output, once can now register an output stream in
Pyosys.
2019-10-09 13:59:35 +02:00
Benedikt Tutzer
f39269805d
Generate Python wrappers for inline constructors
...
Fixes : #1353
2019-09-23 13:17:59 +02:00
Sean Cross
417f3fe6b1
msys2: launcher: fix warnings and errors under g++
...
When building under G++, certain C-isms no longer work. For example,
we must now cast the return from `calloc()`.
Fix `launcher.c` so that it builds under whatever $CXX is set to,
which is usually a C++ compiler.
Signed-off-by: Sean Cross <sean@xobs.io>
2019-09-08 15:50:24 +08:00
Clifford Wolf
a3de83ef4a
Merge pull request #1112 from acw1251/pyosys_sigsig_issue
...
Fixed pyosys commands returning RTLIL::SigSig
2019-08-25 11:22:02 +02:00
Miodrag Milanovic
28b7053a01
Fix formatting for msys2 mingw build using GetSize
2019-08-01 17:27:34 +02:00
Benedikt Tutzer
3a1a41bdb1
Throw runtime exception when trying to convert a c++-pointer to a
...
python-object in case the pointer is a nullptr to avoid a segfault.
Fixes #1090
2019-07-04 14:20:13 +02:00
acw1251
60eaaf6e0f
Fixed pyosys commands returning RTLIL::SigSig
2019-06-19 15:39:56 -04:00
Stefan Biereigel
d018e02614
remove boost/log/exceptions.hpp from wrapper generator
2019-06-07 09:47:33 +02:00
Clifford Wolf
dd3c333c0a
Remove yosys_banner() from python wrapper init, fixes #1056
...
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2019-06-05 08:57:33 +02:00
Benedikt Tutzer
124a284487
Cleaned up root directory
2019-04-30 13:19:04 +02:00
William D. Jones
ff15cf9b1f
Install launcher executable when running yosys-smtbmc on Windows.
...
Signed-off-by: William D. Jones <thor0505@comcast.net>
2019-03-13 13:49:16 -04:00
Larry Doolittle
e2fc18f27b
Reduce amount of trailing whitespace in code base
2019-02-28 14:58:11 -08:00
Clifford Wolf
031824e38c
Update to v2 YosysVS template
...
Signed-off-by: Clifford Wolf <clifford@clifford.at>
2018-09-28 17:20:16 +02:00
Serge Bazanski
53e9a1549c
Add Protobuf backend
...
Signed-off-by: Serge Bazanski <q3k@symbioticeda.com>
2018-06-19 13:34:56 +01:00
Clifford Wolf
f42218682d
Added examples/ top-level directory
2015-10-13 15:41:20 +02:00