Commit b13c86d4 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

working on Python code for testing hardware

parent 53d28e32
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -61,6 +61,8 @@ import x393_sens_cmprs
import x393_camsync
import x393_gpio
import x393_cmprs_afi
import x393_cmprs

import vrlg
__all__ = []
__version__ = 0.1
@@ -340,6 +342,7 @@ USAGE
    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)
    x393Cmprs=       x393_cmprs.X393Cmprs(verbose,args.simulated,args.localparams)
    '''
    print ("----------------------")
    print("x393_mem.__dict__="+str(x393_mem.__dict__))
@@ -368,6 +371,7 @@ USAGE
    extractTasks(x393_camsync.X393Camsync,                     x393Camsync)
    extractTasks(x393_gpio.X393GPIO,                           x393GPIO)
    extractTasks(x393_cmprs_afi.X393CmprsAfi,                  x393CmprsAfi)
    extractTasks(x393_cmprs.X393Cmprs,                         x393Cmprs)

    for cmdLine in commands:
        print ('Running task: '+str(cmdLine))
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ from __future__ import print_function

'''
# Copyright (C) 2015, Elphel.inc.
# Class to control 10353 GPIO port  
# Class to control 10393 GPIO port  
# 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
# the Free Software Foundation, either version 3 of the License, or
+7 −0
Original line number Diff line number Diff line
@@ -3578,6 +3578,7 @@ function [31 : 0] func_sensor_gamma_ctl;
endfunction

// ****************** compressor related tasks and functions *************************
// x393_cmprs.py
task compressor_control;
    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
@@ -3617,6 +3618,7 @@ task compressor_control;
    end
endtask

// x393_cmprs.py
task compressor_format;
    input [ 1:0] num_sensor; // sensor channel number (0..3)
    input [31:0] num_macro_cols_m1; // number of macroblock colums minus 1
@@ -3635,6 +3637,7 @@ task compressor_format;
    end
endtask

// x393_cmprs.py
task compressor_color_saturation;
    input [ 1:0] num_sensor; // sensor channel number (0..3)
    input [31:0] colorsat_blue; //color saturation for blue (10 bits) //'h90 for 100%
@@ -3651,6 +3654,7 @@ task compressor_color_saturation;
    end
endtask

// x393_cmprs.py
task compressor_coring;
    input [ 1:0] num_sensor; // sensor channel number (0..3)
    input [31:0] coring;     // coring value
@@ -3665,6 +3669,7 @@ task compressor_coring;
    end
endtask

// x393_cmprs.py
function [31 : 0] func_compressor_control;
    // argument <0 - NOP 
    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;
    end
endfunction

// x393_cmprs.py
function [31 : 0] func_compressor_format;
    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
@@ -3716,6 +3722,7 @@ function [31 : 0] func_compressor_format;
    end
endfunction

// x393_cmprs.py
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_red; //color saturation for red (10 bits)   // 'b6 for 100%