-
Notifications
You must be signed in to change notification settings - Fork 69
/
index.html
145 lines (121 loc) · 7.62 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
<!DOCTYPE html>
<html lang="en" ng-app="y86">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Y86 Emulator</title>
<base href="src/">
<script src="../lib/angular.min.js"></script>
<script src="../lib/angular-route.min.js"></script>
<script src="script/kernels/main.js"></script>
<script src="script/controllers/main.js"></script>
<script src="script/directives/board.js"></script>
<script src="script/directives/register.js"></script>
<script src="script/directives/stack.js"></script>
<script src="script/directives/clock.js"></script>
<script src="script/directives/condition.js"></script>
<script src="script/directives/control.js"></script>
<script src="script/directives/cpi.js"></script>
<script src="script/directives/code.js"></script>
<script src="script/directives/pipe.js"></script>
<link rel="stylesheet" href="../lib/font-awesome.min.css">
<link rel="stylesheet" href="style/main.css">
<link rel="stylesheet" href="style/board.css">
<link rel="stylesheet" href="style/register.css">
<link rel="stylesheet" href="style/stack.css">
<link rel="stylesheet" href="style/clock.css">
<link rel="stylesheet" href="style/condition.css">
<link rel="stylesheet" href="style/control.css">
<link rel="stylesheet" href="style/cpi.css">
<link rel="stylesheet" href="style/code.css">
<link rel="stylesheet" href="style/pipe.css">
</head>
<body ng-controller="mainCtrl" style="-webkit-font-smoothing: auto">
<board class="top-line">
<flex-container class="rot-top">
<control-container>
<frequency-label hz="player.hz" style="left: {{ player.hz * 4 + 20 }}px"></frequency-label>
<div>
<prev fn="prev()"></prev>
<play-pause icon="state.icons[state.icon]" fn="play()"></play-pause>
<next fn="next()"></next>
<reset fn="reset()"></reset>
</div>
<frequency hz="player.hz"></frequency>
</control-container>
<cpi-container style="-webkit-flex:1;flex:1;-webkit-flex-grow:1;flex-grow:1"></cpi-container>
<h1>Y86 Emulator<br/>
<small>Source code: <a href="https://github.com/shuding/y86" target="_blank">GitHub</a>, by <a href="https://github.com/shuding" target="_blank">@shuding</a></small>
</h1>
</flex-container>
<flex-container class="top-line flex-grow">
<div class="top-dotted tool-sidebar">
<clock-container class="container container-line container-left rot-left">
<clock data="clock.data"></clock>
</clock-container>
<register-container class="container container-line container-left flex-grow rot-left">
<register ng-repeat="(key, value) in registers" reg-name="key" reg-data="value | toHex: 8"></register>
</register-container>
</div>
<code-container class="container container-line top-dotted" style="-webkit-flex-grow:1;flex-grow:1">
<code-line-indicator style="top: {{ code.current * 1.2 }}em"></code-line-indicator>
<code-line ng-repeat="line in code.lines track by $index" line-number="$index+1" line-content="line"></code-line>
</code-container>
<div class="top-dotted tool-sidebar">
<condition-container class="container container-line container-right rot-right">
<condition ng-repeat="(key, value) in conditions" cond-name="key" cond-data="value"></condition>
</condition-container>
<stack-container class="container container-line container-right flex-grow rot-right">
<stack ng-repeat="data in memory.data track by $index"><span>{{ $index * 4 | toHex: 4 }}</span><span>{{ data[0] | toHex: 2 }}{{ data[1] | toHex: 2 }}{{ data[2] | toHex: 2 }}{{ data[3] | toHex: 2 }}</span></stack>
</stack-container>
</div>
</flex-container>
<flex-container class="top-line shadow-bg" style="-webkit-flex-direction: column">
<fetch>
<pipe-attr pipe-name="'predPC'" pipe-data="parser.CPU.Input.F_predPC | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'instructions'" pipe-data="parser.CPU.instruction"></pipe-attr>
<pipe-attr pipe-name="'CPI'" pipe-data="parser.CPU.cpi[parser.CPU.cycle] | round"></pipe-attr>
</fetch>
<decode>
<pipe-attr pipe-name="'stat'" pipe-data="constantMap.stat[parser.CPU.Input.D_stat]"></pipe-attr>
<pipe-attr pipe-name="'icode'" pipe-data="constantMap.icode[parser.CPU.Input.D_icode]"></pipe-attr>
<pipe-attr pipe-name="'ifun'" pipe-data="parser.CPU.Input.D_ifun"></pipe-attr>
<pipe-attr pipe-name="'rA'" pipe-data="constantMap.reg[parser.CPU.Input.D_rA]||'R_NONE'"></pipe-attr>
<pipe-attr pipe-name="'rB'" pipe-data="constantMap.reg[parser.CPU.Input.D_rB]||'R_NONE'"></pipe-attr>
<pipe-attr pipe-name="'valC'" pipe-data="parser.CPU.Input.D_valC | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'valP'" pipe-data="parser.CPU.Input.D_valP | toHex: 8" pipe-pref="'0x'"></pipe-attr>
</decode>
<execute>
<pipe-attr pipe-name="'stat'" pipe-data="constantMap.stat[parser.CPU.Input.E_stat]"></pipe-attr>
<pipe-attr pipe-name="'icode'" pipe-data="constantMap.icode[parser.CPU.Input.E_icode]"></pipe-attr>
<pipe-attr pipe-name="'ifun'" pipe-data="parser.CPU.Input.E_ifun"></pipe-attr>
<pipe-attr pipe-name="'valC'" pipe-data="parser.CPU.Input.E_valC | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'valA'" pipe-data="parser.CPU.Input.E_valA | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'valB'" pipe-data="parser.CPU.Input.E_valB | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'dstE'" pipe-data="constantMap.reg[parser.CPU.Input.E_dstE]||'R_NONE'"></pipe-attr>
<pipe-attr pipe-name="'dstM'" pipe-data="constantMap.reg[parser.CPU.Input.E_dstM]||'R_NONE'"></pipe-attr>
<pipe-attr pipe-name="'srcA'" pipe-data="constantMap.reg[parser.CPU.Input.E_srcA]||'R_NONE'"></pipe-attr>
<pipe-attr pipe-name="'srcB'" pipe-data="constantMap.reg[parser.CPU.Input.E_srcB]||'R_NONE'"></pipe-attr>
</execute>
<memory>
<pipe-attr pipe-name="'stat'" pipe-data="constantMap.stat[parser.CPU.Input.M_stat]"></pipe-attr>
<pipe-attr pipe-name="'icode'" pipe-data="constantMap.icode[parser.CPU.Input.M_icode]"></pipe-attr>
<pipe-attr pipe-name="'valE'" pipe-data="parser.CPU.Input.M_valE | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'valA'" pipe-data="parser.CPU.Input.M_valA | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'dstE'" pipe-data="constantMap.reg[parser.CPU.Input.M_dstE]||'R_NONE'"></pipe-attr>
<pipe-attr pipe-name="'dstM'" pipe-data="constantMap.reg[parser.CPU.Input.M_dstM]||'R_NONE'"></pipe-attr>
</memory>
<write-back>
<pipe-attr pipe-name="'stat'" pipe-data="constantMap.stat[parser.CPU.Input.W_stat]"></pipe-attr>
<pipe-attr pipe-name="'icode'" pipe-data="constantMap.icode[parser.CPU.Input.W_icode]"></pipe-attr>
<pipe-attr pipe-name="'valE'" pipe-data="parser.CPU.Input.W_valE | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'valM'" pipe-data="parser.CPU.Input.W_valM | toHex: 8" pipe-pref="'0x'"></pipe-attr>
<pipe-attr pipe-name="'dstE'" pipe-data="constantMap.reg[parser.CPU.Input.W_dstE]||'R_NONE'"></pipe-attr>
<pipe-attr pipe-name="'dstM'" pipe-data="constantMap.reg[parser.CPU.Input.W_dstM]||'R_NONE'"></pipe-attr>
</write-back>
</flex-container>
</board>
<script src="../lib/move.min.js"></script>
</body>
</html>