Skip to content

Commit 26feca2

Browse files
authored
Merge pull request #12 from acaldero/master
minor updates
2 parents 7105912 + e4973cb commit 26feca2

1 file changed

Lines changed: 100 additions & 10 deletions

File tree

README.md

Lines changed: 100 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55

66
- [Command line](#command-line-support)
77
- [Frequently Asked Question](#faq)
8+
- [Add or modify an architecture](#add-or-modify-an-architecture)
89

910

1011
## Command line support
1112

1213
### 1. Prerequisites
1314

14-
- Use Linux and have node.js and npm installed
15-
- Donwload the repository ---> git clone https://github.com/creatorsim/creator.git
16-
- Enter into the creator directory ---> cd creator
17-
- Install the necessary packages ---> npm install terser jshint colors yargs readline-sync
15+
- Linux with nodejs, npm and git packages installed (sudo apt-get update & sudo apt-get install -y nodejs npm git)
16+
- CREATOR repository cloned (git clone https://github.com/creatorsim/creator.git)
17+
- The necessary nodejs packages installed (cd creator; npm install terser jshint colors yargs readline-sync)
1818

19+
You can use the following commands to install the prerequisites:
1920
```bash
2021
sudo apt-get update & sudo apt-get install nodejs npm git -y
2122
git clone https://github.com/creatorsim/creator.git
@@ -76,7 +77,7 @@ cr[PC]:0x20; ir[t0,8]:0xa; ir[t1,9]:0xd; ir[t2,10]:0x2d; ir[t3,11]:0x21; ir[t4,1
7677

7778
Example:
7879
```bash
79-
./creator.sh -a ./architecture/MIPS_32.json -s ./examples/MIPS/example2.txt -o min -r output.txt .
80+
./creator.sh -a ./architecture/MIPS_32.json -s ./examples/MIPS/example2.txt -o min -r output.txt
8081
```
8182

8283
Output:
@@ -132,8 +133,9 @@ Examples:
132133

133134
A line break cannot be printed as a string (print_string), it has to be printed as a character (print_char). The following code can be used to print it:
134135
```
135-
li $v0 11 # print_char
136-
li $a0 '\n' # Loads the ASCII value of the character into the register a0
136+
li a0 '\n' # Loads the ASCII value of the character into the register a0
137+
li a7 11 # print_char syscall
138+
ecall
137139
```
138140

139141
* Can you put two labels consecutively?
@@ -143,13 +145,101 @@ It is not allowed. The instructions can only be associated with one label. If a
143145
Example of incorrect two consecutive labels:
144146
```
145147
label1:
146-
label2: li $t0 1
148+
label2: li t0 1
147149
```
148150

149151
Alternative correct code with the same functionality:
150152
```
151-
label1: li $t0 1
152-
label2: add $t2 $t1 $t0
153+
label1: li t0 1
154+
label2: add t2 t1 t0
153155
154156
syscall
155157
```
158+
159+
160+
## Add or modify an architecture
161+
162+
<html>
163+
<table>
164+
165+
<tr>
166+
<td>Part of the architecture
167+
</td>
168+
<td>Create
169+
</td>
170+
<td>Edit
171+
</td>
172+
</tr>
173+
174+
<tr>
175+
<td>Component
176+
</td>
177+
<td>Create a new component:<br>
178+
Allows you to create a new set of integer, floating point, or control registers.<br>
179+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/new_component.PNG">
180+
</td>
181+
<td>Edit an existent component:<br>
182+
Allows you to modify the name of a component that has already been created in the selected architecture.<br>
183+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/edit_component.PNG">
184+
</td>
185+
</tr>
186+
187+
<tr>
188+
<td>Element
189+
</td>
190+
<td>Create a new element:<br>
191+
Allows you to create a new element within a component.
192+
To create it you need an element name, the default value of the element and whether to read or write to it.
193+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/new_element.PNG">
194+
</td>
195+
<td>Edit an existent element:<br>
196+
Allows you to change the name of an element that has already been created in a component.
197+
It is possible to modify its name, its default value and, finally, whether it can be read or written in it.
198+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/edit_element.PNG">
199+
</td>
200+
</tr>
201+
202+
203+
<tr>
204+
<td>Instruction
205+
</td>
206+
<td>Create a new instruction:<br>
207+
Allows you to create a new instruction within the desired architecture.
208+
To do this, enter the name of the instruction, the type of instruction it will be, the fields it will have with their corresponding bits, the syntax the instruction will follow and, finally, the definition of the instruction.
209+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/new_instruction.PNG">
210+
</td>
211+
<td>Edit an existent instruction:<br>
212+
It allows modifying an instruction within the desired architecture, being able to modify its name, the fields it uses, the syntax the instruction follows and, finally, its definition.
213+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/edit_instruction.PNG">
214+
</td>
215+
</tr>
216+
217+
<tr>
218+
<td>Pseudo-instruction
219+
</td>
220+
<td>Create a new pseudoinstruction:<br>
221+
Allows you to create a new pseudoinstruction within the desired architecture. To do this, you must enter the name of the pseudoinstruction, the fields it will have with their corresponding bits, the syntax the pseudoinstruction will follow and, finally, its definition.
222+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/new_pseudoinstruction.PNG">
223+
</td>
224+
<td>Edit an existent pseudoinstruction:<br>
225+
It allows to modify a pseudoinstruction within the desired architecture, being able to modify its name, as well as the fields it uses, the syntax that follows the pseudoinstruction and, finally, the definition of the pseudoinstruction.
226+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/edit_pseudoinstruction.PNG">
227+
</td>
228+
</tr>
229+
230+
<tr>
231+
<td>Directives
232+
</td>
233+
<td>Create a new directive:<br>
234+
Allows you to create a new directive by entering the name it will have and, finally, the action the directive will perform.
235+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/new_directive.PNG">
236+
</td>
237+
<td>Edit an existent directive:<br>
238+
Allows you to modify an existing directive by modifying its name and, finally, the action that the directive will perform.
239+
<img height="50%" src="https://creatorsim.github.io/images/advanced_mode/edit_directive.PNG">
240+
</td>
241+
</tr>
242+
243+
</table>
244+
</html>
245+

0 commit comments

Comments
 (0)