Project

General

Profile

MicroTESK Installation Guide » History » Revision 21

Revision 20 (Andrei Tatarnikov, 07/26/2018 07:17 PM) → Revision 21/22 (Andrei Tatarnikov, 07/26/2018 07:20 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 is required only if the user is going to modify them. The distribution package already contains compiled specifications. By default, the ISA specifications are compiled for revision <code>RV64{I,M,F,D,C}</code>._ 

 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 and compiling test programs 

 Test programs are generated on the basis of test templates. Examples of test templates are provided in the the @<installation dir>/arch/riscv/templates@ folder. Most of them contain comments describing their purpose. 

 To run generation of a test program, a used need to run a Make file located in the same folder. For example: 

 <pre> 
 cd $MICROTESK_HOME/arch/riscv/templates/torture 
 make torture 
 </pre> 

 The Make script generates a test program and compiles it with the GNU toolchain. The generated and compiled test program is placed into the @<installation dir>/output/torture/torture@ folder. 
 To successfully compile the test program, the following tools are required to be installed in the machine: <code>riscv64-unknown-elf-gcc</code> and <code>riscv64-unknown-elf-objdump</code>. 

 The debug output of the generator is printed into the <code>torture.stderr</code> and <code>torture.stdout</code> files. These files need to be investigated any problems occur during test program generation.