Wiki » History » Version 7
Alexander Protsenko, 03/21/2023 04:49 PM
1 | 6 | Alexander Protsenko | h2. ISA |
---|---|---|---|
2 | 1 | Alexander Protsenko | |
3 | 6 | Alexander Protsenko | The [[Instruction Set Architecture]] of MicroTESK for ARM Demo version. |
4 | |||
5 | 1 | Alexander Protsenko | h2. Installation Steps |
6 | |||
7 | # "Download":https://forge.ispras.ru/projects/microtesk-arm-demo/files and unpack a distribution package (the latest @.tar.gz@ file). |
||
8 | The destination directory will be further referred to as @<INSTALL_DIR>@. |
||
9 | # Set the @MICROTESK_HOME@ environment variable to the @<INSTALL_DIR>@ path (see "Setting Environment Variables":https://forge.ispras.ru/projects/microtesk/wiki/Installation_Guide#Setting-Environment-Variables). |
||
10 | # Add the @<INSTALL_DIR>/bin@ path to the @PATH@ environment variable. |
||
11 | # If required, install SMT solver(s) to the @<INSTALL_DIR>/tools@ directory (see "Installing SMT Solvers":https://forge.ispras.ru/projects/microtesk/wiki/Installation_Guide#Installing-SMT-Solvers). |
||
12 | |||
13 | You can learn more about "Installation Directory Structure":https://forge.ispras.ru/projects/microtesk/wiki/Installation_Guide#Installation-Directory-Structure by following the link. |
||
14 | |||
15 | Next we will use the following directories: |
||
16 | * arch - contains microprocessor specifications and test templates. |
||
17 | * bin - contains scripts for model compilation and test generation |
||
18 | |||
19 | h2. Test Program Generation |
||
20 | |||
21 | To generate the test program for the ARM architecture (model) and the @bubble_sort@ template, run the following command: |
||
22 | <pre> |
||
23 | $ cd $MICROTESK_HOME |
||
24 | $ sh bin/generate.sh armv8 arch/armv8/templates/bubble_sort.rb -dgp memory |
||
25 | </pre> |
||
26 | The output file name depends on the @--code-file-prefix@ and @--code-file-extension@ options (see "Command-Line Options":https://forge.ispras.ru/projects/microtesk/wiki/Command-Line_Options). |
||
27 | |||
28 | 4 | Alexander Protsenko | h3. Self-Check Test Program Generation |
29 | |||
30 | To generate the self-check test program for the the @bubble_sort@ template, run the following command: |
||
31 | <pre> |
||
32 | $ sh bin/generate.sh armv8 arch/armv8/templates/bubble_sort.rb -dgp memory -sc |
||
33 | </pre> |
||
34 | |||
35 | 1 | Alexander Protsenko | h3. Templates |
36 | |||
37 | The entire list of demo templates can be found in the directory: @<INSTALL_DIR>/arch/armv8/templates@. |
||
38 | 2 | Alexander Protsenko | <pre> |
39 | $ cd $MICROTESK_HOME/arch/armv8/templates |
||
40 | </pre> |
||
41 | 1 | Alexander Protsenko | |
42 | 5 | Alexander Protsenko | You can use the @run.sh@ script from this directory to generate the test program: |
43 | 2 | Alexander Protsenko | <pre> |
44 | ./run.sh branch_generation |
||
45 | </pre> |
||
46 | 1 | Alexander Protsenko | |
47 | 2 | Alexander Protsenko | The generated test program will be in this directory: @$MICROTESK_HOME/output_test/branch_generation@ |
48 | <pre> |
||
49 | cd $MICROTESK_HOME/output_test/branch_generation |
||
50 | 1 | Alexander Protsenko | </pre> |
51 | 5 | Alexander Protsenko | |
52 | Also you can use the @run-sc.sh@ script from this directory to generate the *self-check* test program: |
||
53 | <pre> |
||
54 | ./run.sh branch_generation |
||
55 | </pre> |
||
56 | 1 | Alexander Protsenko | The generated test program will be in this directory: @$MICROTESK_HOME/output_test_sc/branch_generation@ |
57 | |||
58 | 6 | Alexander Protsenko | h3. Test trace |
59 | 1 | Alexander Protsenko | |
60 | 7 | Alexander Protsenko | The option @--tracer-log@ enables generation of tracer logs for simulation. (In scripts @run.sh@, @run-sc.sh@ it is enabled.) |
61 | 6 | Alexander Protsenko | The trace format is described here: https://forge.ispras.ru/projects/qemu4v/wiki/QEMU4V_Trace_Format |
62 | 7 | Alexander Protsenko | The test trace you can compare with the program execution trace on simulator. You can use the "Trace Matcher":https://forge.ispras.ru/projects/traceutils/wiki tool. |
63 | 6 | Alexander Protsenko | To simulate ARMv8 assembler programs you can use "QEMU4V":https://forge.ispras.ru/projects/qemu4v/wiki/Installation tool. |
64 | |||
65 | Or you can use the approach shown in the picture below: |
||
66 | |||
67 | !Trace_comparison.png! |