Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oc_jpegencode_vdt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
oc_jpegencode_vdt
Commits
b1869fd6
Commit
b1869fd6
authored
Jul 02, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added debug parameter for Cocotb simulation
parent
44b034bc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
3 deletions
+50
-3
.project
.eclipse_project_setup/.project
+17
-0
com.elphel.vdt.FPGA_project.prefs
...project_setup/.settings/com.elphel.vdt.FPGA_project.prefs
+8
-0
com.elphel.vdt.cocotb.prefs
.eclipse_project_setup/.settings/com.elphel.vdt.cocotb.prefs
+9
-0
com.elphel.vdt.iverilog.prefs
...pse_project_setup/.settings/com.elphel.vdt.iverilog.prefs
+4
-0
com.elphel.vdt.prefs
.eclipse_project_setup/.settings/com.elphel.vdt.prefs
+3
-0
test_jpeg_top.py
cocotb/test_jpeg_top.py
+9
-3
No files found.
.eclipse_project_setup/.project
0 → 100644
View file @
b1869fd6
<?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>
.eclipse_project_setup/.settings/com.elphel.vdt.FPGA_project.prefs
0 → 100644
View file @
b1869fd6
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
.eclipse_project_setup/.settings/com.elphel.vdt.cocotb.prefs
0 → 100644
View file @
b1869fd6
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
.eclipse_project_setup/.settings/com.elphel.vdt.iverilog.prefs
0 → 100644
View file @
b1869fd6
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
.eclipse_project_setup/.settings/com.elphel.vdt.prefs
0 → 100644
View file @
b1869fd6
com.elphel.store.context.=com.elphel.vdt.PROJECT_DESING_MENU<-@\#\#@->
com.elphel.vdt.PROJECT_DESING_MENU=MainDesignMenu
eclipse.preferences.version=1
cocotb/test_jpeg_top.py
View file @
b1869fd6
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment