Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 3.32 KB

0152-2023-10-04.md

File metadata and controls

52 lines (35 loc) · 3.32 KB

4 Oct 2023

Previous journal: Next journal:
0151-2023-10-03.md 0153-2023-10-06.md

SPI flash ROM next steps

Set up Python on Windows, to be used by cocotb

I've done this, and created Tip 2310A to describe the process.

Set up cocotb and iverilog on Windows

I originally referred to the official iverilog on Windows setup guide but then found this Fandom page which shows how to compile on Windows (linking to a page with a lot more detail about doing this with MSYS2) but in the end it was just easier to use pacman in MSYS2.

Just see my guide in 2310B for how to do this.

Creating the tests

NOTE: Consider this superseded compared to steps I've now got in 0156.

  1. I'll use cocotb for now.
  2. In the project dir, create test/ -- NO: TT convention is to place tests directly in src/
  3. In there, create the testbench, tb.v. Main points:
    • Define inputs and outputs that we want the tests to have control over, giving them meaningful names.
    • Have an initial block that specifies the $dumpfile (in this case tb.vcd).
    • Instantiate and wire up the design, calling it uut. In this case, it's the vga_spi_rom module.
  4. Create a .venv for cocotb and these tests.
  5. Create test.py and fill it in -- more to come.
  6. Create Makefile that uses cocotb -- more to come.
  7. Write README describing how to set up everything and run the tests.

Notes