Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: amaranth-lang/amaranth-yosys
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf453250edb4
Choose a base ref
...
head repository: amaranth-lang/amaranth-yosys
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6bf64efb9475
Choose a head ref
  • 6 commits
  • 5 files changed
  • 1 contributor

Commits on Jun 21, 2020

  1. Update wasmtime.

    whitequark committed Jun 21, 2020
    Copy the full SHA
    85ab7a8 View commit details
  2. Remove importlib_metadata dependency.

    The consumer of the package can use it just as well as we can, and
    it's one less thing to import at startup.
    whitequark committed Jun 21, 2020
    Copy the full SHA
    8766711 View commit details
  3. [skip ci] Remove the installed shared directory before copying over.

    This helps to avoid stray files in repeated local builds.
    whitequark committed Jun 21, 2020
    Copy the full SHA
    db4407f View commit details
  4. Update wasmtime.

    Wasmtime 0.17 seems to have broken argv, and wasmtime 0.18 seems to
    have broken exit(), but at least it works better.
    whitequark committed Jun 21, 2020
    Copy the full SHA
    53292cb View commit details

Commits on Jun 24, 2020

  1. Update default branch name.

    To match YoWASP.
    whitequark committed Jun 24, 2020
    Copy the full SHA
    deecf79 View commit details
  2. Handle the WASI exit trap.

    whitequark committed Jun 24, 2020
    Copy the full SHA
    6bf64ef View commit details
Showing with 9 additions and 10 deletions.
  1. +1 −1 .github/workflows/main.yml
  2. +1 −0 build.sh
  3. +0 −5 nmigen_yosys/__init__.py
  4. +6 −2 nmigen_yosys/__main__.py
  5. +1 −2 setup.py
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:
name: wheel
path: dist/
- name: Publish wheels to Test PyPI
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.event.ref == 'refs/heads/develop'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -101,5 +101,6 @@ backends/verilog/verilog_backend.o \
make -C yosys-src GIT_REV="${YOSYS_GIT_REV}" YOSYS_VER="${YOSYS_VER}" YOSYS_VER_STR="${YOSYS_VER_STR}" OBJS="${YOSYS_OBJS}" PRETTY=0 CXX="ccache clang"

cp yosys-src/yosys.wasm nmigen_yosys/
rm -rf nmigen_yosys/share
mkdir -p nmigen_yosys/share/include/backends/cxxrtl
cp yosys-src/share/include/backends/cxxrtl/* nmigen_yosys/share/include/backends/cxxrtl/
5 changes: 0 additions & 5 deletions nmigen_yosys/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
try:
from importlib import metadata as importlib_metadata # py3.8+ stdlib
except ImportError:
import importlib_metadata # py3.7- shim
__version__ = importlib_metadata.version(__package__)
8 changes: 6 additions & 2 deletions nmigen_yosys/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
import wasmtime
try:
@@ -10,7 +11,7 @@
wasm_cfg.cache = True

wasi_cfg = wasmtime.WasiConfig()
wasi_cfg.set_argv(["yosys", *sys.argv[1:]])
wasi_cfg.argv = ("nmigen-yosys", *sys.argv[1:])
wasi_cfg.preopen_dir(".", ".")
wasi_cfg.inherit_stdin()
wasi_cfg.inherit_stdout()
@@ -22,4 +23,7 @@
"wasi_snapshot_preview1", wasi_cfg))
yosys = linker.instantiate(wasmtime.Module(store,
importlib_resources.read_binary(__package__, "yosys.wasm")))
yosys.exports["_start"]()
try:
yosys.exports["_start"]()
except wasmtime.ExitTrap as trap:
sys.exit(trap.code)
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -31,9 +31,8 @@ def long_description():
python_requires="~=3.5",
setup_requires=["setuptools_scm", "wheel"],
install_requires=[
"importlib_metadata; python_version<'3.8'",
"importlib_resources; python_version<'3.7'",
"wasmtime~=0.16.0"
"wasmtime~=0.18.1"
],
packages=["nmigen_yosys"],
package_data={"nmigen_yosys": ["yosys.wasm", "share/**/**/**/*"]},