aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 0159d949dc595d9ea15087f21e0b233116dd7e24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# VeriFuzz [![Build Status](https://travis-ci.com/ymherklotz/verifuzz.svg?token=qfBKKGwxeWkjDsy7e16x&branch=master)](https://travis-ci.com/ymherklotz/verifuzz)

Verilog Fuzzer to test the major verilog compilers by generating random, valid
verilog.

It currently supports the following synthesisers:

- [Yosys](http://www.clifford.at/yosys/)
- [Xst](https://www.xilinx.com/support/documentation/sw_manuals/xilinx11/ise_c_using_xst_for_synthesis.htm)
- [Vivado](https://www.xilinx.com/products/design-tools/ise-design-suite.html)
- [Quartus](https://www.intel.com/content/www/us/en/programmable/downloads/download-center.html)

and the following simulator:

- [Icarus Verilog](http://iverilog.icarus.com)

## Reported bugs

- **MS** :: Mis-synthesis
- **C** :: Crash

### Yosys

| Type | Issue                                                      | Confirmed | Fixed |   |
|------|------------------------------------------------------------|-----------|-------|---|
| MS   | [Issue 1047](https://github.com/YosysHQ/yosys/issues/1047) | ✓         | ✓     |   |
| MS   | [Issue 997](https://github.com/YosysHQ/yosys/issues/997)   | ✓         | ✓     |   |
| C    | [Issue 993](https://github.com/YosysHQ/yosys/issues/993)   | ✓         | ✓     |   |

### Vivado

| Type | Issue                                                                                               | Confirmed | Fixed |
|------|-----------------------------------------------------------------------------------------------------|-----------|-------|
| C    | https://forums.xilinx.com/t5/Synthesis/Vivado-2019-1-Verilog-If-statement-nesting-crash/td-p/981787 |           |       |

## Build the Fuzzer

The fuzzer is split into an executable (in the [app](/app) folder) and a
library (in the [src](/src) folder). To build the executable, you will need
[stack](https://docs.haskellstack.org/en/stable/README/) installed. Building
directly using [cabal-install](https://www.haskell.org/cabal/download.html) is
possible but not recommended and not directly supported.

To build the executable:

```
stack build
```

To run the executable:

```
stack exec verifuzz
```

To install the executable (which defaults to installing it in `~/.local`):

```
stack install
```

## Running tests

There are two test-suites that currently test the library. One of the
test-suites tests the random code generation and generation of the acyclic
graph. It also contains some property based tests for this. The other test-suite
uses `doctest` to test the examples that are in the documentation.

To run the test-suites:

```
stack test
```