Getting Started with x86 » History » Version 1
Mikhail Chupilko, 04/06/2017 03:58 PM
1 | 1 | Mikhail Chupilko | h1. Getting Started with MicroTESK: demo of x86 |
---|---|---|---|
2 | |||
3 | {{toc}} |
||
4 | |||
5 | h2. Prerequisite |
||
6 | |||
7 | Install MicroTESK (for more information see http://forge.ispras.ru/projects/microtesk/wiki/Installation_Guide) |
||
8 | |||
9 | h2. Overview of the x86 ISA |
||
10 | |||
11 | Specifications of x86 can be found into @$MICROTESK_HOME/arch/demo/x86/model@. |
||
12 | |||
13 | Each instruction is described by means of the following constructs (register move instruction is taken as an example) |
||
14 | ## Its declaration <pre>op mov_r1616 (dst: GPR16, src: GPR16)</pre> |
||
15 | ## Its assembly representation <pre>syntax = format("mov %s, %s", dst.syntax, src.syntax)</pre> |
||
16 | ## Its binary coding <pre>image = format("1000101111%s%s", dst.image, src.image)</pre> |
||
17 | ## Its semantics |
||
18 | <pre> |
||
19 | action = { |
||
20 | dst = src; |
||
21 | instr_size = instr_size + 2; |
||
22 | } |
||
23 | </pre> |
||
24 | |||
25 | To run the model, use the following command: <pre>$MICROTESK_HOME/bin/compile.sh x86.nml</pre> |
||
26 | |||
27 | For more information, see MicroTESK wiki: http://forge.ispras.ru/projects/microtesk/wiki/NML_Language_Reference |
||
28 | |||
29 | h2. Overview of x86 Test Templates |
||
30 | |||
31 | Test templates for the x86 model can be found into @$MICROTESK_HOME/arch/demo/x86/templates@. |
||
32 | |||
33 | As by now, it contains six demonstration templates: |
||
34 | # @block.rb@ to show usage of the instruction blocks |
||
35 | # @block_random.rb@ to show creation of the randomized instruction sequences using block constructs |
||
36 | # @euclid.rb@ to show MicroTESK simulating the execution of a test program to predict the resulting state of the PE under test |
||
37 | # @random.rb@ to show generation of the randomized test cases by using biased values, intervals, arrays and distributions |
||
38 | # @random_immediate.rb@ to show generation of random immediate values |
||
39 | # @random_registers.rb@ to show dependent instructions with random registers |
||
40 | |||
41 | To run template processing use the following command: |
||
42 | <pre>$MICROTESK_HOME/bin/generate.sh x86 block.rb --code-file-prefix block --code-file-extension -v</pre> |
||
43 | When the processing is finished, files with the resulting assembly code can be found in @$MICROTESK_HOME@ |
||
44 | |||
45 | For more information, see MicroTESK wiki: http://forge.ispras.ru/projects/microtesk/wiki/Template_Description_Language |