Commit b1869fd6 authored by Andrey Filippov's avatar Andrey Filippov

added debug parameter for Cocotb simulation

parent 44b034bc
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>oc_jpegencode</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
FPGA_project_0_SimulationTopFile=code/jpeg_top_TB.v
FPGA_project_1_SimulationTopModule=UUT
FPGA_project_2_DUTTopFile=code/jpeg_top.v
FPGA_project_2_ImplementationTopFile=code/jpeg_top.v
FPGA_project_3_DUTTopModule=jpeg_top
FPGA_project_3_ImplementationTopModule=jpeg_top
com.elphel.store.context.FPGA_project=FPGA_project_0_SimulationTopFile<-@\#\#@->FPGA_project_1_SimulationTopModule<-@\#\#@->FPGA_project_2_ImplementationTopFile<-@\#\#@->FPGA_project_3_ImplementationTopModule<-@\#\#@->FPGA_project_2_DUTTopFile<-@\#\#@->FPGA_project_3_DUTTopModule<-@\#\#@->
eclipse.preferences.version=1
cocotb_105_CocotbCUSTOM_COMPILE_DEPS=IVERILOG_INCLUDE.v<-@\#\#@->
cocotb_110_COCOTB_ANSI_OUTPUT=true
cocotb_111_CocotbMODULE=test_jpeg_top<-@\#\#@->
cocotb_113_MakeCleanPatterns=*.pyc results.xml<-@\#\#@->*.jpg<-@\#\#@->
cocotb_116_GTKWaveSavFile=jpeg_top_01.sav
cocotb_117_CocotbIncludeDir=${verilog_project_loc}<-@\#\#@->
cocotb_120_GTKWaveSavFile=jpeg_top_01.gtkw
com.elphel.store.context.cocotb=cocotb_120_GTKWaveSavFile<-@\#\#@->cocotb_113_MakeCleanPatterns<-@\#\#@->cocotb_117_CocotbIncludeDir<-@\#\#@->cocotb_111_CocotbMODULE<-@\#\#@->cocotb_105_CocotbCUSTOM_COMPILE_DEPS<-@\#\#@->cocotb_110_COCOTB_ANSI_OUTPUT<-@\#\#@->cocotb_116_GTKWaveSavFile<-@\#\#@->
eclipse.preferences.version=1
com.elphel.store.context.iverilog=iverilog_120_GTKWaveSavFile<-@\#\#@->iverilog_123_GTKWaveSavFile<-@\#\#@->
eclipse.preferences.version=1
iverilog_120_GTKWaveSavFile=jpeg_top_01.gtkw
iverilog_123_GTKWaveSavFile=jpegencode_01.sav
com.elphel.store.context.=com.elphel.vdt.PROJECT_DESING_MENU<-@\#\#@->
com.elphel.vdt.PROJECT_DESING_MENU=MainDesignMenu
eclipse.preferences.version=1
......@@ -35,9 +35,13 @@ def compare(i1, i2):
@cocotb.coroutine
def process_image(dut, filename="", debug=False, threshold=0.22):
"""Run an image file through the jpeg encoder and compare the result"""
cocotb.fork(Clock(dut.clk, 100).start())
yield Timer(10)
# cocotb.fork(Clock(dut.clk, 100).start())
"""
driver = ImageDriver(dut)
monitor = JpegMonitor(dut)
if debug: # pragma: no cover
......@@ -58,8 +62,10 @@ def process_image(dut, filename="", debug=False, threshold=0.22):
if difference > threshold: # pragma: no cover
raise TestFailure("Resulting image file was too different (%f > %f)" %
(difference, threshold))
"""
"""
tf = TestFactory(process_image)
tf.add_option("filename", [os.path.join('test_images', f)
for f in os.listdir('test_images')])
tf.generate_tests()
"""
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment