forked from dcamarmas/creator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
700 lines (494 loc) · 27.3 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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
<!DOCTYPE html>
<html lang="en">
<!-- Head -->
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- Google tag (gtag.js) - GA4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-X30SC9SWE2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-X30SC9SWE2');
</script>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>CREATOR - didaCtic and geneRic assEmbly progrAmming simulaTOR</title>
<!-- Required stylesheets -->
<link type="text/css" rel="stylesheet" href="external/bootstrap_vue/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="external/bootstrap_vue/bootstrap-largegrid.min.css"/>
<link type="text/css" rel="stylesheet" href="external/bootstrap_vue/bootstrap-vue.min.css"/>
<link type="text/css" rel='stylesheet' href="external/fontawesome/css/all.css">
<link rel="stylesheet" href="external/codemirror/codemirror.css">
<link rel="stylesheet" href="css/style.css">
<!-- Required scripts -->
<script src="external/bootstrap_vue/polyfill.min.js"></script>
<script src="external/bootstrap_vue/vue.min.js"></script>
<script src="external/bootstrap_vue/bootstrap-vue.min.js"></script>
<script src="external/jquery.min.js"></script>
<script src="external/lodash.js"></script>
<!--Codemirror scripts-->
<script src="external/codemirror/codemirror.js"></script>
<script src="external/codemirror/keymap/vim.js"></script>
<script src="external/codemirror/keymap/sublime.js"></script>
<script src="external/codemirror/mode/gas/gas.js"></script>
<script src="external/codemirror/mode/javascript/javascript.js"></script>
<script src="external/codemirror/addon/display/autorefresh.js"></script>
<script src="external/codemirror/addon/comment/comment.js"></script>
<script src="external/codemirror/addon/hint/show-hint.js"></script>
<!--Apexcharts scripts-->
<script>
window.Promise ||
document.write(
'<script src="external/apexcharts/polyfill.min.js"><\/script>'
)
window.Promise ||
document.write(
'<script src="external/apexcharts/classList.min.js"><\/script>'
)
window.Promise ||
document.write(
'<script src="external/apexcharts/findindex_polyfill_mdn"><\/script>'
)
</script>
<script src="external/apexcharts/apexcharts"></script>
<script src="external/apexcharts/vue-apexcharts"></script>
<!-- Favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="./images/icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="./images/icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="./images/icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="./images/icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="./images/icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="./images/icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="./images/icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="./images/icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="./images/icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="./images/icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="./images/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="./images/icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="./images/icons/favicon-16x16.png">
<link rel="manifest" href="./images/icons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="./images/icons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<!-- Body -->
<body>
<div id="app">
<template>
<!------------------------>
<!-- General components -->
<!------------------------>
<!-- Loading spinner -->
<spinner-loading id="loading"
style="display: none">
</spinner-loading>
<!-- Browser not supported modal -->
<supported-browser id ="modalBrowser"></supported-browser>
<header>
<!-- Navbar -->
<navbar-creator :version="version"
:architecture_name="architecture_name">
</navbar-creator>
<!-- Configuration modal -->
<form-configuration id="configuration"
:default_architecture="default_architecture"
:stack_total_list="stack_total_list"
:autoscroll="autoscroll"
:instruction_help_size="instruction_help_size"
:notification_time="notification_time"
:dark="dark"
:c_debug="c_debug">
</form-configuration>
<!-- Information modals -->
<!-- Notification modal -->
<uielto-notifications id="notifications"
:notifications="notifications">
</uielto-notifications>
<!-- About modal -->
<uielto-about id="about"></uielto-about>
<!-- Instruction Help sidebar -->
<sidebar-instruction-help id="sidebar_help"
:architecture_name="architecture_name"
:architecture="architecture"
:architecture_guide="architecture_guide"
:instruction_help_size="instruction_help_size">
</sidebar-instruction-help>
<!-- Backup modal -->
<uielto-backup id="copy"></uielto-backup>
</header>
<!----------------------->
<!-- Load architecture -->
<!----------------------->
<b-container fluid align-h="center" id="load_menu" v-if="creator_mode == 'load_architecture'">
<b-row>
<b-col>
<!-- Navbar -->
<uielto-toolbar id="navbar_load_architecture"
components=" | | |btn_configuration,btn_information"
:browser="browser"
:arch_available="arch_available">
</uielto-toolbar>
<!-- Architecture menu -->
<b-container fluid align-h="center" class="mx-0 px-1" id="load_menu_arch">
<b-row>
<b-col>
<b-card-group deck>
<!-- Preload architecture card -->
<preload-architecture v-for="(item, index) in arch_available"
:arch_available="arch_available"
:back_card="back_card"
:item="item"
:index="index">
</preload-architecture>
<!-- Load new architecture card -->
<load-architecture></load-architecture>
<!-- New architecture card -->
<new-architecture></new-architecture>
</b-card-group>
</b-col>
</b-row>
</b-container>
<!-- Architecture selector modals -->
<!-- Delete architecture modal -->
<delete-architecture id="modalDeletArch"
:index="modal_delete_arch_index">
</delete-architecture>
</b-col>
</b-row>
</b-container>
<!------------------>
<!-- Architecture -->
<!------------------>
<b-container fluid align-h="center" id="architecture_menu" v-if="creator_mode == 'architecture'">
<b-row>
<b-col>
<!-- Navbar -->
<uielto-toolbar id="navbar_architecture"
components="btn_assembly,btn_simulator|btn_save_architecture||btn_configuration,btn_information"
:browser="browser"
:arch_available="arch_available">
</uielto-toolbar>
<!-- Architecture navbar modals -->
<save-architecture id="save_architecture"></save-architecture>
<!-- Architecture information -->
<b-container fluid align-h="center" class="mx-0 px-0">
<b-row>
<b-col class="menu" id="view_components">
<b-tabs>
<!-- Architecture configuration -->
<b-tab title="Architecture Info" active>
<arch-conf :arch_conf="architecture.arch_conf"></arch-conf>
<!-- Architecture configuration modals -->
<!-- Edit Architecture configuration -->
<arch-conf-edit id="edit_arch_field"
:title="modal_edit_arch_field.title"
:arch_field="modal_edit_arch_field.field"
:arch_field_value="modal_edit_arch_field.value"
:arch_field_index="modal_edit_arch_field.index">
</arch-conf-edit>
<!-- Reset Architecture configuration -->
<arch-conf-reset id="reset_arch_field"
:title="modal_reset_arch_field.title"
:arch_field_index="modal_reset_arch_field.index"
:architecture_name="architecture_name">
</arch-conf-reset>
</b-tab>
<!-- Memory layout -->
<b-tab title="Memory Layout">
<memory-layout :memory_layout="architecture.memory_layout"></memory-layout>
<!-- Memory layout modals -->
<!-- Edit memory layout -->
<memory-layout-edit id="memory_layout_edit"
ref="memory_layout_edit">
</memory-layout-edit>
<!-- Reset memory layout -->
<memory-layout-reset id="reset_memory_layout"
:architecture_name="architecture_name">
</memory-layout-reset>
</b-tab>
<!-- Register File -->
<b-tab title="Register File">
<register-file-arch :register_file="architecture.components"></register-file-arch>
<!-- Register File modals -->
<!-- New register file form-->
<register-file-new id="new_register_file"></register-file-new>
<!-- Reset Register File -->
<register-file-reset id="reset_register_file"
:architecture_name="architecture_name">
</register-file-reset>
<!-- Register File edit form-->
<register-file-edit id="edit_register_file"
:title="modal_edit_register_file.title"
:name="modal_edit_register_file.name"
:index="modal_edit_register_file.index">
</register-file-edit>
<!-- Delete Register File -->
<register-file-delete id="delete_register_file"
:title="modal_delete_register_file.title"
:index="modal_delete_register_file.index">
</register-file-delete>
<!-- Registers modals -->
<!-- New register -->
<registers-new id="new_register"
:register_file_index="modal_new_register.register_file_index"
:type="modal_new_register.type"
:double_precision="modal_new_register.double_precision"
:double_precision_type="modal_new_register.double_precision_type"
:reg_id="modal_new_register.reg_id"
:simple_reg="modal_new_register.simple_reg">
</registers-new>
<!-- Edit register -->
<registers-edit id="edit_register"
:title="modal_edit_register.title"
:register_file_index="modal_edit_register.register_file_index"
:register_index="modal_edit_register.register_index"
:type="modal_edit_register.type"
:double_precision="modal_edit_register.double_precision"
:double_precision_type="modal_edit_register.double_precision_type"
:reg_id="modal_edit_register.reg_id"
:simple_reg="modal_edit_register.simple_reg"
:register="modal_edit_register.register">
</registers-edit>
<!-- Delete register -->
<registers-delete id="delete_register"
:title="modal_delete_register.title"
:register_file_index="modal_delete_register.register_file_index"
:register_index="modal_delete_register.register_index">
</registers-delete>
</b-tab>
<!-- Instruction definition -->
<b-tab title="Instructions">
<instructions :instructions="architecture.instructions"></instructions>
<!-- Instructions modals -->
<!-- Intruction fields-->
<instructions-fields id="fields_instructions"
:title="modal_field_instruction.title"
:index="modal_field_instruction.index"
:instruction="modal_field_instruction.instruction">
</instructions-fields>
<!-- New Intruction -->
<instructions-new id="new_instructions"></instructions-new>
<!-- Reset Intructions -->
<instructions-reset id="reset_instructions"
:architecture_name="architecture_name">
</instructions-reset>
<!-- Edit Intructions -->
<instructions-edit id="edit_instructions"
:title="modal_edit_instruction.title"
:index="modal_edit_instruction.index"
:instruction="modal_edit_instruction.instruction"
:number_fields="modal_edit_instruction.number_fields">
</instructions-edit>
<!-- Delete instruction -->
<instructions-delete id="delete_instructions"
:title="modal_delete_instruction.title"
:index="modal_delete_instruction.index">
</instructions-delete>
</b-tab>
<!-- Pseudoinstruction definition -->
<b-tab title="Pseudoinstructions">
<pseudoinstructions :pseudoinstructions="architecture.pseudoinstructions"></pseudoinstructions>
<!-- Pseudoinstructions modals -->
<!-- Pseudontruction fields -->
<pseudoinstructions-fields id="fields_pseudoinstructions"
:title="modal_field_pseudoinstruction.title"
:index="modal_field_pseudoinstruction.index"
:pseudoinstruction="modal_field_pseudoinstruction.pseudoinstruction">
</pseudoinstructions-fields>
<!-- New Pseudontruction -->
<pseudoinstructions-new id="new_pseudoinstructions"></pseudoinstructions-new>
<!-- Reset Pseudointructions -->
<pseudoinstructions-reset id="reset_pseudoinstructions"
:architecture_name="architecture_name">
</pseudoinstructions-reset>
<!-- Edit Pseudointructions -->
<pseudoinstructions-edit id="edit_pseudoinstructions"
:title="modal_edit_pseudoinstruction.title"
:index="modal_edit_pseudoinstruction.index"
:pseudoinstruction="modal_edit_pseudoinstruction.pseudoinstruction"
:number_fields="modal_edit_pseudoinstruction.number_fields">
</pseudoinstructions-edit>
<!-- Delete Pseudoinstruction -->
<pseudoinstructions-delete id="delete_pseudoinstructions"
:title="modal_delete_pseudoinstruction.title"
:index="modal_delete_pseudoinstruction.index">
</pseudoinstructions-delete>
</b-tab>
<!-- Directives definition -->
<b-tab title="Directives">
<directives :directives="architecture.directives"></directives>
<!-- Directives modals -->
<!-- New directive -->
<directives-new id="new_directive"></directives-new>
<!-- Reset directives -->
<directives-reset id="reset_directives"
:architecture_name="architecture_name">
</directives-reset>
<!-- Edit directive -->
<directives-edit id="edit_directive"
:title="modal_edit_directive.title"
:index="modal_edit_directive.index"
:directive="modal_edit_directive.directive">
</directives-edit>
<!-- Delete directive -->
<directives-delete id="delete_directive"
:title="modal_delete_directive.title"
:index="modal_delete_directive.index">
</directives-delete>
</b-tab>
</b-tabs>
</b-col>
</b-row>
</b-container>
</b-col>
</b-row>
</b-container>
<!------------------->
<!-- Assembly view -->
<!------------------->
<b-container fluid align-h="center" id="assembly" v-if="creator_mode == 'assembly'">
<b-row>
<b-col>
<!-- Navbar -->
<uielto-toolbar id="navbar_assembly"
components="btn_architecture,btn_simulator|btn_compile|dropdown_assembly_file,dropdown_library|btn_configuration,btn_information"
:browser="browser"
:arch_available="arch_available">
</uielto-toolbar>
<!-- Assembly navbar modals -->
<!-- Load assembly form -->
<load-assembly id="load_assembly"></load-assembly>
<!-- Save assembly form -->
<save-assembly id="save_assembly"></save-assembly>
<!-- Examples modal -->
<examples id="examples"
ref="examples"
:example_set_available="example_set_available"
:example_available="example_available"
compile="false"
modal="examples">
</examples>
<!-- Get uri -->
<make-uri id="make_uri"></make-uri>
<!-- Load binary form -->
<load-library id="load_binary"></load-library>
<!-- Save binary form -->
<save-library id="save_binary"></save-library>
<b-container fluid align-h="center" class="mx-0 px-0">
<b-row cols="2">
<b-col cols="12" id="divAssembly">
<!-- Assembly textarea-->
<textarea-assembly :browser="browser"></textarea-assembly>
</b-col>
<b-col cols="0" id="divTags" class="d-none">
<!-- Library tags-->
<list-libray-tags :instructions_tag="update_binary.instructions_tag"></list-libray-tags>
</b-col>
</b-row>
</b-container>
<!-- Compile error modal -->
<assembly-error id="modalAssemblyError" ref="errorAssembly" :modal_assembly_error="modalAssemblyError"></assembly-error>
</b-col>
</b-row>
</b-container>
<!-------------------->
<!-- Simulator view -->
<!-------------------->
<b-container fluid align-h="center" id="simulator" v-if="creator_mode == 'simulator'">
<b-row>
<b-col>
<!-- Navbar -->
<uielto-toolbar id="navbar_simulator"
components="btn_architecture,btn_assembly|btn_reset,btn_instruction,btn_run,btn_flash,btn_stop|btn_examples,btn_calculator|btn_configuration,btn_information"
:browser="browser"
:arch_available="arch_available">
</uielto-toolbar>
<!-- Simulator navbar modals -->
<!-- Flash -->
<flash id="flash"
:lab_url="lab_url"
:result_email="result_email"
:target_board="target_board"
:target_port="target_port"
:flash_url="flash_url">
</flash>
<!-- Examples modal -->
<examples id="examples2"
ref="examples2"
:example_set_available="example_set_available"
:example_available="example_available"
compile="true"
modal="examples2">
</examples>
<!-- Calculator -->
<calculator id="calculator"></calculator>
<b-container fluid align-h="center" class="mx-0 px-0">
<b-row align-h="center">
<!-- Execution instruction -->
<b-col lg="7" cols="12">
<table-execution :instructions="instructions" :enter="enter"></table-execution>
</b-col>
<!-- Execution data -->
<b-col lg="5" cols="12">
<!-- View selector -->
<data-view-selector :data_mode="data_mode"
:register_file_num="architecture.components.length">
</data-view-selector>
<!-- Registers view -->
<register-file id="register_file"
:render="render"
:data_mode="data_mode"
v-if="data_mode == 'int_registers' || data_mode == 'fp_registers'">
</register-file>
<!-- Memory view-->
<memory id="memory"
:main_memory="main_memory"
:track_stack_names="track_stack_names"
:callee_subrutine="callee_subrutine"
:caller_subrutine="caller_subrutine"
:stack_total_list="stack_total_list"
:main_memory_busy="main_memory_busy"
v-if="data_mode == 'memory'">
</memory>
<!-- Stats view--->
<stats :stats="stats"
:stats_value="stats_value"
v-if="data_mode == 'stats'">
</stats>
<!-- CLK Cycles view--->
<clk-cycles :clk_cycles="clk_cycles"
:clk_cycles_value="clk_cycles_value"
:total_clk_cycles="total_clk_cycles"
v-if="data_mode == 'clk_cycles'">
</clk-cycles>
</b-col>
<!-- Monitor & keyboard -->
<b-col lg="12" cols="12">
<b-container fluid align-h="center" class="mx-0 px-0" id="simulator" v-if="creator_mode == 'simulator'">
<b-row cols-xl="2" cols-lg="2" cols-md="1" cols-sm="1" cols-xs="1" cols="1">
<b-col>
<!-- Monitor -->
<monitor :display="display"></monitor>
</b-col>
<b-col>
<!-- Keyboard -->
<keyboard :keyboard="keyboard" :enter="enter"></keyboard>
</b-col>
</b-col>
</b-row>
</b-container>
</b-row>
</b-container>
</b-col>
</b-row>
</b-container>
</template>
</div>
<!-- Required scripts -->
<script>
document.write("<script src=\"js/min.creator_web.js?id=" + new Date().getTime() + "\"><\/script>");
</script>
</body>
</html>