mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
test framework
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
'''
|
||||
|
||||
Wokwi TinyTapeout truth-table based auto test sequence.
|
||||
|
||||
SPDX-FileCopyrightText: © 2023 Pat Deegan, https://psychogenic.com
|
||||
SPDX-License-Identifier: Apache2.0
|
||||
'''
|
||||
|
||||
import os
|
||||
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.io_in
|
||||
o_bus = parentDUT.io_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)
|
||||
|
||||
Reference in New Issue
Block a user