mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
28 lines
776 B
Python
28 lines
776 B
Python
"""
|
|
|
|
Wokwi TinyTapeout truth-table based auto test sequence.
|
|
|
|
SPDX-FileCopyrightText: © 2023 Pat Deegan, https://psychogenic.com
|
|
SPDX-License-Identifier: Apache2.0
|
|
"""
|
|
|
|
import cocotb
|
|
import testutils.truthtable as truthtable
|
|
|
|
|
|
@cocotb.test()
|
|
async def truthTableCompare(parentDUT):
|
|
"""
|
|
truthTableCompare -- loads markdown truth table and, if load succeeded, actually performs the tests.
|
|
"""
|
|
usermodule = parentDUT.dut
|
|
i_bus = parentDUT.ui_in
|
|
o_bus = parentDUT.uo_out
|
|
tt = truthtable.loadMarkdownTruthTable("truthtable.md", usermodule._log)
|
|
if tt is None:
|
|
usermodule._log.info("No truth table loaded, no table compare test to run")
|
|
return
|
|
|
|
usermodule._log.debug(str(tt))
|
|
await tt.testAll(i_bus, o_bus, usermodule._log)
|