Skip to main content

DV Flow Manager tasks for building and running cocotb testbenches

Project description

dv-flow-libcocotb

DV Flow Manager (dfm) tasks for building and running cocotb testbenches.

dv-flow-libcocotb contains no simulator build/run code — it emits dfm data items that drive the simulator tasks in dv-flow-libhdlsim. The same flow graph works for every supported simulator:

rtl, cocotb.<sim>.Setup  ->  hdlsim.<sim>.SimImage  ->  hdlsim.<sim>.SimRun
                                                        (+ cocotb.TestConfig)
  • cocotb.<sim>.Setup — emits the cocotb VPI library, the cocotb run-time environment, and (for Verilator) cocotb's C++ main plus --prefix Vtop.
  • cocotb.TestConfig — selects the test module(s)/case(s) and HDL toplevel.
  • cocotb.CheckResults — turns results.xml failures into dfm errors.

Verified end-to-end with Icarus Verilog and Verilator. See docs/ for the design, the implementation plan, and the user guide.

Quickstart (Verilator)

package:
  name: my_dv
  imports: [std, hdlsim.vlt, cocotb, cocotb.vlt]
  tasks:
    - name: rtl
      uses: std.FileSet
      with: { base: rtl, type: verilogSource, include: "*.v" }
    - name: setup
      uses: cocotb.vlt.Setup
      with: { pythonpath: [tb] }
    - name: testcfg
      uses: cocotb.TestConfig
      with: { module: [test_dff], toplevel: dff }
    - name: build
      uses: hdlsim.vlt.SimImage
      needs: [rtl, setup]
      with: { top: [dff] }
    - name: sim
      uses: hdlsim.vlt.SimRun
      needs: [build, testcfg]
    - name: check
      uses: cocotb.CheckResults
      needs: [sim]

dfm run check

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dv_flow_libcocotb-0.0.128303801906-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file dv_flow_libcocotb-0.0.128303801906-py3-none-any.whl.

File metadata

File hashes

Hashes for dv_flow_libcocotb-0.0.128303801906-py3-none-any.whl
Algorithm Hash digest
SHA256 84200538d69902d94c45b36b26f0a2c469e1cfddd570f0905838c820b1c99982
MD5 49705089a5360802d2be94eddfff329c
BLAKE2b-256 eecd704e09b9625f9dad6905c75458c51017a0490ae616cd17206af7c84ac31f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page