{"id":22063060,"url":"https://github.com/euripedesrocha/tbpp","last_synced_at":"2025-03-23T17:44:14.269Z","repository":{"id":138720547,"uuid":"258853309","full_name":"euripedesrocha/tbpp","owner":"euripedesrocha","description":"A simple test library for verilator","archived":false,"fork":false,"pushed_at":"2020-05-03T19:07:10.000Z","size":131,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T23:48:39.677Z","etag":null,"topics":["cpp","fusesoc","verilator","verilog"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/euripedesrocha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-25T19:07:39.000Z","updated_at":"2020-05-04T01:00:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4bac343-cd8e-4675-8baf-c9ac35fb05a6","html_url":"https://github.com/euripedesrocha/tbpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euripedesrocha%2Ftbpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euripedesrocha%2Ftbpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euripedesrocha%2Ftbpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euripedesrocha%2Ftbpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euripedesrocha","download_url":"https://codeload.github.com/euripedesrocha/tbpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144021,"owners_count":20568049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","fusesoc","verilator","verilog"],"created_at":"2024-11-30T18:29:00.745Z","updated_at":"2025-03-23T17:44:14.219Z","avatar_url":"https://github.com/euripedesrocha.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tbpp : A Simple test bench support library for Verilator\n\nThis is a simple support library for Verilator based test benchs.\n\nVerilator is a Verilog simulator that generates a C++ model from the Verilog sources. \nThis librarys adds some helper classes and functions to simplify testbench creation.\n\nThis library is for C++ study and intended to use in my projects. No promise of stability on the interface for the next months, this is also very experimental. \n\nThis can be used as a fusesoc core. \n\n## simple_tb\n\nFor simple combinational designs tbpp::base_tb provides a simple class that eliminates the need to delete the model when it goes out of scope.\n\n## clocked_tb\n\nMost of designs are complex and use a clock to work. This class aims to help on writing complex tests. At this moment the class only adds helper functions to execute cycles of clock and to enable tracing to a file when needed.\n\nAt this moment the only implication of this class usage is that the clock signal must be named clk.\n\nThe original idea of this code is to use with [Catch2](https://github.com/catchorg/Catch2) as in the example below. \n\n```cpp\nconstexpr auto enable_tracing = true;\nusing testbench_type = tbpp::clocked_tb\u003cVERILATED_DESIGN, enable_tracing\u003e;\n\nTEST_CASE(\"Example\") {\n  testbench_type dut;\n  // Select file to trace \n  dut.trace_to(\"file_name.vcd\");\n  dut-\u003emodule_port_access = 0;\n  // Execute 1 clock cycle\n  tbpp::run(dut);\n  // Execute 50 clock cycle\n  tbpp::run(dut, 50);\n} \n```\n\n## Future\n\nIn the future I intend to add Bus Functional Model support functions and class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuripedesrocha%2Ftbpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuripedesrocha%2Ftbpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuripedesrocha%2Ftbpp/lists"}