Welcome to the Cocotb Snippets extension! This extension provides a collection of code snippets tailored for Cocotb, a coroutine-based co-simulation testbench framework for writing testbenches in Python. These snippets help you quickly generate boilerplate code and common patterns used in Cocotb, making your development process more efficient.
Features
Basic Cocotb Testbench Structure: Quickly scaffold a basic testbench with a simple test case.
Clock Generator: Insert a ready-to-use clock generator for driving clock signals.
Makefile template: Basic Makefile for the verilog files.
Additional snippets and updates will be provided in future releases.
Usage
Install the extension.
In the Python test file / Makefile, type "coco" to initialise intellisense.
Select the desired snippet.
Snippets
Python test file:
cocotesttemplate: Template of a basic Cocotb test.
cocotestfunction: Create a basic Cocotb test function
cococlock: Create a clock of desired precision..
cocowaitclockcycles: Wait for number of clock cycles.
cocowaittimer: Wait for a certain amount of time.
Makefile:
cocomakeverilog: Makefile template for a basic Cocotb test.
Additional snippets and updates will be provided in future releases.
Requirements
To use this extension, ensure you have the following:
Cocotb: A Python library for writing co-simulation testbenches.
Release Notes
1.0.2
Added functionality of bare minimal cocotb testbench.