Worked on documentation and fixed way to many spelling mistakes
This commit is contained in:
parent
231357624f
commit
7810b479c7
141
out/index.html
141
out/index.html
@ -60,7 +60,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b>Instruction</b>
|
||||
Hiermit kannst du eine ganze Instruction ausführen lassen und musst nicht durch jeden µCode Schritt einzeln durchdrücken.
|
||||
Hiermit kannst du eine ganze Instruktion ausführen lassen und musst nicht durch jeden µCode Schritt einzeln durchdrücken.
|
||||
</li>
|
||||
<li>
|
||||
<b>Reset PC</b>
|
||||
@ -72,7 +72,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b>Configs</b>
|
||||
Hier können sie die momentane Konfigration herunterladen, selber eine Hochladen oder aus einer Liste von Beispielen laden.
|
||||
Hier können sie die momentane Konfiguration herunterladen, selber eine Hochladen oder aus einer Liste von Beispielen laden.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
|
||||
<h3>RAM</h3>
|
||||
<p>
|
||||
Im Arbeitsspeicher wird das Programm gespeichert. Jeder Eintrag ist dabei in ein Low-Byte und ein High-Byte unterteilt. Dadurch kann man in einem Eintrag die Instruktion und Addresse einfacher unterscheiden.<br>
|
||||
Im Arbeitsspeicher wird das Programm gespeichert. Jeder Eintrag ist dabei in ein Low-Byte und ein High-Byte unterteilt. Dadurch kann man in einem Eintrag die Instruktion und Adresse einfacher unterscheiden.<br>
|
||||
<a href="#befehl">Siehe Befehle</a>
|
||||
</p>
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
<p>
|
||||
Über den Datenbus können Daten und Befehle zwischen RAM, Control Unit und ALU übertragen werden.
|
||||
</p>
|
||||
<h3>Addressbus</h3>
|
||||
<h3>Adressbus</h3>
|
||||
<p>
|
||||
Über diesen Bus kann die Control Unit steuern, welcher Wert im RAM ausgewählt wird.<br>
|
||||
Bei normalen Rechnern sind hier natürlich noch deutlich mehr Werte angeschlossen.
|
||||
@ -116,14 +116,20 @@
|
||||
<a id="befehl"></a>
|
||||
<h2>Befehle</h2>
|
||||
<p>
|
||||
Ein Befehl besteht aus einer Instruktion und einem Argument. Deshalb sind im RAM und im Instruction Register alle Werte separiert.
|
||||
Ein Befehl besteht aus einer Instruktion und einem Argument. Deshalb sind im RAM und im Instruction Register alle Werte separiert.
|
||||
</p>
|
||||
<pre><code>0 0 2 0 0 5 0 4
|
||||
Instr Argument
|
||||
</code></pre>
|
||||
<p>
|
||||
In den ersten 3 Stellen wird hier der OpCode der Instruction codiert. Wenn dieser Teil in der Control Unit in den µCode Counter geladen wird, dann wird der OpCode mit 10 multipliziert.
|
||||
</p>
|
||||
<p>
|
||||
In den letzten 5 Stellen wird ein beliebiger Zahlenwert gespeichert. Dieser kann als Argument für einen Befehl genutzt werden.
|
||||
</p>
|
||||
<p>
|
||||
In diesem Beispiel hier würden die µCodes ab Adresse 20 im µCode Speicher ausgeführt werden.
|
||||
</p>
|
||||
<pre>
|
||||
<code>
|
||||
0 0 0 0 0 0 0 0
|
||||
Instr Argument
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<h2>µCodes</h2>
|
||||
<p>
|
||||
@ -138,64 +144,64 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>ProgCounter -> AddrBus</td>
|
||||
<td><code>ProgCounter -> AddrBus</td>
|
||||
<td>Lade den Wert des Programm Counters in den Adressbus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>InstrReg -> ProgCounter</td>
|
||||
<td><code>InstrReg -> ProgCounter</code></td>
|
||||
<td>Lade das Argument des Instruktionsregisters in den Programm Counter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ProgCounter ++</td>
|
||||
<td>Erhöhe den Wert des Programm Counter um 1</td>
|
||||
<td><code>ProgCounter ++</td>
|
||||
<td>Erhöhe den Wert des Programm Counter um 1</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc == 0 => InstReg -> ProgCounter</td>
|
||||
<td>Wenn der Wert des Akkumulators 0 ist, dann lade das Arggument des Instruktionsregisters in den Programm Counter</td>
|
||||
<td><code>Acc == 0 => InstReg -> ProgCounter</code></td>
|
||||
<td>Wenn der Wert des Akkumulators 0 ist, dann lade das Argument des Instruktionsregisters in den Programm Counter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ram -> DataBus</td>
|
||||
<td>Schreibe den aktuellen Wert aus den RAM auf den Datembus</td>
|
||||
<td><code>Ram -> DataBus</code></td>
|
||||
<td>Schreibe den aktuellen Wert aus den RAM auf den Datenbus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DataBus -> Ram</td>
|
||||
<td><code>DataBus -> Ram</code></td>
|
||||
<td>Schreibe den Wert des Datenbus in die momentane Stelle des RAM</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DataBus -> InstReg</td>
|
||||
<td><code>DataBus -> InstReg</code></td>
|
||||
<td>Lade den Befehl vom Datenbus in das Instruktionsregister</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DataBus -> Acc</td>
|
||||
<td><code>DataBus -> Acc</code></td>
|
||||
<td>Lade den Wert vom Datenbus in den Akkumulator der ALU</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc -> DataBus</td>
|
||||
<td><code>Acc -> DataBus</code></td>
|
||||
<td>Schreibe den Wert vom Akkumulator auf den Datenbus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc ++</td>
|
||||
<td>Erhöhe den Wert des Akkumulators um 1</td>
|
||||
<td><code>Acc ++</td>
|
||||
<td>Erhöhe den Wert des Akkumulators um 1</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc --</td>
|
||||
<td>Verringere den Wert des Akkumulators um 1</td>
|
||||
<td><code>Acc --</td>
|
||||
<td>Verringere den Wert des Akkumulators um 1</td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>InstReg -> µCounter</td>
|
||||
<td><code>InstReg -> µCounter</code></td>
|
||||
<td>Nehme das Argument des Befehls im Instruktionsregister, füge am Ende eine 0 an und Lade ihn in den µCounter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>InstReg -> AddrBus</td>
|
||||
<td>Lade das Argument im Instruktionsregister in den Addressbus</td>
|
||||
<td><code>InstReg -> AddrBus</code></td>
|
||||
<td>Lade das Argument im Instruktionsregister in den Adressbus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>µCounter = 0</td>
|
||||
<td><code>µCounter = 0</code></td>
|
||||
<td>Setzte den µCounter zurück</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Signal End of Program</td>
|
||||
<td>Zeige ein Popup, dass das Ende des Programms signalisiert.</td>
|
||||
<td><code>Signal End of Program</code></td>
|
||||
<td>Zeigt ein Popup, dass das Ende des Programms signalisiert.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -249,7 +255,7 @@
|
||||
|
||||
<h3>RAM</h3>
|
||||
<p>
|
||||
The current programm is stored in the RAM. Every entry is seperated as mentioned in <a href="#entry">entry</a>.
|
||||
The current program is stored in the RAM. Every entry is separated as mentioned in <a href="#entry">entry</a>.
|
||||
</p>
|
||||
|
||||
<h3>Control Unit</h3>
|
||||
@ -271,28 +277,33 @@
|
||||
</p>
|
||||
<h3>Databus</h3>
|
||||
<p>
|
||||
Via the Databus values and entrys can be transported between RAM, Control Unit and ALU.
|
||||
Via the databus values and entries can be transported between RAM, Control Unit and ALU.
|
||||
</p>
|
||||
<h3>Addressbus</h3>
|
||||
<p>
|
||||
With the addressbus the Control Unit can control which value is selected in RAM. On a normal computer there are a lot mor things attached to this bus.
|
||||
With the addressbus the Control Unit can control which value is selected in RAM. On a normal computer there are a lot more things attached to this bus.
|
||||
</p>
|
||||
|
||||
<a id="entry"></a>
|
||||
<h2>Entry</h2>
|
||||
<p>
|
||||
Each entry consits of a instruction and an argument. That's why the entrys in RAM and in µCodes are displayed seperatly.
|
||||
Each entry consists of a instruction and an argument. That's why the entrys in RAM and in µCodes are displayed separately.
|
||||
<pre><code>0 0 2 0 0 5 0 4
|
||||
Instr Argument
|
||||
</code></pre>
|
||||
|
||||
<p>
|
||||
Here, the first 3 digits are the opCode of the instruction. When you try to load this part into the µCode Counter of the Control Unit, it will be automatically multiplied by 10.
|
||||
<br>
|
||||
In this example µCodes starting at the Address 20 will be executed.
|
||||
</p>
|
||||
<p>
|
||||
The last 5 digits are a numerical value that can be used as an argument for the command.
|
||||
</p>
|
||||
<pre>
|
||||
<code>
|
||||
0 0 0 0 0 0 0 0
|
||||
Instr Argument
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<h2>µCodes</h2>
|
||||
<p>
|
||||
Every instruction consists of a list of µCodes. Here is an explanaition for all of them:
|
||||
Every instruction consists of a list of µCodes. Here is an explanation for all of them:
|
||||
</p>
|
||||
<table>
|
||||
<thead>
|
||||
@ -303,63 +314,63 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>ProgCounter -> AddrBus</td>
|
||||
<td>Load the value from programm counter to addressbus</td>
|
||||
<td><code>ProgCounter -> AddrBus</code></td>
|
||||
<td>Load the value from program counter to addressbus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>InstrReg -> ProgCounter</td>
|
||||
<td>Load the argument from instruction register to programm counter</td>
|
||||
<td><code>InstrReg -> ProgCounter</code></td>
|
||||
<td>Load the argument from instruction register to program counter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ProgCounter ++</td>
|
||||
<td>Increment programm counter by 1</td>
|
||||
<td><code>ProgCounter ++</code></td>
|
||||
<td>Increment program counter by 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc == 0 => InstReg -> ProgCounter</td>
|
||||
<td>If the accumulator is 0 then write the argument from instruction register to programm counter</td>
|
||||
<td><code>Acc == 0 => InstReg -> ProgCounter</code></td>
|
||||
<td>If the accumulator is 0 then write the argument from instruction register to program counter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ram -> DataBus</td>
|
||||
<td><code>Ram -> DataBus</code></td>
|
||||
<td>Load selected value from RAM to databus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DataBus -> Ram</td>
|
||||
<td><code>DataBus -> Ram</code></td>
|
||||
<td>Write value from databus to selected value in RAM</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DataBus -> InstReg</td>
|
||||
<td><code>DataBus -> InstReg</code></td>
|
||||
<td>Write entry from databus to instruction register</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DataBus -> Acc</td>
|
||||
<td><code>DataBus -> Acc</code></td>
|
||||
<td>Write value from databus to accumulator</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc -> DataBus</td>
|
||||
<td><code>Acc -> DataBus</code></td>
|
||||
<td>Load value from accumulator to databus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc ++</td>
|
||||
<td><code>Acc ++</code></td>
|
||||
<td>Increment accumulator by 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Acc --</td>
|
||||
<td><code>Acc --</code></td>
|
||||
<td>Decrement accumulator by 1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>InstReg -> µCounter</td>
|
||||
<td><code>InstReg -> µCounter</code></td>
|
||||
<td>Take the instruction from instruction register, add a 0 at the tail and write it to µCounter</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>InstReg -> AddrBus</td>
|
||||
<td><code>InstReg -> AddrBus</code></td>
|
||||
<td>Write the argument from instruction register to addressbus</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>µCounter = 0</td>
|
||||
<td><code>µCounter = 0</code></td>
|
||||
<td>Set µCounter to 0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Signal End of Program</td>
|
||||
<td><code>Signal End of Program</code></td>
|
||||
<td>Show an alert that the end of program is reached.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -367,7 +378,7 @@
|
||||
|
||||
<h1>Source</h1>
|
||||
<p>
|
||||
This is a hobby projekt so please don't take my code as a "best-practice" implementation.<br>
|
||||
This is a hobby project so please don't take my code as a "best-practice" implementation.<br>
|
||||
</p>
|
||||
<a href="https://git.yokta.de/Christian/Johnny" class="button">See Source Code</a>
|
||||
<p>
|
||||
@ -382,7 +393,7 @@
|
||||
<div class="container">
|
||||
<p>
|
||||
Made with ☕ <br>
|
||||
© <a href="https://github.com/ChrisgammaDE" target="_blank">Christian</a>, 2021
|
||||
© <a href="https://github.com/ChrisgammaDE" target="_blank">Christian</a>, 2022
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://yokta.de/i/impressum.html" target="_blank">Impressum</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user