caravel-cocotb


Namecaravel-cocotb JSON
Version 1.5.0 PyPI version JSON
download
home_pageNone
SummaryEfabless Caravel cocotb Verification Flow(s)
upload_time2025-02-16 11:37:37
maintainerNone
docs_urlNone
authorEfabless Corporation and Contributors
requires_python<4,>=3.8.1
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Overview
<!-- start read me file -->
This project aims to provide a user friendly environment for adding and running cocotb tests for Caravel user projects.


# Prerequisites

<!-- start configure the repo include0 -->

* Docker: [Linux](https://hub.docker.com/search?q=&type=edition&offering=community&operating_system=linux&utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) ||  [Windows](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) || [Mac with Intel Chip](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) || [Mac with M1 Chip](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) 
* Python 3.6+ with PIP
* ```docker pull efabless/dv:cocotb```
* Clone of Caravel 
* Clone of Caravel management repo
* Clone of PDK from [volare](https://github.com/efabless/volare)
* Clone of Caravel user project 
<!-- end configure the repo include0 -->


# caravel_cocotb

## How to install caravel_cocotb

```bash
 pip install caravel-cocotb
```

or to install from repo
```bash
   git clone git@github.com:efabless/caravel-sim-infrastructure.git
   git checkout <release>
   cd caravel-sim-infrastructure/cocotb
   pip install .
   cd ../..
```

## caravel_cocotb usage
 
caravel_cocotb provides a flow and APIs to run simulation on user_project after integerated with caravel. This is so helpful in detecting any bug in the connection between the user project and Caravel IOs, wishbone interface or logic analyzers. Also since it's easy to add and run tests with this flow it can be used to test the whole user project.
<!-- middle read me file -->

# Creating a Test

<!-- start create a test include1 -->
## Requirements
 
   - install [cocotb_caravel](#how-to-install-caravel_cocotb) 
   - update netlist for RTL and GL files at ```<caravel_user_project>/verilog/includes/``` with the design netlist
   - update the [design_info](#update-design_infoyaml) file at ```<caravel_user_project>/verilog/dv/cocotb/design_info.yaml```

## Adding a test

This section explains the steps needed to create a test.

A typical test for *Caravel* consists of 2 parts: ``Python/cocotb`` code and ``C`` code. 

* ``Python/cocotb`` code is for communicating with *Caravel* hardware interface inputs, outputs, clock, reset, and power ports/bins. ``cocotb`` here replaces the ``verilog`` code.

* ``C`` code provides firmware code that would be loaded into the *Caravel* CPU.

Tests files has to located under ``<caravel_user_project>/verilog/dv/cocotb/`` 

```bash
| dv
| ├── cocotb
| │   ├── <new_test>
| │   │   └── <new_test.py>
| │   │   └── <new_test.c>
| │   └── cocotb_tests.py
| │   └── design_info.yaml
| 
```
> **Note**: The name of ``C`` file must match the name of ``cocotb`` test function

### Python Template

The template for ``python`` test:

```python

   from caravel_cocotb.caravel_interfaces import test_configure
   from caravel_cocotb.caravel_interfaces import report_test
   from caravel_cocotb.caravel_interfaces import UART
   from caravel_cocotb.caravel_interfaces import SPI
   import cocotb

   @cocotb.test() # decorator to mark the test function as cocotb test
   @report_test # wrapper for configure test reporting files
   async def <test_name>(dut):
      caravelEnv = await test_configure(dut) #configure, start up and reset Caravel

      ######################## add test sequence ###################### 

```
<!-- end create a test include1 -->

Commonly used APIs to monitor or drive the hardware can be found in [`python_api`](docs/build/html/python_api.html)

<!-- start create a test include2 -->

> ! **Warning:** New test python function should be imported into cocotb_tests.py 

```python
  from <new_test>.<new_test> import <new_test>
```
### C Template

The template for Code test:

```C++

   #include <firmware_apis.h> // include required APIs 
   void main(){
      //////////////////////add test here////////////////////// 
      return;
   }
```
<!-- end create a test include2 -->

Commonly used APIs for firmware can be found in [`C_api`](docs/build/html/C_api.html)


<!-- start create a test include3 -->
# Test Examples

Refer to this [directory](https://github.com/efabless/caravel_user_project/tree/main/verilog/dv/cocotb) for tests example generated for 16-bit counter
<!-- end create a test include3 -->


# Creating a Testlist

Refer to [creating a testlist](docs/build/html/_sources/usage.rst.txt#creating-a-testlist) for where and how to create a test 


# run a test  

<!-- start run a test include -->
Tests can run individually or as a test group using ``testlist``. Tests can also run in RTL, GL or SDF sims with 9 different corners.

To run use caravel_cocotb in the location that has the design_info.yaml file or pass the path to the design_info.yaml file as a command -design_info: 



```bash 
usage: caravel_cocotb [-h] [-test TEST [TEST ...]] [-design_info DESIGN_INFO]
                      [-sim SIM [SIM ...]] [-testlist TESTLIST [TESTLIST ...]]
                      [-tag TAG] [-maxerr MAXERR] [-vcs]
                      [-corner CORNER [CORNER ...]] [-zip_passed]
                      [-emailto EMAILTO [EMAILTO ...]] [-seed SEED] [-no_wave]
                      [-sdf_setup] [-clk CLK] [-lint]
                      [-macros MACROS [MACROS ...]] [-sim_path SIM_PATH]
                      [-verbosity VERBOSITY] [-check_commits]
                      [-no_docker] [-compile]

Run cocotb tests

optional arguments:
  -h, --help            show this help message and exit
  -test TEST [TEST ...], -t TEST [TEST ...]
                        name of test or tests.if no --sim provided RTL will be
                        run <takes list as input>
  -design_info DESIGN_INFO, -di DESIGN_INFO
                        path to design_info.yaml file
  -sim SIM [SIM ...]    Simulation type RTL,GL & GL_SDF provided only when run
                        -test<takes list as input>
  -testlist TESTLIST [TESTLIST ...], -tl TESTLIST [TESTLIST ...]
                        path of testlist to be run
  -tag TAG              provide tag of the run default would be regression
                        name and if no regression is provided would be
                        run_<random float>_<timestamp>_
  -maxerr MAXERR        max number of errors for every test before simulation
                        breaks default = 3
  -vcs, -v              use VCS as compiler if not used iverilog would be used
  -corner CORNER [CORNER ...], -c CORNER [CORNER ...]
                        Corner type in case of GL_SDF run has to be provided
  -zip_passed           zip the waves and logs of passed tests. by default if
                        the run has more than 7 tests pass tests results would
                        be zipped automatically
  -emailto EMAILTO [EMAILTO ...], -mail EMAILTO [EMAILTO ...]
                        mails to send results to when results finish
  -seed SEED            run with specific seed
  -no_wave              disable dumping waves
  -sdf_setup            targeting setup violations by taking the SDF maximum
                        values
  -clk CLK              define the clock period in ns default defined at
                        design_info.yaml
  -lint                 generate lint log VCS must be used
  -macros MACROS [MACROS ...]
                        Add additional verilog macros for the design
  -sim_path SIM_PATH    directory where simulation result directory "sim"
                        would be created if None it would be created under
                        cocotb folder
  -verbosity VERBOSITY  verbosity of the console output it can have one of 3
                        value debug, normal or quiet the default value is
                        normal
  -check_commits        use to check if repos are up to date
  -no_docker            run iverilog without docker
  -compile              force recompilation
  -no_gen_defaults      dont run gen_gpio_defaults script
  --version             show program's version number and exit
```
<!-- end run a test include -->


## Example 

<!-- start run a test include3 -->
#### Run one test in RTL

```caravel_cocotb -t <testname> -tag run_one_test```

#### Run 2 tests in GL

```caravel_cocotb -t <test1> <test2>  -sim GL```

#### Run testlist

``` caravel_cocotb -tl <path to testlist> -tag all_rtl ```

<!-- end run a test include3 -->

# Creating a Testlist

<!-- start testlist include -->

Testlist is a file that contains a collection of test names to run together. 

The syntax is simple as ``YAML`` is used to write the testlist  

``` yaml

   # Testlist Can has only 2 elements Tests or includes 

   # Test element has list of dictionaries of tests to include 
   Tests: 
      - {name: <test1>, sim: RTL} 
      - {name: <test1>, sim: GL} 
      - {name: <test2>, sim: RTL} 

   # include has paths  for other testlist to include in this test list 
   # paths are relative to the location of this yaml file
   includes: 
      - <test4>/<testlist>.yaml
      - <testlist>.yaml
      - ../<test5>/<testlist>.yaml
```
<!-- end testlist include -->

# Results 
<!-- start result include -->

New directory named ``sim`` would be created under ``<repo root>/cocotb/`` or to the path passed to ``-sim_path`` and it will have all the results. 


```bash 

| sim #  directory get generate when run a test
│ ├── <tag> # tag of the run  
│ │   ├── compilation # directory contain all logs and build files related to the RTL compilation
│ │   │   └── compilation.log  # log file has all the commands used to run iverilog and any compilation error or warning
│ │   ├── <sim type>-<test name> # test result directory contain all logs and wave related to the test
│ │   │   └── firmware.hex  # hex file used in running this test
│ │   │   └── <test name>.log  # log file generated from cocotb 
│ │   │   └── firmware.log     # log file has all the commands used to compile the C code and any compilation error or warning
│ │   │   └── waves.vcd  # waves can be opened by gtkwave
│ │   │   └── rerun.py         # script to rerun the test
│ │   └── command.log    # command use for this run 
│ │   └── repos_info.log # contain information about the repos used to run these tests 
│ │   └── configs.yaml   # contain information about the repos used to run these tests 
│ │   └── runs.log       # contains status of the run fails and passes tests 
│ ├── hex_files # directory contain all the generated hex files for the runs   
│ 
│ 
``` 
<!-- end result include -->

# Update design_info.yaml 
<!-- start Update design_info include -->

> **Note**: This step is required only if make setup isn't used after cloning <caravel_user_project> 

> After any change `make setup-cocotb` can be used.

``design_info.yaml`` are used to reference all the needed repos and paths needed to run the tests:

fill  it like the following
```yaml
  #yaml file contain general design information that would mostly need to be updated in the first run only 
  #eg CARAVEL_ROOT: "/usr/Desktop/caravel_project/caravel/" 
  #like repo https://github.com/efabless/caravel
  CARAVEL_ROOT: "/usr/caravel_project/caravel/"

  #eg MCW_ROOT: "/usr/Desktop/caravel_project/caravel_mgmt_soc_litex/" 
  #like repo https://github.com/efabless/caravel_mgmt_soc_litex 
  # MCW_ROOT: "/home/rady/caravel/swift/swift2"
  MCW_ROOT: "/usr/caravel_project/caravel_mgmt_soc_litex/"

  #eg USER_PROJECT_ROOT: "/usr/Desktop/caravel_project/caravel_user_project/" 
  #like repo https://github.com/efabless/caravel_user_project
  USER_PROJECT_ROOT: "/usr/caravel_project/"

  #eg PDK_ROOT: "/usr/Desktop/caravel_project/pdk/" 
  #exported by volare
  PDK_ROOT: "/usr/pdk"

  #eg PDK: "sky130A"
  PDK: sky130A
  #PDK: gf180mcuC

  #clock in ns
  clk: 25  

  # true when caravan are simulated instead of Caravel
  caravan: false

  # optional email address to send the results to 
  emailto: [None]
```

<!-- end Update design_info include -->

# HDL include files format 
<!-- start Update include files format include -->
Include files from ``<caravel_user_project>/verilog/include`` like  ``includes.rtl.caravel_user_project``, ``includes.gl.caravel_user_project`` and ``includes.sdf.caravel_user_project`` are used to reference all the needed repos and paths needed to run the tests:

The legacy format to reference files is:
- support verilog file include
   ```bash
   -v $(USER_PROJECT_VERILOG)/rtl/user_project_wrapper.v
   ```

Coctb flow supports this format in addition to other formats:
- support systemVerilg file include
   ```bash
   -sv  $(USER_PROJECT_VERILOG)/rtl/counter.sv
   ```
- support wild card use
   ```bash
   -sv $(USER_PROJECT_VERILOG)/rtl/peripherals/*.sv
   ```
- support add search path for `.vh` and `.svh` files
   ```bash
   -I $(USER_PROJECT_VERILOG)/rtl/peripherals
   ```

<!-- end Update include files format include -->

# Unexisted python modules 
<!-- start unexisted python modules include -->
If the testbench use python modules that are not installed in the docker image, there are 2 options: 

1. use `-no_docker` option to run without docker if you have all the required tools installed.
2. Add requirments file to `<caravel_user_project>/verilog/dv/cocotb/requirements.txt` 
   ```txt
   rich==12.0.1
   ```
<!-- end unexisted python modules include -->


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "caravel-cocotb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Efabless Corporation and Contributors",
    "author_email": "mostafa.rady@efabless.com",
    "download_url": "https://files.pythonhosted.org/packages/b4/4c/d86f369888f822708a9745f13cf5ef9cbf3fdc4779e8de21706e0a5fc46f/caravel_cocotb-1.5.0.tar.gz",
    "platform": null,
    "description": "# Overview\n<!-- start read me file -->\nThis project aims to provide a user friendly environment for adding and running cocotb tests for Caravel user projects.\n\n\n# Prerequisites\n\n<!-- start configure the repo include0 -->\n\n* Docker: [Linux](https://hub.docker.com/search?q=&type=edition&offering=community&operating_system=linux&utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) ||  [Windows](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) || [Mac with Intel Chip](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) || [Mac with M1 Chip](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=header) \n* Python 3.6+ with PIP\n* ```docker pull efabless/dv:cocotb```\n* Clone of Caravel \n* Clone of Caravel management repo\n* Clone of PDK from [volare](https://github.com/efabless/volare)\n* Clone of Caravel user project \n<!-- end configure the repo include0 -->\n\n\n# caravel_cocotb\n\n## How to install caravel_cocotb\n\n```bash\n pip install caravel-cocotb\n```\n\nor to install from repo\n```bash\n   git clone git@github.com:efabless/caravel-sim-infrastructure.git\n   git checkout <release>\n   cd caravel-sim-infrastructure/cocotb\n   pip install .\n   cd ../..\n```\n\n## caravel_cocotb usage\n \ncaravel_cocotb provides a flow and APIs to run simulation on user_project after integerated with caravel. This is so helpful in detecting any bug in the connection between the user project and Caravel IOs, wishbone interface or logic analyzers. Also since it's easy to add and run tests with this flow it can be used to test the whole user project.\n<!-- middle read me file -->\n\n# Creating a Test\n\n<!-- start create a test include1 -->\n## Requirements\n \n   - install [cocotb_caravel](#how-to-install-caravel_cocotb) \n   - update netlist for RTL and GL files at ```<caravel_user_project>/verilog/includes/``` with the design netlist\n   - update the [design_info](#update-design_infoyaml) file at ```<caravel_user_project>/verilog/dv/cocotb/design_info.yaml```\n\n## Adding a test\n\nThis section explains the steps needed to create a test.\n\nA typical test for *Caravel* consists of 2 parts: ``Python/cocotb`` code and ``C`` code. \n\n* ``Python/cocotb`` code is for communicating with *Caravel* hardware interface inputs, outputs, clock, reset, and power ports/bins. ``cocotb`` here replaces the ``verilog`` code.\n\n* ``C`` code provides firmware code that would be loaded into the *Caravel* CPU.\n\nTests files has to located under ``<caravel_user_project>/verilog/dv/cocotb/`` \n\n```bash\n| dv\n| \u251c\u2500\u2500 cocotb\n| \u2502   \u251c\u2500\u2500 <new_test>\n| \u2502   \u2502   \u2514\u2500\u2500 <new_test.py>\n| \u2502   \u2502   \u2514\u2500\u2500 <new_test.c>\n| \u2502   \u2514\u2500\u2500 cocotb_tests.py\n| \u2502   \u2514\u2500\u2500 design_info.yaml\n| \n```\n> **Note**: The name of ``C`` file must match the name of ``cocotb`` test function\n\n### Python Template\n\nThe template for ``python`` test:\n\n```python\n\n   from caravel_cocotb.caravel_interfaces import test_configure\n   from caravel_cocotb.caravel_interfaces import report_test\n   from caravel_cocotb.caravel_interfaces import UART\n   from caravel_cocotb.caravel_interfaces import SPI\n   import cocotb\n\n   @cocotb.test() # decorator to mark the test function as cocotb test\n   @report_test # wrapper for configure test reporting files\n   async def <test_name>(dut):\n      caravelEnv = await test_configure(dut) #configure, start up and reset Caravel\n\n      ######################## add test sequence ###################### \n\n```\n<!-- end create a test include1 -->\n\nCommonly used APIs to monitor or drive the hardware can be found in [`python_api`](docs/build/html/python_api.html)\n\n<!-- start create a test include2 -->\n\n> ! **Warning:** New test python function should be imported into cocotb_tests.py \n\n```python\n  from <new_test>.<new_test> import <new_test>\n```\n### C Template\n\nThe template for Code test:\n\n```C++\n\n   #include <firmware_apis.h> // include required APIs \n   void main(){\n      //////////////////////add test here////////////////////// \n      return;\n   }\n```\n<!-- end create a test include2 -->\n\nCommonly used APIs for firmware can be found in [`C_api`](docs/build/html/C_api.html)\n\n\n<!-- start create a test include3 -->\n# Test Examples\n\nRefer to this [directory](https://github.com/efabless/caravel_user_project/tree/main/verilog/dv/cocotb) for tests example generated for 16-bit counter\n<!-- end create a test include3 -->\n\n\n# Creating a Testlist\n\nRefer to [creating a testlist](docs/build/html/_sources/usage.rst.txt#creating-a-testlist) for where and how to create a test \n\n\n# run a test  \n\n<!-- start run a test include -->\nTests can run individually or as a test group using ``testlist``. Tests can also run in RTL, GL or SDF sims with 9 different corners.\n\nTo run use caravel_cocotb in the location that has the design_info.yaml file or pass the path to the design_info.yaml file as a command -design_info: \n\n\n\n```bash \nusage: caravel_cocotb [-h] [-test TEST [TEST ...]] [-design_info DESIGN_INFO]\n                      [-sim SIM [SIM ...]] [-testlist TESTLIST [TESTLIST ...]]\n                      [-tag TAG] [-maxerr MAXERR] [-vcs]\n                      [-corner CORNER [CORNER ...]] [-zip_passed]\n                      [-emailto EMAILTO [EMAILTO ...]] [-seed SEED] [-no_wave]\n                      [-sdf_setup] [-clk CLK] [-lint]\n                      [-macros MACROS [MACROS ...]] [-sim_path SIM_PATH]\n                      [-verbosity VERBOSITY] [-check_commits]\n                      [-no_docker] [-compile]\n\nRun cocotb tests\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -test TEST [TEST ...], -t TEST [TEST ...]\n                        name of test or tests.if no --sim provided RTL will be\n                        run <takes list as input>\n  -design_info DESIGN_INFO, -di DESIGN_INFO\n                        path to design_info.yaml file\n  -sim SIM [SIM ...]    Simulation type RTL,GL & GL_SDF provided only when run\n                        -test<takes list as input>\n  -testlist TESTLIST [TESTLIST ...], -tl TESTLIST [TESTLIST ...]\n                        path of testlist to be run\n  -tag TAG              provide tag of the run default would be regression\n                        name and if no regression is provided would be\n                        run_<random float>_<timestamp>_\n  -maxerr MAXERR        max number of errors for every test before simulation\n                        breaks default = 3\n  -vcs, -v              use VCS as compiler if not used iverilog would be used\n  -corner CORNER [CORNER ...], -c CORNER [CORNER ...]\n                        Corner type in case of GL_SDF run has to be provided\n  -zip_passed           zip the waves and logs of passed tests. by default if\n                        the run has more than 7 tests pass tests results would\n                        be zipped automatically\n  -emailto EMAILTO [EMAILTO ...], -mail EMAILTO [EMAILTO ...]\n                        mails to send results to when results finish\n  -seed SEED            run with specific seed\n  -no_wave              disable dumping waves\n  -sdf_setup            targeting setup violations by taking the SDF maximum\n                        values\n  -clk CLK              define the clock period in ns default defined at\n                        design_info.yaml\n  -lint                 generate lint log VCS must be used\n  -macros MACROS [MACROS ...]\n                        Add additional verilog macros for the design\n  -sim_path SIM_PATH    directory where simulation result directory \"sim\"\n                        would be created if None it would be created under\n                        cocotb folder\n  -verbosity VERBOSITY  verbosity of the console output it can have one of 3\n                        value debug, normal or quiet the default value is\n                        normal\n  -check_commits        use to check if repos are up to date\n  -no_docker            run iverilog without docker\n  -compile              force recompilation\n  -no_gen_defaults      dont run gen_gpio_defaults script\n  --version             show program's version number and exit\n```\n<!-- end run a test include -->\n\n\n## Example \n\n<!-- start run a test include3 -->\n#### Run one test in RTL\n\n```caravel_cocotb -t <testname> -tag run_one_test```\n\n#### Run 2 tests in GL\n\n```caravel_cocotb -t <test1> <test2>  -sim GL```\n\n#### Run testlist\n\n``` caravel_cocotb -tl <path to testlist> -tag all_rtl ```\n\n<!-- end run a test include3 -->\n\n# Creating a Testlist\n\n<!-- start testlist include -->\n\nTestlist is a file that contains a collection of test names to run together. \n\nThe syntax is simple as ``YAML`` is used to write the testlist  \n\n``` yaml\n\n   # Testlist Can has only 2 elements Tests or includes \n\n   # Test element has list of dictionaries of tests to include \n   Tests: \n      - {name: <test1>, sim: RTL} \n      - {name: <test1>, sim: GL} \n      - {name: <test2>, sim: RTL} \n\n   # include has paths  for other testlist to include in this test list \n   # paths are relative to the location of this yaml file\n   includes: \n      - <test4>/<testlist>.yaml\n      - <testlist>.yaml\n      - ../<test5>/<testlist>.yaml\n```\n<!-- end testlist include -->\n\n# Results \n<!-- start result include -->\n\nNew directory named ``sim`` would be created under ``<repo root>/cocotb/`` or to the path passed to ``-sim_path`` and it will have all the results. \n\n\n```bash \n\n| sim #  directory get generate when run a test\n\u2502 \u251c\u2500\u2500 <tag> # tag of the run  \n\u2502 \u2502   \u251c\u2500\u2500 compilation # directory contain all logs and build files related to the RTL compilation\n\u2502 \u2502   \u2502   \u2514\u2500\u2500 compilation.log  # log file has all the commands used to run iverilog and any compilation error or warning\n\u2502 \u2502   \u251c\u2500\u2500 <sim type>-<test name> # test result directory contain all logs and wave related to the test\n\u2502 \u2502   \u2502   \u2514\u2500\u2500 firmware.hex  # hex file used in running this test\n\u2502 \u2502   \u2502   \u2514\u2500\u2500 <test name>.log  # log file generated from cocotb \n\u2502 \u2502   \u2502   \u2514\u2500\u2500 firmware.log     # log file has all the commands used to compile the C code and any compilation error or warning\n\u2502 \u2502   \u2502   \u2514\u2500\u2500 waves.vcd  # waves can be opened by gtkwave\n\u2502 \u2502   \u2502   \u2514\u2500\u2500 rerun.py         # script to rerun the test\n\u2502 \u2502   \u2514\u2500\u2500 command.log    # command use for this run \n\u2502 \u2502   \u2514\u2500\u2500 repos_info.log # contain information about the repos used to run these tests \n\u2502 \u2502   \u2514\u2500\u2500 configs.yaml   # contain information about the repos used to run these tests \n\u2502 \u2502   \u2514\u2500\u2500 runs.log       # contains status of the run fails and passes tests \n\u2502 \u251c\u2500\u2500 hex_files # directory contain all the generated hex files for the runs   \n\u2502 \n\u2502 \n``` \n<!-- end result include -->\n\n# Update design_info.yaml \n<!-- start Update design_info include -->\n\n> **Note**: This step is required only if make setup isn't used after cloning <caravel_user_project> \n\n> After any change `make setup-cocotb` can be used.\n\n``design_info.yaml`` are used to reference all the needed repos and paths needed to run the tests:\n\nfill  it like the following\n```yaml\n  #yaml file contain general design information that would mostly need to be updated in the first run only \n  #eg CARAVEL_ROOT: \"/usr/Desktop/caravel_project/caravel/\" \n  #like repo https://github.com/efabless/caravel\n  CARAVEL_ROOT: \"/usr/caravel_project/caravel/\"\n\n  #eg MCW_ROOT: \"/usr/Desktop/caravel_project/caravel_mgmt_soc_litex/\" \n  #like repo https://github.com/efabless/caravel_mgmt_soc_litex \n  # MCW_ROOT: \"/home/rady/caravel/swift/swift2\"\n  MCW_ROOT: \"/usr/caravel_project/caravel_mgmt_soc_litex/\"\n\n  #eg USER_PROJECT_ROOT: \"/usr/Desktop/caravel_project/caravel_user_project/\" \n  #like repo https://github.com/efabless/caravel_user_project\n  USER_PROJECT_ROOT: \"/usr/caravel_project/\"\n\n  #eg PDK_ROOT: \"/usr/Desktop/caravel_project/pdk/\" \n  #exported by volare\n  PDK_ROOT: \"/usr/pdk\"\n\n  #eg PDK: \"sky130A\"\n  PDK: sky130A\n  #PDK: gf180mcuC\n\n  #clock in ns\n  clk: 25  \n\n  # true when caravan are simulated instead of Caravel\n  caravan: false\n\n  # optional email address to send the results to \n  emailto: [None]\n```\n\n<!-- end Update design_info include -->\n\n# HDL include files format \n<!-- start Update include files format include -->\nInclude files from ``<caravel_user_project>/verilog/include`` like  ``includes.rtl.caravel_user_project``, ``includes.gl.caravel_user_project`` and ``includes.sdf.caravel_user_project`` are used to reference all the needed repos and paths needed to run the tests:\n\nThe legacy format to reference files is:\n- support verilog file include\n   ```bash\n   -v $(USER_PROJECT_VERILOG)/rtl/user_project_wrapper.v\n   ```\n\nCoctb flow supports this format in addition to other formats:\n- support systemVerilg file include\n   ```bash\n   -sv  $(USER_PROJECT_VERILOG)/rtl/counter.sv\n   ```\n- support wild card use\n   ```bash\n   -sv $(USER_PROJECT_VERILOG)/rtl/peripherals/*.sv\n   ```\n- support add search path for `.vh` and `.svh` files\n   ```bash\n   -I $(USER_PROJECT_VERILOG)/rtl/peripherals\n   ```\n\n<!-- end Update include files format include -->\n\n# Unexisted python modules \n<!-- start unexisted python modules include -->\nIf the testbench use python modules that are not installed in the docker image, there are 2 options: \n\n1. use `-no_docker` option to run without docker if you have all the required tools installed.\n2. Add requirments file to `<caravel_user_project>/verilog/dv/cocotb/requirements.txt` \n   ```txt\n   rich==12.0.1\n   ```\n<!-- end unexisted python modules include -->\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Efabless Caravel cocotb Verification Flow(s)",
    "version": "1.5.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "41894e9fff1e6d1263d9f3f6176abec48fb19642841ae2e756e14156c0c78253",
                "md5": "3e744d31853f979807cd101238f36694",
                "sha256": "5a67408abae25f899cfa145717e58fd510123b11e61a761b8197c44390263998"
            },
            "downloads": -1,
            "filename": "caravel_cocotb-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3e744d31853f979807cd101238f36694",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8.1",
            "size": 4491319,
            "upload_time": "2025-02-16T11:37:34",
            "upload_time_iso_8601": "2025-02-16T11:37:34.525284Z",
            "url": "https://files.pythonhosted.org/packages/41/89/4e9fff1e6d1263d9f3f6176abec48fb19642841ae2e756e14156c0c78253/caravel_cocotb-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b44cd86f369888f822708a9745f13cf5ef9cbf3fdc4779e8de21706e0a5fc46f",
                "md5": "09e471bdbd6f26a7c549ac218a73c292",
                "sha256": "44d618725efd4f3a212384490446ee9085cd7ef5c4ecde1e01820eff1f5f4aef"
            },
            "downloads": -1,
            "filename": "caravel_cocotb-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "09e471bdbd6f26a7c549ac218a73c292",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8.1",
            "size": 4338999,
            "upload_time": "2025-02-16T11:37:37",
            "upload_time_iso_8601": "2025-02-16T11:37:37.193457Z",
            "url": "https://files.pythonhosted.org/packages/b4/4c/d86f369888f822708a9745f13cf5ef9cbf3fdc4779e8de21706e0a5fc46f/caravel_cocotb-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-16 11:37:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "caravel-cocotb"
}
        
Elapsed time: 0.41214s