-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
211 lines (199 loc) · 7.74 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>MIPS Pipeline Simulator</title>
<link rel="icon" href="images/favicon.ico" />
<!-- Bootstrap CSS -->
<link href="depends/bootstrap-4.0.0/css/bootstrap.min.css" rel="stylesheet" />
<!-- Site CSS -->
<link href="css/styles.css" rel="stylesheet" />
<!-- jQuery -->
<script src="depends/jquery-3.3.1.min.js"></script>
<!-- Bootstrap JS -->
<script src="depends/bootstrap-4.0.0/js/bootstrap.min.js"></script>
</head>
<body>
<div id="content-wrap">
<!-- Navbar -->
<nav class="navbar navbar-expand-md">
<span class="navbar-brand">MIPS Pipeline Simulator</span>
<button class="navbar-toggler hidden-sm-up float-xs-right" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a href="https://github.com/hunterhedges" class="nav-link">github.com/hunterhedges</a>
</li>
<li class="nav-item">
<a href="https://github.com/hunterhedges/mipsSimulator/blob/master/README.md#mips-simulator" class="nav-link">Docs</a>
</li>
<li class="nav-item">
<a href="https://github.com/hunterhedges/mipsSimulator" class="nav-link">Source</a>
</li>
</ul>
</div>
</nav>
<!-- End Navbar-->
<div id="main">
<!-- Upload Section -->
<div class="container text-center mx-auto">
<div class="row">
<div class="col-12 col-md-8 offset-md-2 upload-container" id="uploadContainer">
<a href="#" class="demo-link" onclick="readDemoFile()">No file? Try Demo!</a>
<div class="justify-content-center align-self-center mx-auto">
<img src="images/upload_icon.png" class="upload-icon" /> <br />
<input class="file-input" type="file" id="file" /> <br />
<a href="#" id="uploadLink">Choose a file</a> <span id="dragDropAvailable">or drag it here</span>
</div>
</div>
</div>
</div>
<!-- End Upload Section -->
<!-- Decoded Instructions Section -->
<div class="container text-center mx-auto">
<div class="row">
<div class="col-12 col-md-8 offset-md-2 decoded-instructions-container" id="decodedInstructionsContainer">
<h4>DECODED INSTRUCTIONS</h4>
<p id="decodedInstructions">
<!-- Decoded Instructions Inserted Here -->
</p>
<div class="row p-md-3">
<div class="col-12 col-md-4 m-1 m-md-0">
<button class="btn btn-primary" onclick="reset()">Upload New File</button>
</div>
<div class="col-12 col-md-4 m-1 m-md-0">
<button class="btn btn-primary" onclick="stepThrough()">Step Through</button>
</div>
<div class="col-12 col-md-4 m-1 m-md-0">
<button class="btn btn-primary" onclick="executeAll()">Execute All</button>
</div>
</div>
</div>
</div>
</div>
<!-- End Decoded Instructions Section -->
<!-- Simulation Section -->
<div class="container simulation-results-container" id="simulationResultsContainer">
<div class="row">
<div class="col-12 col-md-4 table-responsive">
<!-- Instruction Cache Table -->
<table class="table table-bordered table-sm">
<thead>
<tr>
<th class="text-center" colspan="2">Instructions</th>
</tr>
<tr>
<th>PC</th>
<th>Instruction</th>
</tr>
</thead>
<tbody id="simulationInstructions">
<!-- Instructions Inserted Here -->
</tbody>
</table>
</div>
<div class="col-12 col-md-4 table-responsive">
<!-- Register Table -->
<table class="table table-bordered table-sm">
<thead>
<tr>
<th class="text-center" colspan="2">Registers</th>
</tr>
<tr>
<th>Register</th>
<th>Value</th>
</tr>
</thead>
<tbody id="simulationRegisters">
<!-- Register States Inserted Here -->
</tbody>
</table>
</div>
<div class="col-12 col-md-4 table-responsive">
<!-- Memory Table -->
<table class="table table-bordered table-sm">
<thead>
<tr>
<th class="text-center" colspan="2">Memory</th>
</tr>
<tr>
<th>Location</th>
<th>Value</th>
</tr>
</thead>
<tbody id="simulationMemory">
<!-- Memory States Inserted Here -->
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-12 table-responsive">
<!-- Clock Cycles Table -->
<table class="table table-bordered table-sm">
<thead class="text-center">
<tr>
<!-- Set colspan attribute -->
<th id="clockCycleTitle">Clock Cycles</th>
</tr>
<tr id="simulationCycleNumber">
<!-- Insert Clock Cycle Number -->
</tr>
</thead>
<tbody id="simulationCycleData">
<!-- Clock Cycles Data Inserted Here -->
</tbody>
</table>
</div>
</div>
<div class="row text-center p-md-3">
<div class="col-12 col-md-3 m-1 m-md-0">
<button class="btn btn-primary" onclick="reset()">Upload New File</button>
</div>
<div class="col-12 col-md-3 m-1 m-md-0">
<a href="" class="btn btn-primary" id="downloadLink">Download as Text File</a>
</div>
<div class="col-12 col-md-3 m-1 m-md-0">
<button class="btn btn-primary" onclick="previousStep()" id="prevStepBtn">Previous Step</button>
</div>
<div class="col-12 col-md-3 m-1 m-md-0">
<button class="btn btn-primary" onclick="nextStep()" id="nextStepBtn">Next Step</button>
</div>
</div>
</div>
<!-- End Simulation Section -->
</div> <!-- End Main -->
</div> <!-- End Content-Wrapper -->
<!-- Pointless Footer is Aesthetic -->
<footer>
</footer>
<!-- End Aesthetic Footer -->
<!-- Error Modal -->
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalTitle" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalTitle"><!-- Modal Title --></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="modalBody">
<!-- Modal Body -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- End Error Modal -->
<script src="js/extensions.js"></script>
<script src="js/parseInputFile.js"></script>
<script src="js/mipsInstructions.js"></script>
<script src="js/simulate.js"></script>
</body>
</html>