From 3e5e9a38895b0ce45c185916fa946dec38ffbab3 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 16 Feb 2015 13:23:54 +0100 Subject: [PATCH] More YosysJS stuff --- .gitignore | 2 +- kernel/driver.cc | 4 ++ misc/yosysjs/demo01.html | 110 +++++++++++++-------------------------- misc/yosysjs/demo02.html | 8 +-- misc/yosysjs/yosysjs.js | 64 ++++++++++++++--------- 5 files changed, 83 insertions(+), 105 deletions(-) diff --git a/.gitignore b/.gitignore index 2e937c735..2b6f032e4 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,6 @@ /yosys-filterlib.exe /kernel/version_*.cc /share -/libyosys /yosys-win32-mxebin-* /yosys-win32-vcxsrc-* +/yosysjs-* diff --git a/kernel/driver.cc b/kernel/driver.cc index 69a7b8e15..d0ebdde77 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -73,6 +73,8 @@ int getopt(int argc, char **argv, const char *optstring) USING_YOSYS_NAMESPACE #ifdef EMSCRIPTEN +# include +# include extern "C" int main(int, char**); extern "C" void run(const char*); @@ -80,6 +82,8 @@ extern "C" const char *prompt(); int main(int, char**) { + mkdir("/work", 0777); + chdir("/work"); log_files.push_back(stdout); log_error_stderr = true; yosys_banner(); diff --git a/misc/yosysjs/demo01.html b/misc/yosysjs/demo01.html index e0ba0248f..1bcd99e6b 100644 --- a/misc/yosysjs/demo01.html +++ b/misc/yosysjs/demo01.html @@ -1,16 +1,34 @@ YosysJS Example Application #01 +

YosysJS Example Application #01

[ load example ]
- - +

Loading...
-