MicroTESK Installation Guide » History » Revision 16
Revision 15 (Andrei Tatarnikov, 07/26/2018 06:55 PM) → Revision 16/22 (Andrei Tatarnikov, 07/26/2018 07:02 PM)
h1. MicroTESK for RISC-V Installation Guide h1. Installation and User Guide {{toc}} h2. Installation h3. System Requirements 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. h3. Installation Steps # 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>@). # Declare the *MICROTESK_HOME* environment variable and set its value to the path to the installation directory (see the *Setting Environment Variables* section). # 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. h3. Setting Environment Variables h4. _Windows_ # Open the @System Properties@ window. # Switch to the @Advanced@ tab. # Click on Environment Variables. # Click @New...@ under @System Variables@. # In the @New System Variable@ dialog specify variable name as @MICROTESK_HOME@ and variable value as @<installation dir>@. # Click @OK@ on all open windows. # Reopen the command prompt window. h4. _Linux and OS X_ Add the command below to the @~.bash_profile@ file (Linux) or the @~/.profile@ file (OS X): <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. h3. Installation Directory Structure The MicroTESK installation directory contains the following subdirectories: | @arch@ | Examples of microprocessor specifications and test templates for the described designs | | @bin@ | Scripts to run features of MicroTESK (modelling and test generation) | | @doc@ | Documentation on MicroTESK | | @etc@ | MicroTESK configuration files | | @gen@ | Generated Java models of the specified microprocessor designs | | @lib@ | JAR files and Ruby scripts to perform modelling and test generation tasks | | @src@ | Source code of MicroTESK | h2. Using MicroTESK h3. Compiling ISA specifications _NOTE: Compiling ISA specifications This information is required only if the user is going to modify them. The the RISC-V ISA specifications since the distribution package already contains compiled specifications. By default, the ISA specifications are compiled for revision <code>RV64{I,M,F,D,C}</code>._ specifications._ The description of the RISC-V ISA is provided in formal specifications in the nML language. They can be found in the @<installation dir>/arch/riscv/model@ folder. They need to be compiled to be used by MicroTESK. To compile them, a user needs to run the Make file stored in the @<installation dir>/arch/riscv/model@ folder: <pre> cd $MICROTESK_HOME/arch/riscv/model make </pre> h3. Generating test programs 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: # _model name_; # _test template file_. 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. <pre> sh bin/generate.sh minimips arch/demo/minimips/templates/euclid.rb </pre> 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: <pre> sh bin/generate.sh -s cvc4 minimips arch/demo/minimips/templates/constraint.rb </pre> More information on command-line options can be found on the [[Command-Line Options]] page.