Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x393
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
x393
Commits
b13c86d4
Commit
b13c86d4
authored
Aug 28, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on Python code for testing hardware
parent
53d28e32
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
test_mcntrl.py
py393/test_mcntrl.py
+4
-0
x393_gpio.py
py393/x393_gpio.py
+1
-1
x393_testbench02.tf
x393_testbench02.tf
+7
-0
No files found.
py393/test_mcntrl.py
View file @
b13c86d4
...
@@ -61,6 +61,8 @@ import x393_sens_cmprs
...
@@ -61,6 +61,8 @@ import x393_sens_cmprs
import
x393_camsync
import
x393_camsync
import
x393_gpio
import
x393_gpio
import
x393_cmprs_afi
import
x393_cmprs_afi
import
x393_cmprs
import
vrlg
import
vrlg
__all__
=
[]
__all__
=
[]
__version__
=
0.1
__version__
=
0.1
...
@@ -340,6 +342,7 @@ USAGE
...
@@ -340,6 +342,7 @@ USAGE
x393Camsync
=
x393_camsync
.
X393Camsync
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393Camsync
=
x393_camsync
.
X393Camsync
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393GPIO
=
x393_gpio
.
X393GPIO
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393GPIO
=
x393_gpio
.
X393GPIO
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393CmprsAfi
=
x393_cmprs_afi
.
X393CmprsAfi
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393CmprsAfi
=
x393_cmprs_afi
.
X393CmprsAfi
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393Cmprs
=
x393_cmprs
.
X393Cmprs
(
verbose
,
args
.
simulated
,
args
.
localparams
)
'''
'''
print ("----------------------")
print ("----------------------")
print("x393_mem.__dict__="+str(x393_mem.__dict__))
print("x393_mem.__dict__="+str(x393_mem.__dict__))
...
@@ -368,6 +371,7 @@ USAGE
...
@@ -368,6 +371,7 @@ USAGE
extractTasks
(
x393_camsync
.
X393Camsync
,
x393Camsync
)
extractTasks
(
x393_camsync
.
X393Camsync
,
x393Camsync
)
extractTasks
(
x393_gpio
.
X393GPIO
,
x393GPIO
)
extractTasks
(
x393_gpio
.
X393GPIO
,
x393GPIO
)
extractTasks
(
x393_cmprs_afi
.
X393CmprsAfi
,
x393CmprsAfi
)
extractTasks
(
x393_cmprs_afi
.
X393CmprsAfi
,
x393CmprsAfi
)
extractTasks
(
x393_cmprs
.
X393Cmprs
,
x393Cmprs
)
for
cmdLine
in
commands
:
for
cmdLine
in
commands
:
print
(
'Running task: '
+
str
(
cmdLine
))
print
(
'Running task: '
+
str
(
cmdLine
))
...
...
py393/x393_gpio.py
View file @
b13c86d4
...
@@ -3,7 +3,7 @@ from __future__ import print_function
...
@@ -3,7 +3,7 @@ from __future__ import print_function
'''
'''
# Copyright (C) 2015, Elphel.inc.
# Copyright (C) 2015, Elphel.inc.
# Class to control 103
5
3 GPIO port
# Class to control 103
9
3 GPIO port
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# the Free Software Foundation, either version 3 of the License, or
...
...
x393_testbench02.tf
View file @
b13c86d4
...
@@ -3578,6 +3578,7 @@ function [31 : 0] func_sensor_gamma_ctl;
...
@@ -3578,6 +3578,7 @@ function [31 : 0] func_sensor_gamma_ctl;
endfunction
endfunction
// ****************** compressor related tasks and functions *************************
// ****************** compressor related tasks and functions *************************
// x393_cmprs.py
task compressor_control;
task compressor_control;
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [31:0] run_mode; // [2:0] < 0: nop, 0 - reset, 2 - run single from memory, 3 - run repetitive
input [31:0] run_mode; // [2:0] < 0: nop, 0 - reset, 2 - run single from memory, 3 - run repetitive
...
@@ -3617,6 +3618,7 @@ task compressor_control;
...
@@ -3617,6 +3618,7 @@ task compressor_control;
end
end
endtask
endtask
// x393_cmprs.py
task compressor_format;
task compressor_format;
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [31:0] num_macro_cols_m1; // number of macroblock colums minus 1
input [31:0] num_macro_cols_m1; // number of macroblock colums minus 1
...
@@ -3635,6 +3637,7 @@ task compressor_format;
...
@@ -3635,6 +3637,7 @@ task compressor_format;
end
end
endtask
endtask
// x393_cmprs.py
task compressor_color_saturation;
task compressor_color_saturation;
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [31:0] colorsat_blue; //color saturation for blue (10 bits) //'h90 for 100%
input [31:0] colorsat_blue; //color saturation for blue (10 bits) //'h90 for 100%
...
@@ -3651,6 +3654,7 @@ task compressor_color_saturation;
...
@@ -3651,6 +3654,7 @@ task compressor_color_saturation;
end
end
endtask
endtask
// x393_cmprs.py
task compressor_coring;
task compressor_coring;
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [ 1:0] num_sensor; // sensor channel number (0..3)
input [31:0] coring; // coring value
input [31:0] coring; // coring value
...
@@ -3665,6 +3669,7 @@ task compressor_coring;
...
@@ -3665,6 +3669,7 @@ task compressor_coring;
end
end
endtask
endtask
// x393_cmprs.py
function [31 : 0] func_compressor_control;
function [31 : 0] func_compressor_control;
// argument <0 - NOP
// argument <0 - NOP
input [31:0] run_mode; // [2:0] < 0: nop, 0 - reset, 2 - run single from memory, 3 - run repetitive
input [31:0] run_mode; // [2:0] < 0: nop, 0 - reset, 2 - run single from memory, 3 - run repetitive
...
@@ -3702,6 +3707,7 @@ function [31 : 0] func_compressor_control;
...
@@ -3702,6 +3707,7 @@ function [31 : 0] func_compressor_control;
end
end
endfunction
endfunction
// x393_cmprs.py
function [31 : 0] func_compressor_format;
function [31 : 0] func_compressor_format;
input [31:0] num_macro_cols_m1; // number of macroblock colums minus 1
input [31:0] num_macro_cols_m1; // number of macroblock colums minus 1
input [31:0] num_macro_rows_m1; // number of macroblock rows minus 1
input [31:0] num_macro_rows_m1; // number of macroblock rows minus 1
...
@@ -3716,6 +3722,7 @@ function [31 : 0] func_compressor_format;
...
@@ -3716,6 +3722,7 @@ function [31 : 0] func_compressor_format;
end
end
endfunction
endfunction
// x393_cmprs.py
function [31 : 0] func_compressor_color_saturation;
function [31 : 0] func_compressor_color_saturation;
input [31:0] colorsat_blue; //color saturation for blue (10 bits) //'h90 for 100%
input [31:0] colorsat_blue; //color saturation for blue (10 bits) //'h90 for 100%
input [31:0] colorsat_red; //color saturation for red (10 bits) // 'b6 for 100%
input [31:0] colorsat_red; //color saturation for red (10 bits) // 'b6 for 100%
...
...
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