From: R Veera Kumar Date: Mon, 24 May 2021 09:19:57 +0000 (+0530) Subject: Add pages for cocotb setup and use. X-Git-Tag: DRAFT_SVP64_0_1~879 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c250a7f755216cc35a30892f0354a29773307106;p=libreriscv.git Add pages for cocotb setup and use. --- diff --git a/HDL_workflow.mdwn b/HDL_workflow.mdwn index 17ff8af2e..3b41fac56 100644 --- a/HDL_workflow.mdwn +++ b/HDL_workflow.mdwn @@ -564,6 +564,12 @@ Icarus Verilog is a Verilog simulation and synthesis tool. It operates as a comp See [[HDL_workflow/iverilog]] page for installation instructions. +## Cocotb + +cocotb is a COroutine based COsimulation TestBench environment for verifying VHDL and SystemVerilog RTL using Python. + +See [[HDL_workflow/cocotb]] page for installation instructions. + # Registering for git repository access After going through the onboarding process and having agreed to take diff --git a/HDL_workflow/cocotb.mdwn b/HDL_workflow/cocotb.mdwn new file mode 100644 index 000000000..4446d4c4a --- /dev/null +++ b/HDL_workflow/cocotb.mdwn @@ -0,0 +1,37 @@ +# Installation instructions for cocotb + +## Setting up new debootstrap and chroot into it + +Run the following if you wish to isolate the cocotb build +from other software (reproducible builds) or use the schroot +auto-preparation script here: + + + export MY_CHROOT=/opt/chroot/cocotb + mkdir $MY_CHROOT + debootstrap stable $MY_CHROOT http://deb.debian.org/debian/ + mount -t proc proc $MY_CHROOT/proc + mount -t sysfs sysfs $MY_CHROOT/sys + mount -t devpts devpts $MY_CHROOT/dev/pts/ + chroot $MY_CHROOT /bin/bash + +The dev-env-setup chroot script is a little more sophisticated +than the above + +## Steps to compile cocotb + +### Necessary software to install + + apt-get install git python3 python3-dev g++ make \ + python3-setuptools python3-pytest + +### Build cocotb + + git clone https://github.com/cocotb/cocotb.git + + cd cocotb + git checkout v1.5.2 + python3 setup.py install + +Please adjust the install paths for cocotb. +