diff options
Diffstat (limited to 'misc/yosysjs/demo03.html')
-rw-r--r-- | misc/yosysjs/demo03.html | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/misc/yosysjs/demo03.html b/misc/yosysjs/demo03.html index 36cc6cf4a..c9386aee8 100644 --- a/misc/yosysjs/demo03.html +++ b/misc/yosysjs/demo03.html @@ -24,16 +24,18 @@ endmodule <h1>YosysJS Example Application #03</h1> <b>Your mission:</b> Create a behavioral Verilog model for the following circuit: <p/> - <svg id="schem" width="800"></svg> - <p/> - <pre id="code" style="width: 800px; border:2px solid #000; padding: 0.5em;"><span class="noedit">module top(input clk, reset, input [7:0] A, output reg [7:0] Y); - always @(posedge clock) begin</span><span class="edit" contenteditable="true"> - Y <= A | {4{reset}}; - </span><span class="noedit">end -endmodule</span></pre><p/> - <input type="button" value="Check Model" onclick="check_model()"> <span id="checkmessage"></span> - <p/> - <p id="wave"> </p> + <div id="main" style="visibility: hidden"> + <svg id="schem" width="800"></svg> + <p/> + <pre id="code" style="width: 800px; border:2px solid #000; padding: 0.5em;"><span class="noedit">module top(input clk, reset, input [7:0] A, output reg [7:0] Y); + always @(posedge clock) begin</span><span class="edit" contenteditable="true"> + Y <= A | {4{reset}}; + </span><span class="noedit">end + endmodule</span></pre><p/> + <input type="button" value="Check Model" onclick="check_model()"> <span id="checkmessage"></span> + <p/> + <p id="wave"> </p> + </div> <script type="text/javascript"> function on_ys_ready() { ys.write_file('golden.v', document.getElementById('golden_verilog').textContent); @@ -42,6 +44,7 @@ endmodule</span></pre><p/> YosysJS.dot_into_svg(ys.read_file('show.dot'), 'schem'); document.getElementById('popup').style.visibility = 'hidden'; document.getElementById('popupmsg').textContent = 'Please wait..'; + document.getElementById('main').style.visibility = 'visible'; } function check_model() { function work() { |