diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..c366b49 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,9 @@ +# This is the list of Abseil authors for copyright purposes. +# +# This does not necessarily list everyone who has contributed code, since in +# some cases, their employer may be the copyright holder. To see the full list +# of contributors, see the revision history in source control. + +Yu-Sheng Lin +You-Tang Lee +rfuest diff --git a/src/CMakeLists.txt b/CMakeLists.txt similarity index 89% rename from src/CMakeLists.txt rename to CMakeLists.txt index 9373410..d774c69 100644 --- a/src/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) # Collect cpp files (recursively) and split regular library sources vs tests (files ending with ".test.cpp") file(GLOB_RECURSE FST_CPP_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/fstcpp/*.cpp" - "${CMAKE_CURRENT_SOURCE_DIR}/gtkwave/*.cpp" + "fstcpp/*.cpp" ) # Lists to populate @@ -77,17 +76,18 @@ endforeach() ####################################### # Build the integration tests for testing bit-true behavior ####################################### -# compile verilator_shared/*.cpp as an cmake object +# compile verilator_share/*.cpp as an cmake object +# Non-recursively to exclude gtkwave/ folder file( - GLOB_RECURSE - VERILATOR_SHARED - ${CMAKE_CURRENT_SOURCE_DIR}/integration_test/verilator_share/*.cpp + GLOB + VERILATOR_SHARE + integration_test/verilator_share/*.cpp ) -add_library(verilator_shared OBJECT ${VERILATOR_SHARED}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/integration_test/verilator_share) +add_library(verilator_share OBJECT ${VERILATOR_SHARE}) +include_directories(integration_test/verilator_share) # for all direct folders under integration_test/tests, find all *.cpp files and compile them as an executable -file(GLOB TEST_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/integration_test/tests/*) +file(GLOB TEST_PATHS integration_test/tests/*) foreach(TEST_PATH ${TEST_PATHS}) get_filename_component(TEST_NAME ${TEST_PATH} NAME) @@ -98,13 +98,13 @@ foreach(TEST_PATH ${TEST_PATHS}) file(GLOB_RECURSE TEST_SRCS ${TEST_PATH}/*.cpp) # C executable - add_executable(${TEST_NAME}_c ${TEST_SRCS} gtkwave/fstapi.c $) + add_executable(${TEST_NAME}_c ${TEST_SRCS} integration_test/verilator_share/gtkwave/fstapi.c $) target_link_libraries(${TEST_NAME}_c PRIVATE fstcpp) target_include_directories(${TEST_NAME}_c PRIVATE ${TEST_PATH}/verilated) add_test(NAME ${TEST_NAME}_c COMMAND ${TEST_NAME}_c ${TEST_NAME}_dump_c.fst) # C++ executable - add_executable(${TEST_NAME}_cpp ${TEST_SRCS} gtkwave/fstapi.cpp $) + add_executable(${TEST_NAME}_cpp ${TEST_SRCS} integration_test/verilator_share/gtkwave/fstapi.cpp $) target_link_libraries(${TEST_NAME}_cpp PRIVATE fstcpp) target_include_directories(${TEST_NAME}_cpp PRIVATE ${TEST_PATH}/verilated) add_test(NAME ${TEST_NAME}_cpp COMMAND ${TEST_NAME}_cpp ${TEST_NAME}_dump_cpp.fst) diff --git a/README.md b/README.md index 90fc9ac..fdfebf6 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The unittests are written in C++20. - **C++14**: The core of this project is written in clean C++14 to maximize compatibility. Using `vector` and `string` can eliminate most resource management code compared to C. - **High Performance**: Optimized for speed to reduce simulation overhead (2x faster than the original `fstapi` when used with Verilator). This is mainly because we process data as binary instead of strings used by the original `fstapi.c`. - **Drop-in Compatibility**: Includes an optional C-compatible wrapper `fstapi.cpp`, providing the same writer interface as the original `fstapi.c`. -- **Robust Testing**: Comprehensive unit tests written in C++20 to ensure correctness. Coverage is also generated and checked (70% line and 70% function coverage). +- **Robust Testing**: Comprehensive unit tests written in C++20 to ensure correctness. Coverage is also generated and checked (85% line and 85% function coverage). - **Bit-true**: The implementation is bit-true to the original `fstapi.c` (tested in unittests). ## Regression Reports (WIP due to GitHub Actions permission issue) @@ -24,18 +24,17 @@ To view it: ## ๐Ÿ“‚ Project Structure -Every file of this project is under the `src` directory, which also includes third-party files: - -``` -fstcpp/ # ๐ŸŒŸ MAIN: Core C++ implementation -โ”œโ”€โ”€ Writer.h # - The new C++ API header -โ””โ”€โ”€โ”€ Writer.cpp # - The implementation -gtkwave/ # ๐Ÿ“š ORIGINAL: Original GtkWave files -โ”œโ”€โ”€ fstapi.cpp # - C-style wrapper for backward compatibility -โ”œโ”€โ”€ fstapi.c # - REFERENCE: the original GtkWave implementation -โ””โ”€โ”€ fstapi.h # - The original GtkWave header file used by both fstapi.cpp and fstapi.c -integration_test/ # ๐Ÿงช TESTS: Integration tests generated by Verilator -``` +- `fstcpp/`: ๐ŸŒŸ MAIN Core C++ implementation, header, and unittests. + - `fstcpp_writer.h`: The new C++ API header. + - `fstcpp_writer.cpp`: The implementation. +- `integration_test/`: ๐Ÿงช TESTS Integration tests generated by Verilator. + - `verilator_share/` + - `gtkwave/`: ๐Ÿ“š ORIGINAL GtkWave files copied from `libfst`. + - `fstapi.cpp`: C-style wrapper for backward compatibility. + - `fstapi.c`: REFERENCE - the original GtkWave implementation. + - `fstapi.h`: The original GtkWave header file. + - other files: Copied from Verilator 5.042 runtime (slightly modified for bit-true). + - other folders: individual integration tests. --- @@ -52,7 +51,7 @@ To configure the project with debug symbols and prepare it for *VS Code*+*clangd ```bash # Generate build files using Ninja -cmake -G Ninja -B build/debug -DCMAKE_BUILD_TYPE=Debug src +cmake -G Ninja -B build/debug -DCMAKE_BUILD_TYPE=Debug . ``` ### Manual Build for Development (No coverage test) @@ -60,7 +59,7 @@ cmake -G Ninja -B build/debug -DCMAKE_BUILD_TYPE=Debug src If you prefer running steps manually, our repository follows a very standard CMake workflow, here is an example: ```bash -cmake -G Ninja -B build/debug -DCMAKE_BUILD_TYPE=Debug src +cmake -G Ninja -B build/debug -DCMAKE_BUILD_TYPE=Debug . cd build/debug ninja -j$(nproc) ctest -j$(nproc) @@ -78,7 +77,7 @@ By default, it will create `build/regression` directory. ### Installation -There is no standard installation step now, just copy the files in `src/fstcpp` to your project. If you want to use the C-style wrapper, also copy `src/gtkwave/fstapi.cpp` and `src/gtkwave/fstapi.h` to your project. +There is no standard installation step now, just copy the `fstcpp/` folder to your project, and remove `*.test.cpp`. If you want to use the C-style wrapper, also copy `integration_test/verilator_share/gtkwave/fstapi.(cpp|h)` to your project. The dependencies are `ZLIB` and `lz4`, which are quite easy to install on most Linux distributions. @@ -95,14 +94,18 @@ The main source code of this repository is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for more details. ### Details -The `src` directory of this project contains a mix of original code and redistributed files: +The root directory of this project contains a mix of original code and redistributed files: * **MIT** * **`fstcpp/`**: The core of this project. - * **`gtkwave/`**: Redistributed from GtkWave. - * **`integration_test/`**: All SystemVerilog files and the testbench CPP files are part of this project. - * **`integration_test/*/verilated/`**: Generated by Verilator 5.042. They are derivative works and inherit the original MIT license of the SystemVerilog source. + * **`integration_test/`**: Without explicitly mentioned, all SystemVerilog files and the testbench CPP files are part of this project. + * **`verilator_share/gtkwave/`**: Redistributed from `libfst`, which is MIT license. + * **`verilator_share/gtkwave/fstapi.cpp`**: A compatibility layer wrapping this project into `libfst`'s original C-interface. + * **`*/verilated/`**: Generated by Verilator 5.042. They are derivative works and inherit the original MIT license of the SystemVerilog source. * **LGPL v3** - * **`integration_test/verilator_shared/`**: Copied from Verilator 5.042 runtime (slightly modified for bit-true). + * **`integration_test/verilator_share/`**: Copied from Verilator 5.042 runtime (slightly modified for bit-true). +* Projects that we have cited: + * [Verilator](https://github.com/verilator/verilator/) + * [libfst](https://github.com/gtkwave/libfst/) **AI usage notice:** The files in this repository are assisted by *Gemini 3 Pro* with *AntiGravity*. diff --git a/src/fstcpp/fstcpp.h b/fstcpp/fstcpp.h similarity index 100% rename from src/fstcpp/fstcpp.h rename to fstcpp/fstcpp.h diff --git a/src/fstcpp/fstcpp_assertion.h b/fstcpp/fstcpp_assertion.h similarity index 100% rename from src/fstcpp/fstcpp_assertion.h rename to fstcpp/fstcpp_assertion.h diff --git a/src/fstcpp/fstcpp_file.h b/fstcpp/fstcpp_file.h similarity index 100% rename from src/fstcpp/fstcpp_file.h rename to fstcpp/fstcpp_file.h diff --git a/src/fstcpp/fstcpp_stream_write_helper.h b/fstcpp/fstcpp_stream_write_helper.h similarity index 100% rename from src/fstcpp/fstcpp_stream_write_helper.h rename to fstcpp/fstcpp_stream_write_helper.h diff --git a/src/fstcpp/fstcpp_variable_info.cpp b/fstcpp/fstcpp_variable_info.cpp similarity index 100% rename from src/fstcpp/fstcpp_variable_info.cpp rename to fstcpp/fstcpp_variable_info.cpp diff --git a/src/fstcpp/fstcpp_variable_info.h b/fstcpp/fstcpp_variable_info.h similarity index 100% rename from src/fstcpp/fstcpp_variable_info.h rename to fstcpp/fstcpp_variable_info.h diff --git a/src/fstcpp/fstcpp_variable_info.test.cpp b/fstcpp/fstcpp_variable_info.test.cpp similarity index 100% rename from src/fstcpp/fstcpp_variable_info.test.cpp rename to fstcpp/fstcpp_variable_info.test.cpp diff --git a/src/fstcpp/fstcpp_writer.cpp b/fstcpp/fstcpp_writer.cpp similarity index 100% rename from src/fstcpp/fstcpp_writer.cpp rename to fstcpp/fstcpp_writer.cpp diff --git a/src/fstcpp/fstcpp_writer.h b/fstcpp/fstcpp_writer.h similarity index 100% rename from src/fstcpp/fstcpp_writer.h rename to fstcpp/fstcpp_writer.h diff --git a/src/fstcpp/fstcpp_writer_easy_blocks.test.cpp b/fstcpp/fstcpp_writer_easy_blocks.test.cpp similarity index 100% rename from src/fstcpp/fstcpp_writer_easy_blocks.test.cpp rename to fstcpp/fstcpp_writer_easy_blocks.test.cpp diff --git a/src/fstcpp/fstcpp_writer_value_change_block.test.cpp b/fstcpp/fstcpp_writer_value_change_block.test.cpp similarity index 100% rename from src/fstcpp/fstcpp_writer_value_change_block.test.cpp rename to fstcpp/fstcpp_writer_value_change_block.test.cpp diff --git a/src/integration_test/tests/RSA256/Makefile b/integration_test/tests/RSA256/Makefile similarity index 100% rename from src/integration_test/tests/RSA256/Makefile rename to integration_test/tests/RSA256/Makefile diff --git a/src/integration_test/tests/RSA256/Montgomery.sv b/integration_test/tests/RSA256/Montgomery.sv similarity index 100% rename from src/integration_test/tests/RSA256/Montgomery.sv rename to integration_test/tests/RSA256/Montgomery.sv diff --git a/src/integration_test/tests/RSA256/Pipeline.sv b/integration_test/tests/RSA256/Pipeline.sv similarity index 100% rename from src/integration_test/tests/RSA256/Pipeline.sv rename to integration_test/tests/RSA256/Pipeline.sv diff --git a/src/integration_test/tests/RSA256/PipelineCombine.sv b/integration_test/tests/RSA256/PipelineCombine.sv similarity index 100% rename from src/integration_test/tests/RSA256/PipelineCombine.sv rename to integration_test/tests/RSA256/PipelineCombine.sv diff --git a/src/integration_test/tests/RSA256/PipelineDistribute.sv b/integration_test/tests/RSA256/PipelineDistribute.sv similarity index 100% rename from src/integration_test/tests/RSA256/PipelineDistribute.sv rename to integration_test/tests/RSA256/PipelineDistribute.sv diff --git a/src/integration_test/tests/RSA256/PipelineFilter.sv b/integration_test/tests/RSA256/PipelineFilter.sv similarity index 100% rename from src/integration_test/tests/RSA256/PipelineFilter.sv rename to integration_test/tests/RSA256/PipelineFilter.sv diff --git a/src/integration_test/tests/RSA256/PipelineLoop.sv b/integration_test/tests/RSA256/PipelineLoop.sv similarity index 100% rename from src/integration_test/tests/RSA256/PipelineLoop.sv rename to integration_test/tests/RSA256/PipelineLoop.sv diff --git a/src/integration_test/tests/RSA256/RSA.sv b/integration_test/tests/RSA256/RSA.sv similarity index 100% rename from src/integration_test/tests/RSA256/RSA.sv rename to integration_test/tests/RSA256/RSA.sv diff --git a/src/integration_test/tests/RSA256/RSAMont.sv b/integration_test/tests/RSA256/RSAMont.sv similarity index 100% rename from src/integration_test/tests/RSA256/RSAMont.sv rename to integration_test/tests/RSA256/RSAMont.sv diff --git a/src/integration_test/tests/RSA256/RSA_pkg.sv b/integration_test/tests/RSA256/RSA_pkg.sv similarity index 100% rename from src/integration_test/tests/RSA256/RSA_pkg.sv rename to integration_test/tests/RSA256/RSA_pkg.sv diff --git a/src/integration_test/tests/RSA256/RSA_tb.sv b/integration_test/tests/RSA256/RSA_tb.sv similarity index 100% rename from src/integration_test/tests/RSA256/RSA_tb.sv rename to integration_test/tests/RSA256/RSA_tb.sv diff --git a/src/integration_test/tests/RSA256/TwoPower.sv b/integration_test/tests/RSA256/TwoPower.sv similarity index 100% rename from src/integration_test/tests/RSA256/TwoPower.sv rename to integration_test/tests/RSA256/TwoPower.sv diff --git a/src/integration_test/tests/RSA256/rsa256_tb.test.cpp b/integration_test/tests/RSA256/rsa256_tb.test.cpp similarity index 100% rename from src/integration_test/tests/RSA256/rsa256_tb.test.cpp rename to integration_test/tests/RSA256/rsa256_tb.test.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb.h b/integration_test/tests/RSA256/verilated/VRSA_tb.h similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb.h rename to integration_test/tests/RSA256/verilated/VRSA_tb.h diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb__ConstPool_0.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb__ConstPool_0.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb__ConstPool_0.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb__ConstPool_0.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb__Syms.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb__Syms.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb__Syms.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb__Syms.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb__Syms.h b/integration_test/tests/RSA256/verilated/VRSA_tb__Syms.h similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb__Syms.h rename to integration_test/tests/RSA256/verilated/VRSA_tb__Syms.h diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb__TraceDecls__0__Slow.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb__TraceDecls__0__Slow.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb__TraceDecls__0__Slow.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb__TraceDecls__0__Slow.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0__Slow.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0__Slow.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0__Slow.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb__Trace__0__Slow.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb___024root.h b/integration_test/tests/RSA256/verilated/VRSA_tb___024root.h similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb___024root.h rename to integration_test/tests/RSA256/verilated/VRSA_tb___024root.h diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb___024root__0.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb___024root__0.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb___024root__0.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb___024root__0.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb___024root__0__Slow.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb___024root__0__Slow.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb___024root__0__Slow.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb___024root__0__Slow.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb___024root__Slow.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb___024root__Slow.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb___024root__Slow.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb___024root__Slow.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb___024unit.h b/integration_test/tests/RSA256/verilated/VRSA_tb___024unit.h similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb___024unit.h rename to integration_test/tests/RSA256/verilated/VRSA_tb___024unit.h diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb___024unit__0__Slow.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb___024unit__0__Slow.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb___024unit__0__Slow.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb___024unit__0__Slow.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb___024unit__Slow.cpp b/integration_test/tests/RSA256/verilated/VRSA_tb___024unit__Slow.cpp similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb___024unit__Slow.cpp rename to integration_test/tests/RSA256/verilated/VRSA_tb___024unit__Slow.cpp diff --git a/src/integration_test/tests/RSA256/verilated/VRSA_tb__pch.h b/integration_test/tests/RSA256/verilated/VRSA_tb__pch.h similarity index 100% rename from src/integration_test/tests/RSA256/verilated/VRSA_tb__pch.h rename to integration_test/tests/RSA256/verilated/VRSA_tb__pch.h diff --git a/src/integration_test/tests/simple/Makefile b/integration_test/tests/simple/Makefile similarity index 100% rename from src/integration_test/tests/simple/Makefile rename to integration_test/tests/simple/Makefile diff --git a/src/integration_test/tests/simple/Simple.sv b/integration_test/tests/simple/Simple.sv similarity index 100% rename from src/integration_test/tests/simple/Simple.sv rename to integration_test/tests/simple/Simple.sv diff --git a/src/integration_test/tests/simple/Simple_tb.test.cpp b/integration_test/tests/simple/Simple_tb.test.cpp similarity index 100% rename from src/integration_test/tests/simple/Simple_tb.test.cpp rename to integration_test/tests/simple/Simple_tb.test.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple.cpp b/integration_test/tests/simple/verilated/VSimple.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple.cpp rename to integration_test/tests/simple/verilated/VSimple.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple.h b/integration_test/tests/simple/verilated/VSimple.h similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple.h rename to integration_test/tests/simple/verilated/VSimple.h diff --git a/src/integration_test/tests/simple/verilated/VSimple__Syms.cpp b/integration_test/tests/simple/verilated/VSimple__Syms.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple__Syms.cpp rename to integration_test/tests/simple/verilated/VSimple__Syms.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple__Syms.h b/integration_test/tests/simple/verilated/VSimple__Syms.h similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple__Syms.h rename to integration_test/tests/simple/verilated/VSimple__Syms.h diff --git a/src/integration_test/tests/simple/verilated/VSimple__TraceDecls__0__Slow.cpp b/integration_test/tests/simple/verilated/VSimple__TraceDecls__0__Slow.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple__TraceDecls__0__Slow.cpp rename to integration_test/tests/simple/verilated/VSimple__TraceDecls__0__Slow.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple__Trace__0.cpp b/integration_test/tests/simple/verilated/VSimple__Trace__0.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple__Trace__0.cpp rename to integration_test/tests/simple/verilated/VSimple__Trace__0.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple__Trace__0__Slow.cpp b/integration_test/tests/simple/verilated/VSimple__Trace__0__Slow.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple__Trace__0__Slow.cpp rename to integration_test/tests/simple/verilated/VSimple__Trace__0__Slow.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple___024root.h b/integration_test/tests/simple/verilated/VSimple___024root.h similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple___024root.h rename to integration_test/tests/simple/verilated/VSimple___024root.h diff --git a/src/integration_test/tests/simple/verilated/VSimple___024root__0.cpp b/integration_test/tests/simple/verilated/VSimple___024root__0.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple___024root__0.cpp rename to integration_test/tests/simple/verilated/VSimple___024root__0.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple___024root__0__Slow.cpp b/integration_test/tests/simple/verilated/VSimple___024root__0__Slow.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple___024root__0__Slow.cpp rename to integration_test/tests/simple/verilated/VSimple___024root__0__Slow.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple___024root__Slow.cpp b/integration_test/tests/simple/verilated/VSimple___024root__Slow.cpp similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple___024root__Slow.cpp rename to integration_test/tests/simple/verilated/VSimple___024root__Slow.cpp diff --git a/src/integration_test/tests/simple/verilated/VSimple__pch.h b/integration_test/tests/simple/verilated/VSimple__pch.h similarity index 100% rename from src/integration_test/tests/simple/verilated/VSimple__pch.h rename to integration_test/tests/simple/verilated/VSimple__pch.h diff --git a/src/gtkwave/fst_config.h b/integration_test/verilator_share/gtkwave/fst_config.h similarity index 100% rename from src/gtkwave/fst_config.h rename to integration_test/verilator_share/gtkwave/fst_config.h diff --git a/src/gtkwave/fst_win_unistd.h b/integration_test/verilator_share/gtkwave/fst_win_unistd.h similarity index 100% rename from src/gtkwave/fst_win_unistd.h rename to integration_test/verilator_share/gtkwave/fst_win_unistd.h diff --git a/src/gtkwave/fstapi.c b/integration_test/verilator_share/gtkwave/fstapi.c similarity index 100% rename from src/gtkwave/fstapi.c rename to integration_test/verilator_share/gtkwave/fstapi.c diff --git a/src/gtkwave/fstapi.cpp b/integration_test/verilator_share/gtkwave/fstapi.cpp similarity index 100% rename from src/gtkwave/fstapi.cpp rename to integration_test/verilator_share/gtkwave/fstapi.cpp diff --git a/src/gtkwave/fstapi.h b/integration_test/verilator_share/gtkwave/fstapi.h similarity index 100% rename from src/gtkwave/fstapi.h rename to integration_test/verilator_share/gtkwave/fstapi.h diff --git a/src/integration_test/verilator_share/sv_vpi_user.h b/integration_test/verilator_share/sv_vpi_user.h similarity index 100% rename from src/integration_test/verilator_share/sv_vpi_user.h rename to integration_test/verilator_share/sv_vpi_user.h diff --git a/src/integration_test/verilator_share/svdpi.h b/integration_test/verilator_share/svdpi.h similarity index 100% rename from src/integration_test/verilator_share/svdpi.h rename to integration_test/verilator_share/svdpi.h diff --git a/src/integration_test/verilator_share/verilated.cpp b/integration_test/verilator_share/verilated.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated.cpp rename to integration_test/verilator_share/verilated.cpp diff --git a/src/integration_test/verilator_share/verilated.h b/integration_test/verilator_share/verilated.h similarity index 100% rename from src/integration_test/verilator_share/verilated.h rename to integration_test/verilator_share/verilated.h diff --git a/src/integration_test/verilator_share/verilated_config.h b/integration_test/verilator_share/verilated_config.h similarity index 100% rename from src/integration_test/verilator_share/verilated_config.h rename to integration_test/verilator_share/verilated_config.h diff --git a/src/integration_test/verilator_share/verilated_config.h.in b/integration_test/verilator_share/verilated_config.h.in similarity index 100% rename from src/integration_test/verilator_share/verilated_config.h.in rename to integration_test/verilator_share/verilated_config.h.in diff --git a/src/integration_test/verilator_share/verilated_cov.cpp b/integration_test/verilator_share/verilated_cov.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_cov.cpp rename to integration_test/verilator_share/verilated_cov.cpp diff --git a/src/integration_test/verilator_share/verilated_cov.h b/integration_test/verilator_share/verilated_cov.h similarity index 100% rename from src/integration_test/verilator_share/verilated_cov.h rename to integration_test/verilator_share/verilated_cov.h diff --git a/src/integration_test/verilator_share/verilated_cov_key.h b/integration_test/verilator_share/verilated_cov_key.h similarity index 100% rename from src/integration_test/verilator_share/verilated_cov_key.h rename to integration_test/verilator_share/verilated_cov_key.h diff --git a/src/integration_test/verilator_share/verilated_dpi.cpp b/integration_test/verilator_share/verilated_dpi.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_dpi.cpp rename to integration_test/verilator_share/verilated_dpi.cpp diff --git a/src/integration_test/verilator_share/verilated_dpi.h b/integration_test/verilator_share/verilated_dpi.h similarity index 100% rename from src/integration_test/verilator_share/verilated_dpi.h rename to integration_test/verilator_share/verilated_dpi.h diff --git a/src/integration_test/verilator_share/verilated_fst_c.cpp b/integration_test/verilator_share/verilated_fst_c.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_fst_c.cpp rename to integration_test/verilator_share/verilated_fst_c.cpp diff --git a/src/integration_test/verilator_share/verilated_fst_c.h b/integration_test/verilator_share/verilated_fst_c.h similarity index 100% rename from src/integration_test/verilator_share/verilated_fst_c.h rename to integration_test/verilator_share/verilated_fst_c.h diff --git a/src/integration_test/verilator_share/verilated_funcs.h b/integration_test/verilator_share/verilated_funcs.h similarity index 100% rename from src/integration_test/verilator_share/verilated_funcs.h rename to integration_test/verilator_share/verilated_funcs.h diff --git a/src/integration_test/verilator_share/verilated_imp.h b/integration_test/verilator_share/verilated_imp.h similarity index 100% rename from src/integration_test/verilator_share/verilated_imp.h rename to integration_test/verilator_share/verilated_imp.h diff --git a/src/integration_test/verilator_share/verilated_intrinsics.h b/integration_test/verilator_share/verilated_intrinsics.h similarity index 100% rename from src/integration_test/verilator_share/verilated_intrinsics.h rename to integration_test/verilator_share/verilated_intrinsics.h diff --git a/src/integration_test/verilator_share/verilated_probdist.cpp b/integration_test/verilator_share/verilated_probdist.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_probdist.cpp rename to integration_test/verilator_share/verilated_probdist.cpp diff --git a/src/integration_test/verilator_share/verilated_profiler.cpp b/integration_test/verilator_share/verilated_profiler.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_profiler.cpp rename to integration_test/verilator_share/verilated_profiler.cpp diff --git a/src/integration_test/verilator_share/verilated_profiler.h b/integration_test/verilator_share/verilated_profiler.h similarity index 100% rename from src/integration_test/verilator_share/verilated_profiler.h rename to integration_test/verilator_share/verilated_profiler.h diff --git a/src/integration_test/verilator_share/verilated_random.cpp b/integration_test/verilator_share/verilated_random.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_random.cpp rename to integration_test/verilator_share/verilated_random.cpp diff --git a/src/integration_test/verilator_share/verilated_random.h b/integration_test/verilator_share/verilated_random.h similarity index 100% rename from src/integration_test/verilator_share/verilated_random.h rename to integration_test/verilator_share/verilated_random.h diff --git a/src/integration_test/verilator_share/verilated_saif_c.cpp b/integration_test/verilator_share/verilated_saif_c.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_saif_c.cpp rename to integration_test/verilator_share/verilated_saif_c.cpp diff --git a/src/integration_test/verilator_share/verilated_saif_c.h b/integration_test/verilator_share/verilated_saif_c.h similarity index 100% rename from src/integration_test/verilator_share/verilated_saif_c.h rename to integration_test/verilator_share/verilated_saif_c.h diff --git a/src/integration_test/verilator_share/verilated_save.cpp b/integration_test/verilator_share/verilated_save.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_save.cpp rename to integration_test/verilator_share/verilated_save.cpp diff --git a/src/integration_test/verilator_share/verilated_save.h b/integration_test/verilator_share/verilated_save.h similarity index 100% rename from src/integration_test/verilator_share/verilated_save.h rename to integration_test/verilator_share/verilated_save.h diff --git a/src/integration_test/verilator_share/verilated_sym_props.h b/integration_test/verilator_share/verilated_sym_props.h similarity index 100% rename from src/integration_test/verilator_share/verilated_sym_props.h rename to integration_test/verilator_share/verilated_sym_props.h diff --git a/src/integration_test/verilator_share/verilated_syms.h b/integration_test/verilator_share/verilated_syms.h similarity index 100% rename from src/integration_test/verilator_share/verilated_syms.h rename to integration_test/verilator_share/verilated_syms.h diff --git a/src/integration_test/verilator_share/verilated_threads.cpp b/integration_test/verilator_share/verilated_threads.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_threads.cpp rename to integration_test/verilator_share/verilated_threads.cpp diff --git a/src/integration_test/verilator_share/verilated_threads.h b/integration_test/verilator_share/verilated_threads.h similarity index 100% rename from src/integration_test/verilator_share/verilated_threads.h rename to integration_test/verilator_share/verilated_threads.h diff --git a/src/integration_test/verilator_share/verilated_timing.cpp b/integration_test/verilator_share/verilated_timing.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_timing.cpp rename to integration_test/verilator_share/verilated_timing.cpp diff --git a/src/integration_test/verilator_share/verilated_timing.h b/integration_test/verilator_share/verilated_timing.h similarity index 100% rename from src/integration_test/verilator_share/verilated_timing.h rename to integration_test/verilator_share/verilated_timing.h diff --git a/src/integration_test/verilator_share/verilated_trace.h b/integration_test/verilator_share/verilated_trace.h similarity index 100% rename from src/integration_test/verilator_share/verilated_trace.h rename to integration_test/verilator_share/verilated_trace.h diff --git a/src/integration_test/verilator_share/verilated_trace_imp.h b/integration_test/verilator_share/verilated_trace_imp.h similarity index 100% rename from src/integration_test/verilator_share/verilated_trace_imp.h rename to integration_test/verilator_share/verilated_trace_imp.h diff --git a/src/integration_test/verilator_share/verilated_types.h b/integration_test/verilator_share/verilated_types.h similarity index 100% rename from src/integration_test/verilator_share/verilated_types.h rename to integration_test/verilator_share/verilated_types.h diff --git a/src/integration_test/verilator_share/verilated_vpi.cpp b/integration_test/verilator_share/verilated_vpi.cpp similarity index 100% rename from src/integration_test/verilator_share/verilated_vpi.cpp rename to integration_test/verilator_share/verilated_vpi.cpp diff --git a/src/integration_test/verilator_share/verilated_vpi.h b/integration_test/verilator_share/verilated_vpi.h similarity index 100% rename from src/integration_test/verilator_share/verilated_vpi.h rename to integration_test/verilator_share/verilated_vpi.h diff --git a/src/integration_test/verilator_share/verilatedos.h b/integration_test/verilator_share/verilatedos.h similarity index 100% rename from src/integration_test/verilator_share/verilatedos.h rename to integration_test/verilator_share/verilatedos.h diff --git a/src/integration_test/verilator_share/verilatedos_c.h b/integration_test/verilator_share/verilatedos_c.h similarity index 100% rename from src/integration_test/verilator_share/verilatedos_c.h rename to integration_test/verilator_share/verilatedos_c.h diff --git a/src/integration_test/verilator_share/veriuser.h b/integration_test/verilator_share/veriuser.h similarity index 100% rename from src/integration_test/verilator_share/veriuser.h rename to integration_test/verilator_share/veriuser.h diff --git a/src/integration_test/verilator_share/vltstd/sv_vpi_user.h b/integration_test/verilator_share/vltstd/sv_vpi_user.h similarity index 100% rename from src/integration_test/verilator_share/vltstd/sv_vpi_user.h rename to integration_test/verilator_share/vltstd/sv_vpi_user.h diff --git a/src/integration_test/verilator_share/vltstd/svdpi.h b/integration_test/verilator_share/vltstd/svdpi.h similarity index 100% rename from src/integration_test/verilator_share/vltstd/svdpi.h rename to integration_test/verilator_share/vltstd/svdpi.h diff --git a/src/integration_test/verilator_share/vltstd/veriuser.h b/integration_test/verilator_share/vltstd/veriuser.h similarity index 100% rename from src/integration_test/verilator_share/vltstd/veriuser.h rename to integration_test/verilator_share/vltstd/veriuser.h diff --git a/src/integration_test/verilator_share/vltstd/vpi_user.h b/integration_test/verilator_share/vltstd/vpi_user.h similarity index 100% rename from src/integration_test/verilator_share/vltstd/vpi_user.h rename to integration_test/verilator_share/vltstd/vpi_user.h diff --git a/src/integration_test/verilator_share/vpi_user.h b/integration_test/verilator_share/vpi_user.h similarity index 100% rename from src/integration_test/verilator_share/vpi_user.h rename to integration_test/verilator_share/vpi_user.h diff --git a/run_regression.sh b/run_regression.sh index bc140e4..022638d 100755 --- a/run_regression.sh +++ b/run_regression.sh @@ -5,13 +5,13 @@ # --build , default to ./build/regression # --coverage, default to false # --coverage-html, default to false, autoset --coverage to true -# --coverage-line, default to 70 -# --coverage-func, default to 70 +# --coverage-line, default to 85 +# --coverage-func, default to 85 BUILD_DIR="build/regression" COVERAGE=0 COVERAGE_HTML=0 -COVERAGE_LINE=70 -COVERAGE_FUNC=70 +COVERAGE_LINE=85 +COVERAGE_FUNC=85 ROOT_DIR=$(pwd) TEST_EXIT_CODE=0 while [[ "$#" -gt 0 ]]; do @@ -32,7 +32,7 @@ function CMakeInit() { mkdir -p "$BUILD_DIR" local cov_opt="OFF" if [ $COVERAGE -eq 1 ]; then cov_opt="ON"; fi - cmake -B "$BUILD_DIR" -S src -G Ninja -DENABLE_COVERAGE=$cov_opt + cmake -B "$BUILD_DIR" -S . -G Ninja -DENABLE_COVERAGE=$cov_opt } function BuildAndRunTests() { @@ -44,7 +44,7 @@ function BuildAndRunTests() { function CollectCoverage() { if [ $COVERAGE = 1 ]; then lcov --capture --directory . --output-file coverage.info --ignore-errors inconsistent,mismatch,empty - lcov --extract coverage.info '*/src/fstcpp/*' --output-file coverage.info --ignore-errors inconsistent,mismatch,empty + lcov --extract coverage.info '*/fstcpp/*' --output-file coverage.info --ignore-errors inconsistent,mismatch,empty if [ $COVERAGE_HTML = 1 ]; then genhtml coverage.info --output-directory html fi