Building and Running Tests


Building tests

To build tests, you need to have gnu m4 and cpp in your path. You also need to have set up your environment. The entire picoJava VTS takes about 137MB of disk space.

The steps to build tests in picoJava source distribution are:

  1. cd $PICOJAVAHOME/$PROJECT/sim/test/pico_vts
  2. For each test suite under this directory, type:
    gunzip <test-suite>tar.gz
    or uncompress <test-suite>.tar.Z
    Then type: tar -xvf <test-suite>.tar
  3. type 'make' in every subdirectory under pico_vts

If you need to write additional tests for picoJava-II, refer to Chapter 3 of the picoJava-II Verification Guide.

Running tests on IAS only

Running tests on the RTL model

You can run tests on the RTL model either standalone or in cosimulation mode. Before running any tests on the RTL model, you must have built pj2vcs or pj2vlog present in your path. If you don't have either one of these, see Build RTL on how to build the model.

If you want to run simulations in cosimulation mode, you need to have IAS in your path. A version of ias for Sparc/Solaris platforms is provided with the distribution. If you would like to build your own version of ias, refer to Building IAS.

Running tests using steam

steam is the script used to run simulations in the picoJava-II environment.
You can use it to run a single test, a suite of tests, or the entire picoJava VTS.

See steam guide, for a simple guide on how to use steam.
See Chapter 4 of the picoJava-II Verification Guide for detailed information.

Note: steam is a perl script. You must have perl in your path to be able to run steam.

Running tests without using steam

There are two types of tests in picoJavaTM-II verification environment: RC tests and RT tests. For more information on these types of tests, see Chapter 3 of the picoJava-II Verification Guide.

To run a RT type test, compile the test code into a class file and copy the class file to reset.class.

For example, the steps to run test/pico_vts/basic/arithm_int with pj2vcs are:

  1. cd $PICOJAVAHOME/$PROJECT/sim/test/pico_vts/basic
  2. make
  3. mkdir arithm_int_output
  4. cp class/arithm_int.class
  5. cd arithm_int_output
  6. pj2vcs +cosim+ias

To run a RC type test, compile the test code into a class file and verify that the file reset.class is present in the directory $DSVHOME/class.

For example, the steps to run test/pico_vts/basic_java/allinst with pj2vlog are:

  1. cd $PICOJAVAHOME/$PROJECT/sim/test/pico_vts/basic_java
  2. make
  3. mkdir allinst_output
  4. cp class/allinst.class allinst_output/allinst.class
  5. cd allinst_output
  6. pj2vlog +cosim+ias +class+allinst.class -f $VFILES_PATH

Running regression on the entire picoJava-II VTS

You can run all the tests in the picoJava-II VTS with the following commands:
  1. cd $PICOJAVAHOME/$PROJECT/sim/test/pico_vts
  2. steam .

Note that it takes a long time to sequentially run all the tests in the VTS. You may prefer to dispatch different test runs in parallel to a server pool using load sharing software.


Copyright © 1999 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303-4900 USA. All rights reserved.


Last modified 24-March-1999