YosysHQ / arachne-pnr

Place and route tool for FPGAs
MIT License
413 stars 72 forks source link

Better emscripten support #80

Closed ArcaneNibble closed 6 years ago

ArcaneNibble commented 6 years ago

This depends on my previous #73 PR.

The last commit modifies arachne-pnr to mount emscripten's NODEFS on /x if the resulting javascript is run under nodejs. This is useful for testing so that the resulting javascript can interact with files on the host filesystem. By default, emscripten-compiled output can only access its in-memory virtual filesystem. It also isn't possible to mount additional emscripten filesystems over the root, so as a compromise NODEFS is mounted on /x. After this change, it is possible to run commands like

$ nodejs ./bin/arachne-pnr.js -d 8k /x/tests/simple/carry.blif -o /x/carry.asc

This will create a carry.asc in the current working directory.