Commit bf0503b7 authored by Andrey Filippov's avatar Andrey Filippov

improved Python test commands, disabled debug ring

parent cbd5dc78
...@@ -62,42 +62,42 @@ ...@@ -62,42 +62,42 @@
<link> <link>
<name>vivado_logs/VivadoBitstream.log</name> <name>vivado_logs/VivadoBitstream.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoBitstream-20150923173658295.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoBitstream-20150923220435209.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoOpt.log</name> <name>vivado_logs/VivadoOpt.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoOpt-20150923173658295.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoOpt-20150923220435209.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoOptPhys.log</name> <name>vivado_logs/VivadoOptPhys.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoOptPhys-20150923173658295.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoOptPhys-20150923220435209.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoOptPower.log</name> <name>vivado_logs/VivadoOptPower.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoOptPower-20150923173658295.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoOptPower-20150923220435209.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoPlace.log</name> <name>vivado_logs/VivadoPlace.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoPlace-20150923173658295.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoPlace-20150923220435209.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoRoute.log</name> <name>vivado_logs/VivadoRoute.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoRoute-20150923173658295.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoRoute-20150923220435209.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoSynthesis.log</name> <name>vivado_logs/VivadoSynthesis.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoSynthesis-20150923170916067.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoSynthesis-20150923220008330.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoTimimgSummaryReportImplemented.log</name> <name>vivado_logs/VivadoTimimgSummaryReportImplemented.log</name>
<type>1</type> <type>1</type>
<location>/home/andrey/git/x393/vivado_logs/VivadoTimimgSummaryReportImplemented-20150923173658295.log</location> <location>/home/andrey/git/x393/vivado_logs/VivadoTimimgSummaryReportImplemented-20150923220435209.log</location>
</link> </link>
<link> <link>
<name>vivado_logs/VivadoTimimgSummaryReportSynthesis.log</name> <name>vivado_logs/VivadoTimimgSummaryReportSynthesis.log</name>
......
parameter FPGA_VERSION = 32'h03930038; parameter FPGA_VERSION = 32'h03930039;
\ No newline at end of file \ No newline at end of file
/home/andrey/git/x393/includes/x393_cur_params_target_00.vh
\ No newline at end of file
/*******************************************************************************
* 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
This diff is collapsed.
...@@ -833,12 +833,8 @@ measure_all "*DI" ...@@ -833,12 +833,8 @@ measure_all "*DI"
# setup_all_sensors , 3-rd argument - bitmask of sesnors to initialize # setup_all_sensors , 3-rd argument - bitmask of sesnors to initialize
setup_all_sensors True None 0xf setup_all_sensors True None 0xf
#reset all compressors #reset all compressors - NOT NEEDED
#compressor_control 0 0 #compressor_control all 0
#compressor_control 1 0
#compressor_control 2 0
#compressor_control 3 0
compressor_control all 0
#next line to make compressor aways use the same input video frame buffer (default - 2 ping-pong frame buffers) #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 #axi_write_single_w 0x6c4 0
...@@ -849,66 +845,40 @@ set_sensor_io_ctl 2 None None None None None 0 0x4 ...@@ -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_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) # 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 compressor_control all None None None None None 3
#Gamma 0.57 #Gamma 0.57
program_gamma 0 0 0.57 0.04 program_gamma all 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
#colors - outdoor #colors - outdoor
write_sensor_i2c 0 1 0 0x9035000a write_sensor_i2c all 1 0 0x9035000a
write_sensor_i2c 0 1 0 0x902c000e write_sensor_i2c all 1 0 0x902c000e
write_sensor_i2c 0 1 0 0x902d000d write_sensor_i2c all 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
#colors indoor #colors indoor
write_sensor_i2c 0 1 0 0x90350009 write_sensor_i2c all 1 0 0x90350009
write_sensor_i2c 0 1 0 0x902c000f write_sensor_i2c all 1 0 0x902c000f
write_sensor_i2c 0 1 0 0x902d000a write_sensor_i2c all 1 0 0x902d000a
write_sensor_i2c 1 1 0 0x90350009
write_sensor_i2c 1 1 0 0x902c000f #exposure 0x100 lines (default was 0x797)
write_sensor_i2c 1 1 0 0x902d000a write_sensor_i2c all 1 0 0x90090100
write_sensor_i2c 2 1 0 0x90350009
write_sensor_i2c 2 1 0 0x902c000f #exposure 0x200 lines (default was 0x797)
write_sensor_i2c 2 1 0 0x902d000a write_sensor_i2c all 1 0 0x90090200
write_sensor_i2c 3 1 0 0x90350009
write_sensor_i2c 3 1 0 0x902c000f
write_sensor_i2c 3 1 0 0x902d000a
#exposure 0x400 lines (default was 0x797) #exposure 0x400 lines (default was 0x797)
write_sensor_i2c 0 1 0 0x90090400 write_sensor_i2c all 1 0 0x90090400
write_sensor_i2c 1 1 0 0x90090400
write_sensor_i2c 2 1 0 0x90090400
write_sensor_i2c 3 1 0 0x90090400
#exposure 0x500 lines (default was 0x797) #exposure 0x500 lines (default was 0x797)
write_sensor_i2c 0 1 0 0x90090500 write_sensor_i2c all 1 0 0x90090500
write_sensor_i2c 1 1 0 0x90090500
write_sensor_i2c 2 1 0 0x90090500 #exposure 0x797 (default)
write_sensor_i2c 3 1 0 0x90090500 write_sensor_i2c all 1 0 0x90090797
#Get rid of the corrupted last pixel column #Get rid of the corrupted last pixel column
#longer line (default 0xa1f) #longer line (default 0xa1f)
write_sensor_i2c 0 1 0 0x90040a23 write_sensor_i2c all 1 0 0x90040a23
write_sensor_i2c 1 1 0 0x90040a23
write_sensor_i2c 2 1 0 0x90040a23
write_sensor_i2c 3 1 0 0x90040a23
#increase scanline write (memory controller) width in 16-bursts (was 0xa2) #increase scanline write (memory controller) width in 16-bursts (was 0xa2)
axi_write_single_w 0x696 0x079800a3 axi_write_single_w 0x696 0x079800a3
...@@ -917,21 +887,10 @@ axi_write_single_w 0x6a6 0x079800a3 ...@@ -917,21 +887,10 @@ axi_write_single_w 0x6a6 0x079800a3
axi_write_single_w 0x6b6 0x079800a3 axi_write_single_w 0x6b6 0x079800a3
#run copmpressors once (#1 - stop gracefully, 0 - reset, 2 - single, 3 - repetitive with sync to sensors) #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 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 "img.jpeg" all
jpeg_write "/www/pages/img.jpeg" all
#changing quality (example 85%): #changing quality (example 85%):
set_qtables all 0 85 set_qtables all 0 85
......
...@@ -402,11 +402,21 @@ class X393Sensor(object): ...@@ -402,11 +402,21 @@ class X393Sensor(object):
data): data):
""" """
Write i2c command to the i2c command sequencer 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 rel_addr - True - relative frame address, False - absolute frame address
@param addr - frame address (0..15) @param addr - frame address (0..15)
@param data - Combine slave address/register address/ register data for the i2c command @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.SENSOR_GROUP_ADDR + num_sensor * vrlg.SENSOR_BASE_INC)
reg_addr += ((vrlg.SENSI2C_ABS_RADDR,vrlg.SENSI2C_REL_RADDR)[rel_addr] ) reg_addr += ((vrlg.SENSI2C_ABS_RADDR,vrlg.SENSI2C_REL_RADDR)[rel_addr] )
reg_addr += (addr & ~vrlg.SENSI2C_ADDR_MASK); reg_addr += (addr & ~vrlg.SENSI2C_ADDR_MASK);
...@@ -606,18 +616,32 @@ class X393Sensor(object): ...@@ -606,18 +616,32 @@ class X393Sensor(object):
black = 0.04, black = 0.04,
page = 0): page = 0):
""" """
Program gamma tables for specified sensor port and subchannel Program gamma tables for specified sensor port and subchannel
@param num_sensor - sensor port number (0..3) @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 num_sub_sensor - sub-sensor attached to the same port through multiplexer (0..3)
@param gamma - gamma value (1.0 - linear) @param gamma - gamma value (1.0 - linear)
@param black - black level, 1.0 corresponds to 256 for 8bit values @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 @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, self.program_curves(num_sensor = num_sensor,
sub_channel = sub_channel, sub_channel = sub_channel,
curves_data = self.calc_gamma257(gamma = gamma, curves_data = curves_data,
black = black,
rshift = 6) * 4,
page = page) page = page)
def program_curves (self, def program_curves (self,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
`ifndef SYSTEM_DEFINES `ifndef SYSTEM_DEFINES
`define SYSTEM_DEFINES `define SYSTEM_DEFINES
`define PRELOAD_BRAMS `define PRELOAD_BRAMS
`define DEBUG_RING 1 // `define DEBUG_RING 1
`define MEMBRIDGE_DEBUG_WRITE 1 `define MEMBRIDGE_DEBUG_WRITE 1
// Enviroment-dependent options // Enviroment-dependent options
`ifdef IVERILOG `ifdef IVERILOG
......
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