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
bf0503b7
Commit
bf0503b7
authored
Sep 29, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved Python test commands, disabled debug ring
parent
cbd5dc78
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64439 additions
and
63410 deletions
+64439
-63410
.project
.project
+8
-8
fpga_version.vh
fpga_version.vh
+1
-1
x393_cur_params_target.vh
includes/x393_cur_params_target.vh
+28
-1
x393_cur_params_target.vh
includes/x393_cur_params_target.vh
+28
-1
x393_mcntrl.pickle
py393/dbg/x393_mcntrl.pickle
+64321
-63329
x393_jpeg.py
py393/x393_jpeg.py
+22
-63
x393_sensor.py
py393/x393_sensor.py
+30
-6
system_defines.vh
system_defines.vh
+1
-1
No files found.
.project
View file @
bf0503b7
...
...
@@ -62,42 +62,42 @@
<link>
<name>
vivado_logs/VivadoBitstream.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoBitstream-20150923
173658295
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoBitstream-20150923
220435209
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoOpt.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoOpt-20150923
173658295
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoOpt-20150923
220435209
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoOptPhys.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoOptPhys-20150923
173658295
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoOptPhys-20150923
220435209
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoOptPower.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoOptPower-20150923
173658295
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoOptPower-20150923
220435209
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoPlace.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoPlace-20150923
173658295
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoPlace-20150923
220435209
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoRoute.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoRoute-20150923
173658295
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoRoute-20150923
220435209
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoSynthesis.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoSynthesis-20150923
170916067
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoSynthesis-20150923
220008330
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoTimimgSummaryReportImplemented.log
</name>
<type>
1
</type>
<location>
/home/andrey/git/x393/vivado_logs/VivadoTimimgSummaryReportImplemented-20150923
173658295
.log
</location>
<location>
/home/andrey/git/x393/vivado_logs/VivadoTimimgSummaryReportImplemented-20150923
220435209
.log
</location>
</link>
<link>
<name>
vivado_logs/VivadoTimimgSummaryReportSynthesis.log
</name>
...
...
fpga_version.vh
View file @
bf0503b7
parameter FPGA_VERSION = 32'h03930038;
\ No newline at end of file
parameter FPGA_VERSION = 32'h03930039;
\ No newline at end of file
includes/x393_cur_params_target.vh
deleted
120000 → 0
View file @
cbd5dc78
/home/andrey/git/x393/includes/x393_cur_params_target_00.vh
\ No newline at end of file
includes/x393_cur_params_target.vh
0 → 100644
View file @
bf0503b7
/*******************************************************************************
* File: x393_cur_params_target.vh
* Date:2015-02-07
* Author: Andrey Filippov
* Description: Memory controller parameters that need adjustment during training
* Target ,pde
* Copyright (c) 2015 Elphel, Inc.
* x393_cur_params_target.vh is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* x393_cur_params_target.vh is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
localparam DLY_LANE0_ODELAY = 80'hd85c1014141814181218;
localparam DLY_LANE0_IDELAY = 72'h2c7a8380897c807b88;
localparam DLY_LANE1_ODELAY = 80'hd8581812181418181814;
localparam DLY_LANE1_IDELAY = 72'h108078807a887c8280;
localparam DLY_CMDA = 256'hd3d3d3d4dcd1d8cc494949494949494949d4d3ccd3d3dbd4ccd4d2d3d1d2d8cc;
localparam DLY_PHASE = 8'h33;
// localparam DFLT_WBUF_DELAY = 4'h9;
\ No newline at end of file
py393/dbg/x393_mcntrl.pickle
View file @
bf0503b7
This diff is collapsed.
Click to expand it.
py393/x393_jpeg.py
View file @
bf0503b7
...
...
@@ -833,12 +833,8 @@ measure_all "*DI"
# setup_all_sensors , 3-rd argument - bitmask of sesnors to initialize
setup_all_sensors True None 0xf
#reset all compressors
#compressor_control 0 0
#compressor_control 1 0
#compressor_control 2 0
#compressor_control 3 0
compressor_control all 0
#reset all compressors - NOT NEEDED
#compressor_control all 0
#next line to make compressor aways use the same input video frame buffer (default - 2 ping-pong frame buffers)
#axi_write_single_w 0x6c4 0
...
...
@@ -849,66 +845,40 @@ set_sensor_io_ctl 2 None None None None None 0 0x4
set_sensor_io_ctl 3 None None None None None 0 0xe
# Set Bayer = 3 (probably #1 and #3 need different hact/pxd delays to use the same compressor bayer for all channels)
#compressor_control 0 None None None None None 3
#compressor_control 1 None None None None None 3
#compressor_control 2 None None None None None 3
#compressor_control 3 None None None None None 3
compressor_control all None None None None None 3
#Gamma 0.57
program_gamma 0 0 0.57 0.04
program_gamma 1 0 0.57 0.04
program_gamma 2 0 0.57 0.04
program_gamma 3 0 0.57 0.04
program_gamma all 0 0.57 0.04
#colors - outdoor
write_sensor_i2c 0 1 0 0x9035000a
write_sensor_i2c 0 1 0 0x902c000e
write_sensor_i2c 0 1 0 0x902d000d
write_sensor_i2c 1 1 0 0x9035000a
write_sensor_i2c 1 1 0 0x902c000e
write_sensor_i2c 1 1 0 0x902d000d
write_sensor_i2c 2 1 0 0x9035000a
write_sensor_i2c 2 1 0 0x902c000e
write_sensor_i2c 2 1 0 0x902d000d
write_sensor_i2c 3 1 0 0x9035000a
write_sensor_i2c 3 1 0 0x902c000e
write_sensor_i2c 3 1 0 0x902d000d
write_sensor_i2c all 1 0 0x9035000a
write_sensor_i2c all 1 0 0x902c000e
write_sensor_i2c all 1 0 0x902d000d
#colors indoor
write_sensor_i2c 0 1 0 0x90350009
write_sensor_i2c 0 1 0 0x902c000f
write_sensor_i2c 0 1 0 0x902d000a
write_sensor_i2c 1 1 0 0x90350009
write_sensor_i2c 1 1 0 0x902c000f
write_sensor_i2c 1 1 0 0x902d000a
write_sensor_i2c 2 1 0 0x90350009
write_sensor_i2c 2 1 0 0x902c000f
write_sensor_i2c 2 1 0 0x902d000a
write_sensor_i2c 3 1 0 0x90350009
write_sensor_i2c 3 1 0 0x902c000f
write_sensor_i2c 3 1 0 0x902d000a
write_sensor_i2c all 1 0 0x90350009
write_sensor_i2c all 1 0 0x902c000f
write_sensor_i2c all 1 0 0x902d000a
#exposure 0x100 lines (default was 0x797)
write_sensor_i2c all 1 0 0x90090100
#exposure 0x200 lines (default was 0x797)
write_sensor_i2c all 1 0 0x90090200
#exposure 0x400 lines (default was 0x797)
write_sensor_i2c 0 1 0 0x90090400
write_sensor_i2c 1 1 0 0x90090400
write_sensor_i2c 2 1 0 0x90090400
write_sensor_i2c 3 1 0 0x90090400
write_sensor_i2c all 1 0 0x90090400
#exposure 0x500 lines (default was 0x797)
write_sensor_i2c 0 1 0 0x90090500
write_sensor_i2c 1 1 0 0x90090500
write_sensor_i2c 2 1 0 0x90090500
write_sensor_i2c 3 1 0 0x90090500
write_sensor_i2c all 1 0 0x90090500
#exposure 0x797 (default)
write_sensor_i2c all 1 0 0x90090797
#Get rid of the corrupted last pixel column
#longer line (default 0xa1f)
write_sensor_i2c 0 1 0 0x90040a23
write_sensor_i2c 1 1 0 0x90040a23
write_sensor_i2c 2 1 0 0x90040a23
write_sensor_i2c 3 1 0 0x90040a23
write_sensor_i2c all 1 0 0x90040a23
#increase scanline write (memory controller) width in 16-bursts (was 0xa2)
axi_write_single_w 0x696 0x079800a3
...
...
@@ -917,21 +887,10 @@ axi_write_single_w 0x6a6 0x079800a3
axi_write_single_w 0x6b6 0x079800a3
#run copmpressors once (#1 - stop gracefully, 0 - reset, 2 - single, 3 - repetitive with sync to sensors)
#compressor_control 0 2
#compressor_control 1 2
#compressor_control 2 2
#compressor_control 3 2
compressor_control all 2
#jpeg_write "/www/pages/img0.jpeg" 0
#jpeg_write "/www/pages/img1.jpeg" 1
#jpeg_write "/www/pages/img2.jpeg" 2
#jpeg_write "/www/pages/img3.jpeg" 3
jpeg_write "img.jpeg" all
jpeg_write "/www/pages/img.jpeg" all
#changing quality (example 85
%
):
set_qtables all 0 85
...
...
py393/x393_sensor.py
View file @
bf0503b7
...
...
@@ -402,11 +402,21 @@ class X393Sensor(object):
data
):
"""
Write i2c command to the i2c command sequencer
@param num_sensor - sensor port number (0..3)
@param num_sensor - sensor port number (0..3)
, or "all" - same to all sensors
@param rel_addr - True - relative frame address, False - absolute frame address
@param addr - frame address (0..15)
@param data - Combine slave address/register address/ register data for the i2c command
"""
try
:
if
(
num_sensor
==
all
)
or
(
num_sensor
[
0
]
.
upper
()
==
"A"
):
#all is a built-in function
for
num_sensor
in
range
(
4
):
self
.
write_sensor_i2c
(
num_sensor
=
num_sensor
,
rel_addr
=
rel_addr
,
addr
=
addr
,
data
=
data
)
return
except
:
pass
reg_addr
=
(
vrlg
.
SENSOR_GROUP_ADDR
+
num_sensor
*
vrlg
.
SENSOR_BASE_INC
)
reg_addr
+=
((
vrlg
.
SENSI2C_ABS_RADDR
,
vrlg
.
SENSI2C_REL_RADDR
)[
rel_addr
]
)
reg_addr
+=
(
addr
&
~
vrlg
.
SENSI2C_ADDR_MASK
);
...
...
@@ -606,18 +616,32 @@ class X393Sensor(object):
black
=
0.04
,
page
=
0
):
"""
Program gamma tables for specified sensor port and subchannel
@param num_sensor - sensor port number (0..3)
Program gamma tables for specified sensor port and subchannel
@param num_sensor - sensor port number (0..3)
, all - all sensors
@param num_sub_sensor - sub-sensor attached to the same port through multiplexer (0..3)
@param gamma - gamma value (1.0 - linear)
@param black - black level, 1.0 corresponds to 256 for 8bit values
@param page - gamma table page number (only used if SENS_GAMMA_BUFFER > 0
"""
curves_data
=
self
.
calc_gamma257
(
gamma
=
gamma
,
black
=
black
,
rshift
=
6
)
*
4
try
:
if
(
num_sensor
==
all
)
or
(
num_sensor
[
0
]
.
upper
()
==
"A"
):
#all is a built-in function
for
num_sensor
in
range
(
4
):
self
.
program_gamma
(
num_sensor
=
num_sensor
,
sub_channel
=
sub_channel
,
gamma
=
gamma
,
black
=
black
,
page
=
page
)
return
except
:
pass
self
.
program_curves
(
num_sensor
=
num_sensor
,
sub_channel
=
sub_channel
,
curves_data
=
self
.
calc_gamma257
(
gamma
=
gamma
,
black
=
black
,
rshift
=
6
)
*
4
,
curves_data
=
curves_data
,
page
=
page
)
def
program_curves
(
self
,
...
...
system_defines.vh
View file @
bf0503b7
...
...
@@ -2,7 +2,7 @@
`ifndef SYSTEM_DEFINES
`define SYSTEM_DEFINES
`define PRELOAD_BRAMS
`define DEBUG_RING 1
//
`define DEBUG_RING 1
`define MEMBRIDGE_DEBUG_WRITE 1
// Enviroment-dependent options
`ifdef IVERILOG
...
...
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