Project

General

Profile

MicroTESK Installation Guide » History » Version 3

Andrei Tatarnikov, 07/26/2018 06:15 PM

1 1 Andrei Tatarnikov
h1. MicroTESK for RISC-V Installation Guide
2
3
h1. Installation Guide
4
5
{{toc}}
6
7
h3. System Requirements
8
9
MicroTESK is a set of Java-based utilities that are run from the command line. It can be used on *_Windows_*, *_Linux_* and *_OS X_* machines that have *_JDK 1.7 or later_* installed. To be able to recompile the RISC-V ISA specifications, *_Apache Ant version 1.8_ or later* is required.
10
11
h3. Installation Steps
12
13 3 Andrei Tatarnikov
# Download from https://forge.ispras.ru/projects/microtesk-riscv/files and unpack the MicroTESK installation package (the @.tar.gz@ file, latest release) to your computer. The folder to which it was unpacked will be further referred to as the installation directory (@<installation dir>@).
14 1 Andrei Tatarnikov
# Download and install constraint solver tools to the @<installation dir>/tools@ directory (see the *Installing Constraint Solvers* section).
15
# Declare the *MICROTESK_HOME* environment variable and set its value to the path to the installation directory (see the *Setting Environment Variables* section).
16
# Set the @<installation dir>/bin@ as the working directory (add the path to the @PATH@ environment variable) to be able to run MicroTESK utilities from any path.
17
# Now you can run the @compile.sh@ (or @.bat@) script to create a microprocessor model and the @generate.sh@ (or @.bat@) script to generate test for this model.
18
19
h3. Setting Environment Variables
20
21
h4. _Windows_
22
23
# Open the @System Properties@ window.
24
# Switch to the @Advanced@ tab.
25
# Click on Environment Variables.
26
# Click @New...@ under @System Variables@.
27
# In the @New System Variable@ dialog specify variable name as @MICROTESK_HOME@ and variable value as @<installation dir>@.
28
# Click @OK@ on all open windows.
29
# Reopen the command prompt window.
30
31
h4. _Linux and OS X_
32
33
Add the command below to the @~.bash_profile@ file (Linux) or the @~/.profile@ file (OS X):
34
<pre>export MICROTESK_HOME=<installation dir></pre> To start editing the file, type @vi ~/.bash_profile@ (or @vi ~/.profile@). Changes will be applied after restarting the command-line terminal or reboot. You can also execute the command in your command-line terminal to make temporary changes.
35
36
h3. Installation Directory Structure
37
38
The MicroTESK installation directory contains the following subdirectories:
39
40
| @arch@   | Examples of microprocessor specifications and test templates for the described designs |
41
| @bin@    | Scripts to run features of MicroTESK (modelling and test generation) |
42
| @doc@    | Documentation on MicroTESK |
43
| @etc@    | MicroTESK configuration files |
44
| @gen@    | Generated Java models of the specified microprocessor designs |
45
| @lib@    | JAR files and Ruby scripts to perform modelling and test generation tasks |
46
| @src@    | Source code of MicroTESK |
47
48
h3. Running MicroTESK
49
50
To generate a Java model of a microprocessor from its nML specification, a user needs to run the @compile.sh@ script (Unix, Linux, OS X) or the @compile.bat@ script (Windows). For example, the following command generates a model for the miniMIPS specification:
51
52
<pre>
53
sh bin/compile.sh arch/demo/minimips/model/minimips.nml
54
</pre>
55
56
_NOTE: Models for all demo specifications are already built and included in the MicroTESK distribution package. So a user can start working with MicroTESK from generating test programs for these models._
57
58
To generate a test program, a user needs to use the @generate.sh@ script (Unix, Linux, OS X) or the @generate.bat@ script (Windows). The scripts require the following parameters: 
59
60
#  _model name_;
61
# _test template file_.
62
63
For example, the command below runs the @euclid.rb@ test template for the miniMIPS model generated by the command from the previous example and saves the generated test program to an assembler file. The file name is based on values of the @--code-file-prefix@ and @--code-file-extension@ options.
64
65
<pre>
66
sh bin/generate.sh minimips arch/demo/minimips/templates/euclid.rb
67
</pre>
68
69
To specify whether "Z3":https://github.com/z3prover or "CVC4":http://cvc4.cs.nyu.edu should be used to solve constraints, a user needs to specify the @-s@ or @--solver@ command-line option as @z3@ or @cvc4@ respectively. By default, Z3 will be used. Here is an example:
70
71
<pre>
72
sh bin/generate.sh -s cvc4 minimips arch/demo/minimips/templates/constraint.rb
73
</pre>
74
75
More information on command-line options can be found on the [[Command-Line Options]] page.