Testing

Manual Testing

The cardoon/workspace directory contains a set of netlists that can be used for manual testing during development.

Systematic Testing

A set of netlists with known results and an automatic testing script is provided in the cardoon/test directory.

The tests contained in this directory should be run after making modifications to the program to ensure that there are no regressions. All tests must be successful before committing changes to the main repository. Ideally, every time that a new feature is added to the simulator, a netlist testing the feature and the corresponding results should be added to this directory.

In order to run the tests, a set of reference result files (*_ref.npz) is used by the test script to verify that the results produced by the netlists match. These results are not available in the main repository, but they can be downloaded from:

To test an individual netlist:

./run_tests.py <netlist name>

To perform all automated tests, run the following:

./run_tests.py *.net

A simple profiling script is also provided. PYTHONPATH should be correctly set before running that script:

PYTHONPATH="..":$PYTHONPATH ./profile_netlist.py ring_osc_ahkab.net

Table Of Contents

Previous topic

Coding conventions

Next topic

Implementing a new device model

This Page