Cosim
Interfacing VHDL and foreign languages with VUnit
Install / Use
/learn @VUnit/CosimREADME
<p align="center"> <a title="Visit vunit.github.io" href="https://vunit.github.io/cosim" ><img src="https://img.shields.io/website/http/vunit.github.io/cosim/index.html.svg?longCache=true&style=flat-square&label=vunit.github.io%2Fcosim" /></a><!-- --> <a title="Join the chat at https://gitter.im/VUnit/vunit" href="https://gitter.im/VUnit/vunit" ><img src="https://img.shields.io/gitter/room/VUnit/vunit.svg?longCache=true&style=flat-square&logo=gitter&logoColor=4db797&color=4db797" /></a><!-- --> <a title="'docs' workflow Status" href="https://github.com/VUnit/cosim/actions?query=workflow%3Adocs" ><img alt="'docs' workflow Status" src="https://img.shields.io/github/workflow/status/VUnit/cosim/docs?longCache=true&style=flat-square&label=docs" /></a><!-- --> <a title="'push' workflow Status" href="https://github.com/VUnit/cosim/actions?query=workflow%3Apush" ><img alt="'push' workflow Status" src="https://img.shields.io/github/workflow/status/VUnit/cosim/push?longCache=true&style=flat-square&label=push" /></a> </p>This repository is in a very early planning phase. Although the VHPIDIRECT bridge for GHDL is functional, breaking changes are being discussed in VUnit/vunit#603.
Interfacing VHDL and foreign languages with VUnit
Three main approaches are used to co-simulate (co-execute) VHDL sources along with software applications written in a different language (typically C/C++):
- Verilog Procedural Interface (VPI), also known as Program Language Interface (PLI) 2.0.
- VHDL Procedural Interface (VHPI), or specific implementations, such as Foreign Language Interface (FLI).
- Generation of C/C++ models/sources through a transpiler.
This repository aims to gather resources to use these techniques with VUnit. The content is organised in bridges, examples and utils:
- Bridges contain VHDL packages, (optionally) matching C headers and Python classes. Each bridge provides the glue logic between a VHDL API (or another bridge) and some other API in VHDL and/or C (bindings).
- Examples are working demo projects that use some utils and/or bridges. Dockerfiles are included in the examples that require additional FOSS tools.
- Utils contains helper functions in Python (based on
ctypes,base64,numpyandPillow) which are useful for interacting with C-alike executables.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
107.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
347.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
