From 33e80b96c7aac6b93e6bee18572abf529f8cc1fa Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 16 Feb 2015 12:41:48 +0100 Subject: Added YosysJS wrapper --- misc/yosysjs/demo01.html | 237 +++++++++++++++++++++++++++++++++++++++++++++++ misc/yosysjs/demo02.html | 102 ++++++++++++++++++++ misc/yosysjs/yosysjs.js | 159 +++++++++++++++++++++++++++++++ 3 files changed, 498 insertions(+) create mode 100644 misc/yosysjs/demo01.html create mode 100644 misc/yosysjs/demo02.html create mode 100644 misc/yosysjs/yosysjs.js (limited to 'misc/yosysjs') diff --git a/misc/yosysjs/demo01.html b/misc/yosysjs/demo01.html new file mode 100644 index 00000000..e0ba0248 --- /dev/null +++ b/misc/yosysjs/demo01.html @@ -0,0 +1,237 @@ + + YosysJS Example Application #01 + +

YosysJS Example Application #01

+
[ load example ]
+ + +
+

Loading...
+ + + + diff --git a/misc/yosysjs/demo02.html b/misc/yosysjs/demo02.html new file mode 100644 index 00000000..ec33198c --- /dev/null +++ b/misc/yosysjs/demo02.html @@ -0,0 +1,102 @@ + + YosysJS Example Application #02 + + + +

YosysJS Example Application #02

+

+

+ + + +

+ + + + diff --git a/misc/yosysjs/yosysjs.js b/misc/yosysjs/yosysjs.js new file mode 100644 index 00000000..ad6df348 --- /dev/null +++ b/misc/yosysjs/yosysjs.js @@ -0,0 +1,159 @@ +var YosysJS = new function() { + this.script_element = document.currentScript; + this.viz_element = undefined; + + this.url_prefix = this.script_element.src.replace(/[^/]+$/, '') + + this.load_viz = function() { + if (this.viz_element) + return; + + this.viz_element = document.createElement('iframe') + this.viz_element.style.display = 'none' + document.body.appendChild(this.viz_element); + + this.viz_element.contentWindow.document.open() + this.viz_element.contentWindow.document.write('