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
cedb78c5
Commit
cedb78c5
authored
Aug 28, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Python module to program AXI HP multiplexer for compressed image data
parent
f35b9514
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
253 additions
and
8 deletions
+253
-8
test_mcntrl.py
py393/test_mcntrl.py
+3
-0
x393_cmprs_afi.py
py393/x393_cmprs_afi.py
+235
-0
x393_testbench02.tf
x393_testbench02.tf
+15
-8
No files found.
py393/test_mcntrl.py
View file @
cedb78c5
...
...
@@ -60,6 +60,7 @@ import x393_mcntrl_membridge
import
x393_sens_cmprs
import
x393_camsync
import
x393_gpio
import
x393_cmprs_afi
import
vrlg
__all__
=
[]
__version__
=
0.1
...
...
@@ -338,6 +339,7 @@ USAGE
x393SensCmprs
=
x393_sens_cmprs
.
X393SensCmprs
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393Camsync
=
x393_camsync
.
X393Camsync
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393GPIO
=
x393_gpio
.
X393GPIO
(
verbose
,
args
.
simulated
,
args
.
localparams
)
x393CmprsAfi
=
x393_cmprs_afi
.
X393CmprsAfi
(
verbose
,
args
.
simulated
,
args
.
localparams
)
'''
print ("----------------------")
print("x393_mem.__dict__="+str(x393_mem.__dict__))
...
...
@@ -365,6 +367,7 @@ USAGE
extractTasks
(
x393_sens_cmprs
.
X393SensCmprs
,
x393SensCmprs
)
extractTasks
(
x393_camsync
.
X393Camsync
,
x393Camsync
)
extractTasks
(
x393_gpio
.
X393GPIO
,
x393GPIO
)
extractTasks
(
x393_cmprs_afi
.
X393CmprsAfi
,
x393CmprsAfi
)
for
cmdLine
in
commands
:
print
(
'Running task: '
+
str
(
cmdLine
))
...
...
py393/x393_cmprs_afi.py
0 → 100644
View file @
cedb78c5
This diff is collapsed.
Click to expand it.
x393_testbench02.tf
View file @
cedb78c5
...
...
@@ -2441,7 +2441,7 @@ task write_cmd_frame_sequencer;
0, // input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
num_sensor, // input [1:0] chn_afi;
3, // input [1:0] mode;
...
...
@@ -2551,6 +2551,7 @@ task camsync_setup;
end
endtask
// x393_cmprs_afi.py
task
afi_mux_setup
;
input
[
3
:
0
]
chn_mask
;
input
[
26
:
0
]
afi_cmprs0_sa
;
// input [26:0] sa; // start address in 32-byte chunks
...
...
@@ -2570,7 +2571,7 @@ task afi_mux_setup;
0, // input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
i, // num_sensor, // input [1:0] chn_afi;
3, // input [1:0] mode;
...
...
@@ -3728,11 +3729,12 @@ function [31 : 0] func_compressor_color_saturation;
endfunction
// axi_hp channels for the compressed image data
// x393_cmprs_afi.py
task afi_mux_program_status;
input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
input [1:0] chn_afi;
input [1:0] mode;
...
...
@@ -3747,11 +3749,12 @@ task afi_mux_program_status;
end
endtask
// x393_cmprs_afi.py
task afi_mux_reset;
input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
input [3:0] rst_chn;
reg [29:0] reg_addr;
...
...
@@ -3761,11 +3764,12 @@ task afi_mux_reset;
end
endtask
// x393_cmprs_afi.py
task afi_mux_enable_chn;
input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
input [1:0] en_chn; // channel number to enable/disable;
input en;
...
...
@@ -3779,11 +3783,12 @@ task afi_mux_enable_chn;
end
endtask
// x393_cmprs_afi.py
task afi_mux_enable;
input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
input en;
reg [29:0] reg_addr;
...
...
@@ -3796,11 +3801,12 @@ task afi_mux_enable;
end
endtask
// x393_cmprs_afi.py
task afi_mux_mode_chn;
input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
input [1:0] chn; // channel number to set mode for
input [1:0] mode;
...
...
@@ -3822,11 +3828,12 @@ each group of 4 bits per channel : bits [1:0] - select, bit[2] - sset (0 - nop),
end
endtask
// x393_cmprs_afi.py
task afi_mux_chn_start_length;
input [0:0] port_afi; // number of AFI port (0 - afi 1, 1 - afi2) // configuration controlled by the code. currently
// both AFI are used: ch0 - cmprs_afi_mux_1.0, ch1 - cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_2.0, ch3 - cmprs_afi_mux_2
// May be ch
e
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// May be ch
a
nged to ch0 - cmprs_afi_mux_1.0, ch1 -cmprs_afi_mux_1.1,
// ch2 - cmprs_afi_mux_1.2, ch3 - cmprs_afi_mux_1.3
input [ 1:0] chn; // channel number to set mode for
input [26:0] sa; // start address in 32-byte chunks
...
...
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