File: example_dist.rst

package info (click to toggle)
verilator 5.038-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 162,552 kB
  • sloc: cpp: 139,204; python: 20,931; ansic: 10,222; yacc: 6,000; lex: 1,925; makefile: 1,260; sh: 494; perl: 282; fortran: 22
file content (42 lines) | stat: -rw-r--r-- 1,337 bytes parent folder | download | duplicates (2)
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
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0

.. _Examples in the Distribution:

Examples in the Distribution
============================

See the ``examples/`` directory that is part of the distribution, and
is installed (in an OS-specific place, often in e.g.
``/usr/local/share/verilator/examples``).  These examples include:

examples/make_hello_binary
   Example GNU-make simple Verilog->binary conversion
examples/make_hello_c
   Example GNU-make simple Verilog->C++ conversion
examples/make_hello_sc
   Example GNU-make simple Verilog->SystemC conversion
examples/make_tracing_c
   Example GNU-make Verilog->C++ with tracing
examples/make_tracing_sc
   Example GNU-make Verilog->SystemC with tracing
examples/make_protect_lib
   Example using --protect-lib
examples/cmake_hello_c
   Example building make_hello_c with CMake
examples/cmake_hello_sc
   Example building make_hello_sc with CMake
examples/cmake_tracing_c
   Example building make_tracing_c with CMake
examples/cmake_tracing_sc
   Example building make_tracing_sc with CMake
examples/cmake_protect_lib
   Example building make_protect_lib with CMake

To run an example copy the example to a new directory and run it.

::

      cp -rp {path_to}/examples/make_hello_c make_hello_c
      cd make_hello_c
      make