CIRCT 24.0.0git
Loading...
Searching...
No Matches
test_verilator Namespace Reference

Classes

class  TestSimulatorDiscovery
class  TestCompileCommands
class  TestMakeFallback
class  TestFindVerilatorRoot
class  TestWriteCmake
class  TestRunCommand

Functions

 _make_verilator (run_dir, top="TestTop", debug=False, dpi_so=None, macros=None)
 _make_cmake_verilator (tmp_path, monkeypatch)
 test_source_files_add_dir_uses_filelist_order (tmp_path)
 test_source_files_add_dir_without_filelist (tmp_path)
 test_esi_cosim_macro_definitions (tmp_path)

Variables

 _accel_mock = MagicMock()
 requires_verilator_bin

Detailed Description

Unit tests for the Verilator cosim backend.

These tests exercise the command-generation and CMake-template logic of the
Verilator class *without* requiring the compiled ``esiCppAccel`` C++
extension. We achieve this by inserting a ``MagicMock`` for the extension
module before the real package is imported.

Function Documentation

◆ _make_cmake_verilator()

◆ _make_verilator()

◆ test_esi_cosim_macro_definitions()

test_verilator.test_esi_cosim_macro_definitions ( tmp_path)

Definition at line 354 of file test_verilator.py.

References main().

◆ test_source_files_add_dir_uses_filelist_order()

test_verilator.test_source_files_add_dir_uses_filelist_order ( tmp_path)

Definition at line 329 of file test_verilator.py.

◆ test_source_files_add_dir_without_filelist()

test_verilator.test_source_files_add_dir_without_filelist ( tmp_path)

Definition at line 346 of file test_verilator.py.

Variable Documentation

◆ _accel_mock

test_verilator._accel_mock = MagicMock()
protected

Definition at line 23 of file test_verilator.py.

◆ requires_verilator_bin

test_verilator.requires_verilator_bin
Initial value:
1= pytest.mark.skipif(
2 not is_simulator_available("verilator"), reason="verilator not found")

Definition at line 69 of file test_verilator.py.