-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy kvakil/venus to github.com/kvakil/venus.git:gh-pages
- Loading branch information
0 parents
commit 4303f13
Showing
544 changed files
with
20,609 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>venus</title><link rel="stylesheet" type="text/css" href="css/venus.css"></head><body><div class="tabs is-boxed is-centered"><ul><li id="editor-tab" class="is-active"><a onclick="driver.openEditor()">Editor</a></li><li id="simulator-tab"><a onclick="codeMirror.save(); driver.openSimulator()">Simulator</a></li></ul></div><div class="container is-fluid"><section class="section" id="editor-tab-view"><div class="field"><div class="control"><textarea class="textarea is-primary is-medium" placeholder="type RISC-V assembly here" id="asm-editor"></textarea></div></div></section></div><section class="section" id="simulator-tab-view"><div class="tile is-ancestor"><div class="tile is-vertical is-8"><div class="tile"><div class="tile is-parent"><article class="tile is-child is-primary" id="simulator-controls-container"><div class="field is-grouped is-grouped-centered"><div class="control"><button id="simulator-run" class="button is-primary" onclick="driver.run()">Run</button></div><div class="control"><button id="simulator-step" class="button" onclick="driver.step()">Step</button></div><div class="control"><button id="simulator-undo" class="button" onclick="driver.undo()">Prev</button></div><div class="control"><button id="simulator-reset" class="button" onclick="driver.reset()">Reset</button></div></div></article></div></div><div class="tile"><div class="tile is-parent"><article class="tile is-child is-primary" id="program-listing-container"><table id="program-listing" class="table"><colgroup><col id="mc-column"><col id="oc-column"></colgroup><thead><tr><th>Machine Code</th><th>Original Code</th></tr></thead><tbody id="program-listing-body"></tbody></table></article></div></div><div class="tile is-parent"><article class="tile is-child"><textarea id="console-output" class="textarea" placeholder="console output" readonly></textarea></article></div></div><div class="tile is-parent"><article class="tile is-child" id="sidebar-listings-container"><nav class="panel"><p class="panel-tabs"><a id="register-tab" class="is-active" onclick="driver.openRegisterTab()">Registers</a> <a id="memory-tab" onclick="driver.openMemoryTab()">Memory</a></p><div id="register-tab-view"><div id="reg-0" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-0-val">zero</label></div><div class="field-body is-expanded"><input id="reg-0-val" class="input is-small" onblur="driver.saveRegister(this, 0)" spellcheck="false"></div></div></div><div id="reg-1" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-1-val">ra</label></div><div class="field-body is-expanded"><input id="reg-1-val" class="input is-small" onblur="driver.saveRegister(this, 1)" spellcheck="false"></div></div></div><div id="reg-2" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-2-val">sp</label></div><div class="field-body is-expanded"><input id="reg-2-val" class="input is-small" onblur="driver.saveRegister(this, 2)" spellcheck="false"></div></div></div><div id="reg-3" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-3-val">gp</label></div><div class="field-body is-expanded"><input id="reg-3-val" class="input is-small" onblur="driver.saveRegister(this, 3)" spellcheck="false"></div></div></div><div id="reg-4" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-4-val">tp</label></div><div class="field-body is-expanded"><input id="reg-4-val" class="input is-small" onblur="driver.saveRegister(this, 4)" spellcheck="false"></div></div></div><div id="reg-5" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-5-val">t0</label></div><div class="field-body is-expanded"><input id="reg-5-val" class="input is-small" onblur="driver.saveRegister(this, 5)" spellcheck="false"></div></div></div><div id="reg-6" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-6-val">t1</label></div><div class="field-body is-expanded"><input id="reg-6-val" class="input is-small" onblur="driver.saveRegister(this, 6)" spellcheck="false"></div></div></div><div id="reg-7" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-7-val">t2</label></div><div class="field-body is-expanded"><input id="reg-7-val" class="input is-small" onblur="driver.saveRegister(this, 7)" spellcheck="false"></div></div></div><div id="reg-8" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-8-val">s0</label></div><div class="field-body is-expanded"><input id="reg-8-val" class="input is-small" onblur="driver.saveRegister(this, 8)" spellcheck="false"></div></div></div><div id="reg-9" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-9-val">s1</label></div><div class="field-body is-expanded"><input id="reg-9-val" class="input is-small" onblur="driver.saveRegister(this, 9)" spellcheck="false"></div></div></div><div id="reg-10" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-10-val">a0</label></div><div class="field-body is-expanded"><input id="reg-10-val" class="input is-small" onblur="driver.saveRegister(this, 10)" spellcheck="false"></div></div></div><div id="reg-11" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-11-val">a1</label></div><div class="field-body is-expanded"><input id="reg-11-val" class="input is-small" onblur="driver.saveRegister(this, 11)" spellcheck="false"></div></div></div><div id="reg-12" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-12-val">a2</label></div><div class="field-body is-expanded"><input id="reg-12-val" class="input is-small" onblur="driver.saveRegister(this, 12)" spellcheck="false"></div></div></div><div id="reg-13" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-13-val">a3</label></div><div class="field-body is-expanded"><input id="reg-13-val" class="input is-small" onblur="driver.saveRegister(this, 13)" spellcheck="false"></div></div></div><div id="reg-14" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-14-val">a4</label></div><div class="field-body is-expanded"><input id="reg-14-val" class="input is-small" onblur="driver.saveRegister(this, 14)" spellcheck="false"></div></div></div><div id="reg-15" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-15-val">a5</label></div><div class="field-body is-expanded"><input id="reg-15-val" class="input is-small" onblur="driver.saveRegister(this, 15)" spellcheck="false"></div></div></div><div id="reg-16" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-16-val">a6</label></div><div class="field-body is-expanded"><input id="reg-16-val" class="input is-small" onblur="driver.saveRegister(this, 16)" spellcheck="false"></div></div></div><div id="reg-17" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-17-val">a7</label></div><div class="field-body is-expanded"><input id="reg-17-val" class="input is-small" onblur="driver.saveRegister(this, 17)" spellcheck="false"></div></div></div><div id="reg-18" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-18-val">s2</label></div><div class="field-body is-expanded"><input id="reg-18-val" class="input is-small" onblur="driver.saveRegister(this, 18)" spellcheck="false"></div></div></div><div id="reg-19" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-19-val">s3</label></div><div class="field-body is-expanded"><input id="reg-19-val" class="input is-small" onblur="driver.saveRegister(this, 19)" spellcheck="false"></div></div></div><div id="reg-20" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-20-val">s4</label></div><div class="field-body is-expanded"><input id="reg-20-val" class="input is-small" onblur="driver.saveRegister(this, 20)" spellcheck="false"></div></div></div><div id="reg-21" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-21-val">s5</label></div><div class="field-body is-expanded"><input id="reg-21-val" class="input is-small" onblur="driver.saveRegister(this, 21)" spellcheck="false"></div></div></div><div id="reg-22" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-22-val">s6</label></div><div class="field-body is-expanded"><input id="reg-22-val" class="input is-small" onblur="driver.saveRegister(this, 22)" spellcheck="false"></div></div></div><div id="reg-23" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-23-val">s7</label></div><div class="field-body is-expanded"><input id="reg-23-val" class="input is-small" onblur="driver.saveRegister(this, 23)" spellcheck="false"></div></div></div><div id="reg-24" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-24-val">s8</label></div><div class="field-body is-expanded"><input id="reg-24-val" class="input is-small" onblur="driver.saveRegister(this, 24)" spellcheck="false"></div></div></div><div id="reg-25" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-25-val">s9</label></div><div class="field-body is-expanded"><input id="reg-25-val" class="input is-small" onblur="driver.saveRegister(this, 25)" spellcheck="false"></div></div></div><div id="reg-26" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-26-val">s10</label></div><div class="field-body is-expanded"><input id="reg-26-val" class="input is-small" onblur="driver.saveRegister(this, 26)" spellcheck="false"></div></div></div><div id="reg-27" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-27-val">s11</label></div><div class="field-body is-expanded"><input id="reg-27-val" class="input is-small" onblur="driver.saveRegister(this, 27)" spellcheck="false"></div></div></div><div id="reg-28" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-28-val">t3</label></div><div class="field-body is-expanded"><input id="reg-28-val" class="input is-small" onblur="driver.saveRegister(this, 28)" spellcheck="false"></div></div></div><div id="reg-29" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-29-val">t4</label></div><div class="field-body is-expanded"><input id="reg-29-val" class="input is-small" onblur="driver.saveRegister(this, 29)" spellcheck="false"></div></div></div><div id="reg-30" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-30-val">t5</label></div><div class="field-body is-expanded"><input id="reg-30-val" class="input is-small" onblur="driver.saveRegister(this, 30)" spellcheck="false"></div></div></div><div id="reg-31" class="panel-block"><div class="field is-horizontal"><div class="field-label"><label class="label is-small" for="reg-31-val">t6</label></div><div class="field-body is-expanded"><input id="reg-31-val" class="input is-small" onblur="driver.saveRegister(this, 31)" spellcheck="false"></div></div></div></div><table id="memory-tab-view" class="table is-striped"><colgroup><col id="addr-column"><col id="byte0-column"><col id="byte1-column"><col id="byte2-column"><col id="byte3-column"></colgroup><thead><tr><th>Address</th><th>+0</th><th>+1</th><th>+2</th><th>+3</th></tr></thead><tr id="mem-row-6"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row-5"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row-4"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row-3"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row-2"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row-1"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row-0"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row--1"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row--2"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row--3"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row--4"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row--5"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr id="mem-row--6"><td>0x00000000</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></table></nav></article></div></div></section><script type="text/javascript" src="js/codemirror.js"></script><script type="text/javascript" src="venus.js"></script><script type="text/javascript">var driver = venus_main.venus.glue.Driver; | ||
var editor = document.getElementById("asm-editor"); | ||
var codeMirror = CodeMirror.fromTextArea(editor, | ||
{ | ||
lineNumbers: true, | ||
mode: "riscv", | ||
indentUnit: 4, | ||
autofocus: true | ||
} | ||
); | ||
codeMirror.setSize("100%", "88vh");</script></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,283 @@ | ||
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300i,400,700); | ||
|
||
body, table { | ||
padding:50px; | ||
font:14px/1.5 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
color:#555; | ||
font-weight:300; | ||
margin-left: auto; | ||
margin-right: auto; | ||
max-width: 1440px; | ||
} | ||
|
||
.keyword { | ||
color:black; | ||
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; | ||
font-size:12px; | ||
} | ||
|
||
.symbol { | ||
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; | ||
font-size:12px; | ||
} | ||
|
||
.identifier { | ||
color: darkblue; | ||
font-size:12px; | ||
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; | ||
} | ||
|
||
h1, h2, h3, h4, h5, h6 { | ||
color:#222; | ||
margin:0 0 20px; | ||
} | ||
|
||
p, ul, ol, table, pre, dl { | ||
margin:0 0 20px; | ||
} | ||
|
||
h1, h2, h3 { | ||
line-height:1.1; | ||
} | ||
|
||
h1 { | ||
font-size:28px; | ||
} | ||
|
||
h2 { | ||
color:#393939; | ||
} | ||
|
||
h3, h4, h5, h6 { | ||
color:#494949; | ||
} | ||
|
||
a { | ||
color:#258aaf; | ||
font-weight:400; | ||
text-decoration:none; | ||
} | ||
|
||
a:hover { | ||
color: inherit; | ||
text-decoration:underline; | ||
} | ||
|
||
a small { | ||
font-size:11px; | ||
color:#555; | ||
margin-top:-0.6em; | ||
display:block; | ||
} | ||
|
||
.wrapper { | ||
width:860px; | ||
margin:0 auto; | ||
} | ||
|
||
blockquote { | ||
border-left:1px solid #e5e5e5; | ||
margin:0; | ||
padding:0 0 0 20px; | ||
font-style:italic; | ||
} | ||
|
||
code, pre { | ||
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; | ||
color:#333; | ||
font-size:12px; | ||
} | ||
|
||
pre { | ||
display: block; | ||
/* | ||
padding:8px 8px; | ||
background: #f8f8f8; | ||
border-radius:5px; | ||
border:1px solid #e5e5e5; | ||
*/ | ||
overflow-x: auto; | ||
} | ||
|
||
table { | ||
width:100%; | ||
border-collapse:collapse; | ||
} | ||
|
||
th, td { | ||
text-align:left; | ||
vertical-align: top; | ||
padding:5px 10px; | ||
} | ||
|
||
dt { | ||
color:#444; | ||
font-weight:700; | ||
} | ||
|
||
th { | ||
color:#444; | ||
} | ||
|
||
img { | ||
max-width:100%; | ||
} | ||
|
||
header { | ||
width:270px; | ||
float:left; | ||
position:fixed; | ||
} | ||
|
||
header ul { | ||
list-style:none; | ||
height:40px; | ||
|
||
padding:0; | ||
|
||
background: #eee; | ||
background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); | ||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); | ||
background: -webkit-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); | ||
background: -o-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); | ||
background: -ms-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); | ||
background: linear-gradient(top, #f8f8f8 0%,#dddddd 100%); | ||
|
||
border-radius:5px; | ||
border:1px solid #d2d2d2; | ||
box-shadow:inset #fff 0 1px 0, inset rgba(0,0,0,0.03) 0 -1px 0; | ||
width:270px; | ||
} | ||
|
||
header li { | ||
width:89px; | ||
float:left; | ||
border-right:1px solid #d2d2d2; | ||
height:40px; | ||
} | ||
|
||
header ul a { | ||
line-height:1; | ||
font-size:11px; | ||
color:#999; | ||
display:block; | ||
text-align:center; | ||
padding-top:6px; | ||
height:40px; | ||
} | ||
|
||
strong { | ||
color:#222; | ||
font-weight:700; | ||
} | ||
|
||
header ul li + li { | ||
width:88px; | ||
border-left:1px solid #fff; | ||
} | ||
|
||
header ul li + li + li { | ||
border-right:none; | ||
width:89px; | ||
} | ||
|
||
header ul a strong { | ||
font-size:14px; | ||
display:block; | ||
color:#222; | ||
} | ||
|
||
section { | ||
width:500px; | ||
float:right; | ||
padding-bottom:50px; | ||
} | ||
|
||
small { | ||
font-size:11px; | ||
} | ||
|
||
hr { | ||
border:0; | ||
background:#e5e5e5; | ||
height:1px; | ||
margin:0 0 20px; | ||
} | ||
|
||
footer { | ||
width:270px; | ||
float:left; | ||
position:fixed; | ||
bottom:50px; | ||
} | ||
|
||
@media print, screen and (max-width: 960px) { | ||
|
||
div.wrapper { | ||
width:auto; | ||
margin:0; | ||
} | ||
|
||
header, section, footer { | ||
float:none; | ||
position:static; | ||
width:auto; | ||
} | ||
|
||
header { | ||
padding-right:320px; | ||
} | ||
|
||
section { | ||
border:1px solid #e5e5e5; | ||
border-width:1px 0; | ||
padding:20px 0; | ||
margin:0 0 20px; | ||
} | ||
|
||
header a small { | ||
display:inline; | ||
} | ||
|
||
header ul { | ||
position:absolute; | ||
right:50px; | ||
top:52px; | ||
} | ||
} | ||
|
||
@media print, screen and (max-width: 720px) { | ||
body { | ||
word-wrap:break-word; | ||
} | ||
|
||
header { | ||
padding:0; | ||
} | ||
|
||
header ul, header p.view { | ||
position:static; | ||
} | ||
|
||
pre, code { | ||
word-wrap:normal; | ||
} | ||
} | ||
|
||
@media print, screen and (max-width: 480px) { | ||
body { | ||
padding:15px; | ||
} | ||
|
||
header ul { | ||
display:none; | ||
} | ||
} | ||
|
||
@media print { | ||
body { | ||
padding:0.4in; | ||
font-size:12pt; | ||
color:#444; | ||
} | ||
} |
Oops, something went wrong.