This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
282 lines (255 loc) · 10.7 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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.8, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="stylesheet.css">
<title>Simulador de computador</title>
</head>
<body>
<!-- HEADER -->
<section>
<div class="jumbotron jumbotron-fluid text-center bg-dark text-light">
<h1>Von Neumann Simulator</h1>
</div>
</section>
<!-- CORPO -->
<section class="section m-5">
<div id="corpo" class="container-fluid border pt-5 pl-5 pr-5 pb-0">
<div class="row">
<!-- MEMÓRIA RAM -->
<div class="col p-0 border-left border-bottom">
<div class="border retangulo m-0">
<p class="ml-2 mt-1">RAM</p>
<!-- Células da memória RAM -->
<table id="celulasMemoria" class="table celulasMemoria">
<tbody>
<tr>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
</tr>
<tr>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
</tr>
<tr>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
</tr>
<tr>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
</tr>
<tr>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
<td class="border">0000</td>
</tr>
</tbody>
</table>
</div>
<form id="execute">
<button type="submit" class="btn btn-secondary">EXECUTE</button>
</form>
</div>
<!-- VERTICAL RULE -->
<div class="col-1 p-0">
<hr color="white">
</div>
<!-- CPU -->
<div class="col p-0">
<div class="border quadrado m-0">
<!-- COMPONENTS -->
<div class="row">
<!-- REGISTERS -->
<div class="col-3 p-0">
<div id="registrador" class="retangulo border ml-4 mt-3">
<p class="m-2">REG</p>
<table id="registradorTable" class="table celulasMemoria">
<tbody>
<tr><td class="border regLabel">rg1</td><td class="border regDisplay">0001</td></tr>
<tr><td class="border regLabel">rg2</td><td class="border regDisplay">0010</td></tr>
<tr><td class="border regLabel">rg3</td><td class="border regDisplay">0011</td></tr>
<tr><td class="border regLabel">rg4</td><td class="border regDisplay">0100</td></tr>
<tr><td class="border regLabel">rg5</td><td class="border regDisplay">0101</td></tr>
<tr><td class="border regLabel">rg6</td><td class="border regDisplay">0110</td></tr>
<tr><td class="border regLabel">rg7</td><td class="border regDisplay">0111</td></tr>
<tr><td class="border regLabel">rg8</td><td class="border regDisplay">1000</td></tr>
<tr><td class="border regLabel">rg9</td><td class="border regDisplay">1001</td></tr>
<tr><td class="border regLabel">rg10</td><td class="border regDisplay">1010</td></tr>
<tr><td class="border regLabel">rg11</td><td class="border regDisplay">1011</td></tr>
<tr><td class="border regLabel">rg12</td><td class="border regDisplay">1100</td></tr>
<tr><td class="border regLabel">rg13</td><td class="border regDisplay">1101</td></tr>
<tr><td class="border regLabel">rg14</td><td class="border regDisplay">1110</td></tr>
<tr><td class="border regLabel">rg15</td><td class="border regDisplay">1111</td></tr>
</tbody>
</table>
</div>
</div>
<!-- VERTICAL RULE -->
<div class="col-1 p-0 mt-3">
<hr color="white">
</div>
<!-- ALU -->
<div class="col-8 p-0">
<div class="retangulo border mr-4 mt-3">
<p class="m-2">ALU</p>
<div id="alu" class="border">
<p class="m-2">EXEC</p>
<p id="executando" class="m-2 aluFuncao"></p>
</div>
<div class="border flags">
<p class="m-2">FLAGS</p>
<p class="m-2"></p>
</div>
</div>
<div id="pc" class="border">
<p class="m-2">PC</p>
<p class="m-2 pcFuncao"></p>
</div>
<div id="ir" class="border">
<p class="m-2">IR</p>
<p class="m-2 irFuncao"></p>
</div>
</div>
</div>
</div>
<p>CPU</p>
</div>
</div>
<!-- Linha que conecta INPUT a RAM -->
<hr class="m-0 w-50" color="white">
<div class="vr"></div>
</div>
<!-- Vertical rule feito com css -->
<div class="vr"></div>
<!-- INPUT -->
<p class="d-flex justify-content-center inputDisplay m-0">INPUT</p>
<!-- Vertical rule feito com css -->
<div class="vr"></div>
<!-- Display dos binarios -->
<div class="container">
<div class="row">
<div class="col-sm text-right">
<lead id="displayBin1">0</lead>
</div>
<div class="col-sm">
<lead id="displayBin2">0</lead>
</div>
</div>
</div>
<!-- ENTRADAS (escolha de função e variaveis) -->
<form id="submit">
<div class="container d-flex justify-content-center">
<!-- ESCOLHA DE FUNÇÃO -->
<select id="selectFuncao" class="form-control entrada">
<option disabled selected>function</option>
<option>load</option>
<option disabled>store</option>
<option>and</option>
<option>or</option>
<option>not</option>
<option>add</option>
<option>sub</option>
<option>mult</option>
<option>div</option>
<option>jmp==</option>
<option>jmp!=</option>
<option>jmp></option>
<option>jmp<</option>
<option>jmp</option>
<option>nop</option>
</select>
<div class="input-group entrada">
<!-- PRIMEIRO INPUT -->
<input id="entrada1" type="number" name="entrada1" class="form-control" placeholder="variable 1" maxlength="2" max="15" min="0" >
</div>
<div class="input-group entrada">
<!-- SEGUNDO INPUT -->
<select id="selectRegister" class="form-control entrada">
<option disabled selected>select reg</option>
<option value="0001">reg 1</option>
<option value="0010">reg 2</option>
<option value="0011">reg 3</option>
<option value="0100">reg 4</option>
<option value="0101">reg 5</option>
<option value="0110">reg 6</option>
<option value="0111">reg 7</option>
<option value="1000">reg 8</option>
<option value="1001">reg 9</option>
<option value="1010">reg 10</option>
<option value="1011">reg 11</option>
<option value="1100">reg 12</option>
<option value="1101">reg 13</option>
<option value="1110">reg 14</option>
<option value="1111">reg 15</option>
</select>
</div>
<!-- SUBMIT -->
<button type="submit" class="btn btn-secondary entrada">Submit</button>
</div>
</form>
<!-- FIM DAS ENTRADAS -->
</div>
</section>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<!-- Custom JavaScript -->
<script src="script.js" charset="utf-8"></script>
</body>
<footer>
<!-- HEADER -->
<section>
<div class="jumbotron jumbotron-fluid text-center bg-dark text-light m-0">
<p class="lead">Arthur Vasconcellos — Cláudio Montenegro — Matheus José — Gabriel de Andrade <br><br>
<a href="https://github.com/arthursvpb/vn-simulator" target="_blank">Project source code</a></p>
<i class="fab fa-github"></i>
</div>
</section>
</footer>
</html>