Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x353
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
x353
Commits
49896216
Commit
49896216
authored
Aug 12, 2015
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifying for co-simulation with 393
parent
bbfa8af4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
638 additions
and
369 deletions
+638
-369
histogram353.v
sensor/histogram353.v
+332
-330
sensorpix353.v
sensor/sensorpix353.v
+6
-2
x353_1.sav
x353_1.sav
+283
-27
x353_1.tf
x353_1.tf
+17
-10
No files found.
sensor/histogram353.v
View file @
49896216
...
@@ -65,6 +65,7 @@ module histogram (pclk, // pixel clock (posedge, only some input si
...
@@ -65,6 +65,7 @@ module histogram (pclk, // pixel clock (posedge, only some input si
input
di_vld_a
;
input
di_vld_a
;
input
[
1
:
0
]
bayer_phase
;
input
[
1
:
0
]
bayer_phase
;
parameter
correct_bayer
=
2'b11
;
//AF2015: Correct Bayer to have histogram [2'b00] matcsh even row, even column data
wire
[
17
:
0
]
hist_do0
;
wire
[
17
:
0
]
hist_do0
;
...
@@ -210,7 +211,7 @@ module histogram (pclk, // pixel clock (posedge, only some input si
...
@@ -210,7 +211,7 @@ module histogram (pclk, // pixel clock (posedge, only some input si
if
(
hist_seq
[
3
])
hist_waddr_hold2
[
9
:
0
]
<=
hist_waddr_hold1
[
9
:
0
]
;
if
(
hist_seq
[
3
])
hist_waddr_hold2
[
9
:
0
]
<=
hist_waddr_hold1
[
9
:
0
]
;
// we need to clear all histogram at the begining of a frame (will not work if the window is too small)
// we need to clear all histogram at the begining of a frame (will not work if the window is too small)
if
(
init_hist
)
hist_waddr
[
9
:
0
]
<=
hist_init_cntr
[
9
:
0
]
;
// to clear histogram memory
if
(
init_hist
)
hist_waddr
[
9
:
0
]
<=
hist_init_cntr
[
9
:
0
]
;
// to clear histogram memory
else
if
(
hist_seq
[
0
])
hist_waddr
[
9
:
0
]
<=
{
bayer
[
1
:
0
]
^
bayer_phase_latched
[
1
:
0
]
,
di2x
[
7
:
0
]
};
else
if
(
hist_seq
[
0
])
hist_waddr
[
9
:
0
]
<=
{
bayer
[
1
:
0
]
^
bayer_phase_latched
[
1
:
0
]
^
correct_bayer
,
di2x
[
7
:
0
]
};
else
if
(
hist_seq
[
5
])
hist_waddr
[
9
:
0
]
<=
{
hist_waddr_hold2
[
9
:
0
]
};
else
if
(
hist_seq
[
5
])
hist_waddr
[
9
:
0
]
<=
{
hist_waddr_hold2
[
9
:
0
]
};
/* same_waddr <= hist_seq[0] && // next cycle - read from memory
/* same_waddr <= hist_seq[0] && // next cycle - read from memory
...
@@ -256,7 +257,8 @@ module histogram (pclk, // pixel clock (posedge, only some input si
...
@@ -256,7 +257,8 @@ module histogram (pclk, // pixel clock (posedge, only some input si
else
if
((
line_start
&&
frame_started
&&
last_line
)
||
(
frame_run_s
[
2
]
&&
!
frame_run_s
[
1
]))
frame_ended
<=
1'h1
;
else
if
((
line_start
&&
frame_started
&&
last_line
)
||
(
frame_run_s
[
2
]
&&
!
frame_run_s
[
1
]))
frame_ended
<=
1'h1
;
// frame_ended_d <= frame_ended;
// frame_ended_d <= frame_ended;
// window_on <= (line_start_posl_zero || line_started) && !line_ended && frame_started && !frame_ended;
// window_on <= (line_start_posl_zero || line_started) && !line_ended && frame_started && !frame_ended;
window_on
<=
(
line_start_posl_zero
||
(
line_started
&&
!
line_ended
))
&&
frame_started
&&
!
frame_ended
;
//AF2015 window_on <= (line_start_posl_zero || (line_started && !line_ended)) && frame_started && !frame_ended;
window_on
<=
(
line_start_posl_zero
||
(
line_started
&&
!
line_ended
))
&&
frame_started
&&
!
frame_ended
&&
!
(
line_start
&&
last_line
)
;
end
end
...
...
sensor/sensorpix353.v
View file @
49896216
...
@@ -229,6 +229,7 @@ module sensorpix( pclk, // clock (==pclk)
...
@@ -229,6 +229,7 @@ module sensorpix( pclk, // clock (==pclk)
assign
interp_data
[
9
:
0
]
=
table_base_r
[
9
:
0
]
+
table_mult_r
[
17
:
8
]
+
table_mult_r
[
7
]
;
//round
assign
interp_data
[
9
:
0
]
=
table_base_r
[
9
:
0
]
+
table_mult_r
[
17
:
8
]
+
table_mult_r
[
7
]
;
//round
assign
cdata
[
7
:
0
]
=
interp_data
[
9
:
2
]
;
//truncate
assign
cdata
[
7
:
0
]
=
interp_data
[
9
:
2
]
;
//truncate
reg
[
7
:
0
]
pd_lenscorr_out_d2
;
// AF2015
always
@
(
posedge
pclk
)
begin
always
@
(
posedge
pclk
)
begin
table_base
[
9
:
0
]
<=
table_base_w
[
9
:
0
]
;
table_base
[
9
:
0
]
<=
table_base_w
[
9
:
0
]
;
table_diff
[
10
:
0
]
<=
table_diff_w
[
7
]
?
table_diff
[
10
:
0
]
<=
table_diff_w
[
7
]
?
...
@@ -236,6 +237,7 @@ module sensorpix( pclk, // clock (==pclk)
...
@@ -236,6 +237,7 @@ module sensorpix( pclk, // clock (==pclk)
{{
4
{
table_diff_w
[
6
]
}},
table_diff_w
[
6
:
0
]
};
{{
4
{
table_diff_w
[
6
]
}},
table_diff_w
[
6
:
0
]
};
/// dsat_r[7:0] <= dsat[7:0];
/// dsat_r[7:0] <= dsat[7:0];
pd_lenscorr_out_d
[
7
:
0
]
<=
pd_lenscorr_out
[
7
:
0
]
;
pd_lenscorr_out_d
[
7
:
0
]
<=
pd_lenscorr_out
[
7
:
0
]
;
pd_lenscorr_out_d2
<=
pd_lenscorr_out_d
;
// AF2015 - one more cycle delay
table_mult_r
[
17
:
7
]
<=
table_mult
[
17
:
7
]
;
table_mult_r
[
17
:
7
]
<=
table_mult
[
17
:
7
]
;
table_base_r
[
9
:
0
]
<=
table_base
[
9
:
0
]
;
table_base_r
[
9
:
0
]
<=
table_base
[
9
:
0
]
;
end
end
...
@@ -244,7 +246,8 @@ module sensorpix( pclk, // clock (==pclk)
...
@@ -244,7 +246,8 @@ module sensorpix( pclk, // clock (==pclk)
MULT18X18
i_table_mult
(
MULT18X18
i_table_mult
(
.
P
(
table_mult
)
,
// 36-bit multiplier output
.
P
(
table_mult
)
,
// 36-bit multiplier output
.
A
(
{{
7
{
table_diff
[
10
]
}},
table_diff
[
10
:
0
]
}
)
,
// 18-bit multiplier input
.
A
(
{{
7
{
table_diff
[
10
]
}},
table_diff
[
10
:
0
]
}
)
,
// 18-bit multiplier input
.
B
(
{
10'b0
,
pd_lenscorr_out_d
[
7
:
0
]
}
)
// 18-bit multiplier input
// .B({10'b0,pd_lenscorr_out_d[7:0]}) // 18-bit multiplier input
.
B
(
{
10'b0
,
pd_lenscorr_out_d2
[
7
:
0
]
}
)
// 18-bit multiplier input // AF2015 - one more cycle delay
)
;
)
;
...
@@ -360,7 +363,8 @@ module sensorpix( pclk, // clock (==pclk)
...
@@ -360,7 +363,8 @@ module sensorpix( pclk, // clock (==pclk)
/// NOTE: adding 5 cycles here
/// NOTE: adding 5 cycles here
SRL16
i_hact_dly3
(
.
Q
(
hact_dly3
)
,
.
A0
(
1'b1
)
,
.
A1
(
1'b1
)
,
.
A2
(
1'b1
)
,
.
A3
(
1'b0
)
,
.
CLK
(
pclk
)
,
.
D
(
hact_m
))
;
// dly=2+1+5
SRL16
i_hact_dly3
(
.
Q
(
hact_dly3
)
,
.
A0
(
1'b1
)
,
.
A1
(
1'b1
)
,
.
A2
(
1'b1
)
,
.
A3
(
1'b0
)
,
.
CLK
(
pclk
)
,
.
D
(
hact_m
))
;
// dly=2+1+5
SRL16
i_en_out
(
.
Q
(
en_out
)
,
.
A0
(
1'b0
)
,
.
A1
(
1'b1
)
,
.
A2
(
1'b0
)
,
.
A3
(
1'b1
)
,
.
CLK
(
pclk
)
,
.
D
(
en
))
;
// dly=5+1+5
SRL16
i_en_out
(
.
Q
(
en_out
)
,
.
A0
(
1'b0
)
,
.
A1
(
1'b1
)
,
.
A2
(
1'b0
)
,
.
A3
(
1'b1
)
,
.
CLK
(
pclk
)
,
.
D
(
en
))
;
// dly=5+1+5
SRL16
i_hact_outp
(
.
Q
(
hact_outp
)
,
.
A0
(
1'b0
)
,
.
A1
(
1'b1
)
,
.
A2
(
1'b0
)
,
.
A3
(
1'b1
)
,
.
CLK
(
pclk
)
,
.
D
(
hact_m
))
;
// dly=5+1+5
//AF2015 SRL16 i_hact_outp (.Q(hact_outp), .A0(1'b0), .A1(1'b1), .A2(1'b0), .A3(1'b1), .CLK(pclk), .D(hact_m)); // dly=5+1+5
SRL16
i_hact_outp
(
.
Q
(
hact_outp
)
,
.
A0
(
1'b1
)
,
.
A1
(
1'b0
)
,
.
A2
(
1'b0
)
,
.
A3
(
1'b1
)
,
.
CLK
(
pclk
)
,
.
D
(
hact_m
))
;
// dly=5+1+5
assign
incbwa
=
(
dwe
&&
(
wa
[
7
:
0
]
==
8'hff
))
||
(
|
wa
[
7
:
0
]
&&
!
hact_out
)
;
assign
incbwa
=
(
dwe
&&
(
wa
[
7
:
0
]
==
8'hff
))
||
(
|
wa
[
7
:
0
]
&&
!
hact_out
)
;
always
@
(
posedge
pclk
)
begin
always
@
(
posedge
pclk
)
begin
wpage
<=
incbwa
;
wpage
<=
incbwa
;
...
...
x353_1.sav
View file @
49896216
[*]
[*]
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*]
Sun Aug 9 03:27:09
2015
[*]
Wed Aug 12 02:48:35
2015
[*]
[*]
[dumpfile] "/home/andrey/git/x353/simulation/x353_1-201508
08211805694
.fst"
[dumpfile] "/home/andrey/git/x353/simulation/x353_1-201508
11203732083
.fst"
[dumpfile_mtime] "
Sun Aug 9 03:23:39
2015"
[dumpfile_mtime] "
Wed Aug 12 02:43:52
2015"
[dumpfile_size] 21
847559
[dumpfile_size] 21
019007
[savefile] "/home/andrey/git/x353/x353_1.sav"
[savefile] "/home/andrey/git/x353/x353_1.sav"
[timestart]
5845230
00
[timestart]
4962145
00
[size] 1823 1180
[size] 1823 1180
[pos]
1917
0
[pos]
0
0
*-1
9.677540 5849948
00 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
*-1
4.654496 4962880
00 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[treeopen] testbench353.
[treeopen] testbench353.
[treeopen] testbench353.i_x353.
[treeopen] testbench353.i_x353.
[treeopen] testbench353.i_x353.i_sensorpads.i_sensor_phase.
[treeopen] testbench353.i_x353.i_sensorpads.i_sensor_phase.
[treeopen] testbench353.i_x353.i_sensorpix.
[treeopen] testbench353.i_x353.i_sensorpix.
[treeopen] testbench353.i_x353.i_sensorpix.i_lens_flat.
[treeopen] testbench353.i_x353.i_sensorpix.i_lens_flat.
[treeopen] testbench353.i_x353.i_sysinterface.i_we.
[treeopen] testbench353.i_x353.i_sysinterface.i_we.
[sst_width] 3
35
[sst_width] 3
17
[signals_width] 322
[signals_width] 322
[sst_expanded] 1
[sst_expanded] 1
[sst_vpaned_height] 62
5
[sst_vpaned_height] 62
4
@820
@820
testbench353.TEST_TITLE[639:0]
testbench353.TEST_TITLE[639:0]
@800200
@800200
-sensor_in
-sensor_in
@
8
00022
@
c
00022
testbench353.PXD[11:0]
testbench353.PXD[11:0]
@28
@28
(0)testbench353.PXD[11:0]
(0)testbench353.PXD[11:0]
...
@@ -39,13 +39,13 @@ testbench353.PXD[11:0]
...
@@ -39,13 +39,13 @@ testbench353.PXD[11:0]
(9)testbench353.PXD[11:0]
(9)testbench353.PXD[11:0]
(10)testbench353.PXD[11:0]
(10)testbench353.PXD[11:0]
(11)testbench353.PXD[11:0]
(11)testbench353.PXD[11:0]
@1
0
01200
@1
4
01200
-group_end
-group_end
@28
@28
testbench353.i_x353.HACT
testbench353.i_x353.HACT
testbench353.i_x353.VACT
testbench353.i_x353.VACT
testbench353.DCLK
testbench353.DCLK
@c0002
3
@c0002
2
>-128600
>-128600
testbench353.i_x353.ipxd[15:0]
testbench353.i_x353.ipxd[15:0]
@28
@28
...
@@ -66,7 +66,7 @@ testbench353.i_x353.ipxd[15:0]
...
@@ -66,7 +66,7 @@ testbench353.i_x353.ipxd[15:0]
(13)testbench353.i_x353.ipxd[15:0]
(13)testbench353.i_x353.ipxd[15:0]
(14)testbench353.i_x353.ipxd[15:0]
(14)testbench353.i_x353.ipxd[15:0]
(15)testbench353.i_x353.ipxd[15:0]
(15)testbench353.i_x353.ipxd[15:0]
@140120
1
@140120
0
-group_end
-group_end
@c00022
@c00022
>-149600
>-149600
...
@@ -132,9 +132,8 @@ testbench353.i_x353.i_timestamp353.use_ts
...
@@ -132,9 +132,8 @@ testbench353.i_x353.i_timestamp353.use_ts
-
-
@1000200
@1000200
-timestamp353
-timestamp353
@800200
-lens_flat
@c00200
@c00200
-lens_flat
-line_xy
-line_xy
@22
@22
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.A0[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.A0[18:0]
...
@@ -186,7 +185,64 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.preERR[23:0]
...
@@ -186,7 +185,64 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.preERR[23:0]
-line_y
-line_y
@200
@200
-
-
@800022
@28
testbench353.i_x353.i_sensorpix.i_lens_flat.fstart
@200
-
@800200
-i_fy
@22
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.A0[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.A2X[23:1]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.A[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.ApB[23:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.B0[20:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.ERR0[23:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.ERR[23:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.F0[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.F1[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.F[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.dF[10:0]
@28
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.first
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.first_d
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.inc[1:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.next
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.next_d
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.pclk
@22
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fy.preERR[23:0]
@1000200
-i_fy
@c00200
-i_fxy
@22
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.A0[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.A2X[23:1]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.A[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.ApB[23:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.B0[20:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.ERR0[23:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.ERR[23:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.F0[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.F1[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.F[18:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.dF[10:0]
@28
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.first
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.first_d
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.inc[1:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.next
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.next_d
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.pclk
@22
testbench353.i_x353.i_sensorpix.i_lens_flat.i_fxy.preERR[23:0]
@1401200
-i_fxy
@28
testbench353.i_x353.i_sensorpix.i_lens_flat.wen
testbench353.i_x353.i_sensorpix.i_lens_flat.linerun
@c00022
testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
@28
@28
(0)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
(0)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
...
@@ -205,9 +261,11 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
...
@@ -205,9 +261,11 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
(13)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
(13)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
(14)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
(14)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
(15)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
(15)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdi[15:0]
@1
0
01200
@1
4
01200
-group_end
-group_end
@800022
@28
(0)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
@c00022
testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
@28
@28
(0)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
(0)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
...
@@ -226,8 +284,14 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
...
@@ -226,8 +284,14 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
(13)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
(13)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
(14)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
(14)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
(15)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
(15)testbench353.i_x353.i_sensorpix.i_lens_flat.pixdo[15:0]
@1
0
01200
@1
4
01200
-group_end
-group_end
@22
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_first_res[35:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_first_scaled[17:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_second_res[35:0]
@200
-
@28
@28
testbench353.i_x353.i_sensorpix.i_lens_flat.pclk
testbench353.i_x353.i_sensorpix.i_lens_flat.pclk
testbench353.i_x353.i_sensorpix.i_lens_flat.fstart
testbench353.i_x353.i_sensorpix.i_lens_flat.fstart
...
@@ -236,7 +300,6 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.linerun
...
@@ -236,7 +300,6 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.linerun
@800022
@800022
testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
@28
@28
(0)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
(1)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
(1)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
(2)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
(2)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
(3)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
(3)testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
...
@@ -273,6 +336,7 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
...
@@ -273,6 +336,7 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.lens_corr_out[4:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.linerun
testbench353.i_x353.i_sensorpix.i_lens_flat.linerun
@22
@22
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_first_res[35:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_first_res[35:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.pix_zero[17:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_first_scaled[17:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_first_scaled[17:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_second_res[35:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.mult_second_res[35:0]
@28
@28
...
@@ -298,7 +362,7 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.we_post_scale
...
@@ -298,7 +362,7 @@ testbench353.i_x353.i_sensorpix.i_lens_flat.we_post_scale
testbench353.i_x353.i_sensorpix.i_lens_flat.we_scales
testbench353.i_x353.i_sensorpix.i_lens_flat.we_scales
testbench353.i_x353.i_sensorpix.i_lens_flat.wen
testbench353.i_x353.i_sensorpix.i_lens_flat.wen
testbench353.i_x353.i_sensorpix.i_lens_flat.wen_d[1:0]
testbench353.i_x353.i_sensorpix.i_lens_flat.wen_d[1:0]
@1
000
200
@1
401
200
-lens_flat
-lens_flat
@c00200
@c00200
-sensor12b
-sensor12b
...
@@ -317,9 +381,9 @@ testbench353.i_sensor12bits.state[3:0]
...
@@ -317,9 +381,9 @@ testbench353.i_sensor12bits.state[3:0]
testbench353.i_sensor12bits.stated[3:0]
testbench353.i_sensor12bits.stated[3:0]
@1401200
@1401200
-sensor12b
-sensor12b
@
8
00200
@
c
00200
-debug_sensorpads
-debug_sensorpads
@1
000
200
@1
401
200
-debug_sensorpads
-debug_sensorpads
@200
@200
-
-
...
@@ -591,10 +655,10 @@ testbench353.i_x353.i_sensorpads.pxdi[11:0]
...
@@ -591,10 +655,10 @@ testbench353.i_x353.i_sensorpads.pxdi[11:0]
testbench353.i_x353.i_sensorpads.xpgmen_d[1:0]
testbench353.i_x353.i_sensorpads.xpgmen_d[1:0]
@1401200
@1401200
-sensorpads
-sensorpads
@200
@c00200
-
@800200
-sensorpix
-sensorpix
@28
testbench353.i_x353.i_sensorpix.hact
@c00022
@c00022
testbench353.i_x353.i_sensorpix.pxd[15:0]
testbench353.i_x353.i_sensorpix.pxd[15:0]
@28
@28
...
@@ -617,6 +681,47 @@ testbench353.i_x353.i_sensorpix.pxd[15:0]
...
@@ -617,6 +681,47 @@ testbench353.i_x353.i_sensorpix.pxd[15:0]
@1401200
@1401200
-group_end
-group_end
@28
@28
testbench353.i_x353.i_sensorpix.bayer[1:0]
testbench353.i_x353.i_sensorpix.en
testbench353.i_x353.i_sensorpix.bayer_nset
testbench353.i_x353.i_sensorpix.bayer0_latched
@c00022
testbench353.i_x353.i_sensorpix.color[1:0]
@28
(0)testbench353.i_x353.i_sensorpix.color[1:0]
(1)testbench353.i_x353.i_sensorpix.color[1:0]
@1401200
-group_end
@200
-
@28
testbench353.i_x353.i_sensorpix.hact_outp
testbench353.i_x353.i_sensorpix.hact_out
@22
testbench353.i_x353.i_sensorpix.pd_lenscorr_out[15:0]
testbench353.i_x353.i_sensorpix.i_cstableh.ADDRA[10:0]
testbench353.i_x353.i_sensorpix.table_base_w[9:0]
testbench353.i_x353.i_sensorpix.table_diff_w[7:0]
testbench353.i_x353.i_sensorpix.table_base[9:0]
@200
-
@22
testbench353.i_x353.i_sensorpix.pd_lenscorr_out_d[7:0]
testbench353.i_x353.i_sensorpix.table_diff[10:0]
testbench353.i_x353.i_sensorpix.table_mult[35:0]
testbench353.i_x353.i_sensorpix.table_mult_r[17:7]
testbench353.i_x353.i_sensorpix.table_base_r[9:0]
testbench353.i_x353.i_sensorpix.interp_data[9:0]
testbench353.i_x353.i_sensorpix.cdata[7:0]
@200
-
@22
testbench353.i_x353.i_sensorpix.do[15:0]
@28
testbench353.i_x353.i_sensorpix.dwe
@200
-
@28
testbench353.i_x353.i_sensorpix.twce_d
testbench353.i_x353.i_sensorpix.twce_d
testbench353.i_x353.i_sensorpix.i_cstableh.DIPB
testbench353.i_x353.i_sensorpix.i_cstableh.DIPB
@22
@22
...
@@ -769,8 +874,159 @@ testbench353.i_x353.i_sensorpix.we_lensff
...
@@ -769,8 +874,159 @@ testbench353.i_x353.i_sensorpix.we_lensff
testbench353.i_x353.i_sensorpix.wfpn
testbench353.i_x353.i_sensorpix.wfpn
testbench353.i_x353.i_sensorpix.wpage
testbench353.i_x353.i_sensorpix.wpage
testbench353.i_x353.i_sensorpix.wthrsh
testbench353.i_x353.i_sensorpix.wthrsh
@1
000
200
@1
401
200
-sensorpix
-sensorpix
@200
-
@800200
-histogram
@28
testbench353.i_x353.i_histogram.bayer_phase[1:0]
@c00023
testbench353.i_x353.i_histogram.hist_seq[5:0]
@29
(0)testbench353.i_x353.i_histogram.hist_seq[5:0]
(1)testbench353.i_x353.i_histogram.hist_seq[5:0]
(2)testbench353.i_x353.i_histogram.hist_seq[5:0]
(3)testbench353.i_x353.i_histogram.hist_seq[5:0]
(4)testbench353.i_x353.i_histogram.hist_seq[5:0]
(5)testbench353.i_x353.i_histogram.hist_seq[5:0]
@1401201
-group_end
@c00022
testbench353.i_x353.i_histogram.bayer[1:0]
@28
(0)testbench353.i_x353.i_histogram.bayer[1:0]
(1)testbench353.i_x353.i_histogram.bayer[1:0]
@1401200
-group_end
@22
testbench353.histogram_count[9:0]
testbench353.histogram_total
testbench353.i_x353.i_histogram.di_a[15:0]
@28
testbench353.i_x353.i_histogram.di_vld_a
testbench353.i_x353.i_histogram.line_start
testbench353.i_x353.i_histogram.line_started
testbench353.i_x353.i_histogram.line_ended
testbench353.i_x353.i_histogram.line_run
testbench353.i_x353.i_histogram.frame_started
testbench353.i_x353.i_histogram.frame_ended
testbench353.i_x353.i_histogram.last_line
testbench353.i_x353.i_histogram.line_start_posl_zero
testbench353.i_x353.i_histogram.window_on
@22
testbench353.i_x353.i_histogram.pos_left[13:1]
testbench353.i_x353.i_histogram.pos_top[13:1]
testbench353.i_x353.i_histogram.size_width[13:1]
testbench353.i_x353.i_histogram.size_height[13:1]
@28
testbench353.i_x353.i_histogram.hist_ena
testbench353.i_x353.i_histogram.hist_wea
@22
testbench353.i_x353.i_histogram.hist_waddr[9:0]
testbench353.i_x353.i_histogram.hist_waddr_hold1[9:0]
testbench353.i_x353.i_histogram.hist_waddr_hold2[9:0]
testbench353.i_x353.i_histogram.hist_dia[17:0]
testbench353.i_x353.i_histogram.hist_doa[17:0]
@28
testbench353.i_x353.i_histogram.same_waddr
@200
-
@22
testbench353.i_x353.i_histogram.di[15:0]
@28
testbench353.i_x353.i_histogram.bayer[1:0]
testbench353.i_x353.i_histogram.bayer_en
testbench353.i_x353.i_histogram.bayer_phase[1:0]
testbench353.i_x353.i_histogram.bayer_phase_latched[1:0]
@22
testbench353.i_x353.i_histogram.di2x[15:0]
testbench353.i_x353.i_histogram.di[15:0]
testbench353.i_x353.i_histogram.di_a[15:0]
@28
testbench353.i_x353.i_histogram.di_vld
testbench353.i_x353.i_histogram.di_vld_a
@22
testbench353.i_x353.i_histogram.dvld2x[3:0]
@28
testbench353.i_x353.i_histogram.end_hist_init
testbench353.i_x353.i_histogram.frame_ended
testbench353.i_x353.i_histogram.frame_run
testbench353.i_x353.i_histogram.frame_run_s[2:0]
testbench353.i_x353.i_histogram.frame_start
testbench353.i_x353.i_histogram.frame_started
testbench353.i_x353.i_histogram.hist_bank
@22
testbench353.i_x353.i_histogram.hist_dia[17:0]
testbench353.i_x353.i_histogram.hist_do0[17:0]
testbench353.i_x353.i_histogram.hist_do[31:0]
testbench353.i_x353.i_histogram.hist_doa[17:0]
@28
testbench353.i_x353.i_histogram.hist_ena
@22
testbench353.i_x353.i_histogram.hist_init_cntr[9:0]
testbench353.i_x353.i_histogram.hist_post[17:0]
testbench353.i_x353.i_histogram.hist_pre[17:0]
testbench353.i_x353.i_histogram.hist_raddr[9:0]
testbench353.i_x353.i_histogram.hist_seq[5:0]
testbench353.i_x353.i_histogram.hist_waddr[9:0]
testbench353.i_x353.i_histogram.hist_waddr_hold1[9:0]
testbench353.i_x353.i_histogram.hist_waddr_hold2[9:0]
@28
testbench353.i_x353.i_histogram.hist_wea
testbench353.i_x353.i_histogram.init_hist
testbench353.i_x353.i_histogram.init_hist_d
testbench353.i_x353.i_histogram.last_line
@22
testbench353.i_x353.i_histogram.line_cntr[13:1]
@28
testbench353.i_x353.i_histogram.line_end
testbench353.i_x353.i_histogram.line_ended
testbench353.i_x353.i_histogram.line_run
testbench353.i_x353.i_histogram.line_run_a
testbench353.i_x353.i_histogram.line_run_s[2:0]
testbench353.i_x353.i_histogram.line_start
testbench353.i_x353.i_histogram.line_start_posl_nzero
testbench353.i_x353.i_histogram.line_start_posl_zero
testbench353.i_x353.i_histogram.line_started
@22
testbench353.i_x353.i_histogram.minus_pos_left[13:1]
@28
testbench353.i_x353.i_histogram.odd_line
testbench353.i_x353.i_histogram.pclk
testbench353.i_x353.i_histogram.pclk2x
@22
testbench353.i_x353.i_histogram.pix_cntr[13:1]
testbench353.i_x353.i_histogram.pos_left[13:1]
@28
testbench353.i_x353.i_histogram.pos_left_is_zero
@22
testbench353.i_x353.i_histogram.pos_top[13:1]
@28
testbench353.i_x353.i_histogram.pre_di_vld
testbench353.i_x353.i_histogram.pre_same_addr
testbench353.i_x353.i_histogram.rd_hist
testbench353.i_x353.i_histogram.rnext
testbench353.i_x353.i_histogram.same_waddr
testbench353.i_x353.i_histogram.sclk
@22
testbench353.i_x353.i_histogram.size_height[13:1]
testbench353.i_x353.i_histogram.size_width[13:1]
@28
testbench353.i_x353.i_histogram.wa[2:0]
@22
testbench353.i_x353.i_histogram.wd[15:0]
testbench353.i_x353.i_histogram.wdd[15:0]
@28
testbench353.i_x353.i_histogram.we_addr
testbench353.i_x353.i_histogram.we_addr_d
testbench353.i_x353.i_histogram.we_pos[1:0]
testbench353.i_x353.i_histogram.we_size[1:0]
testbench353.i_x353.i_histogram.wen
testbench353.i_x353.i_histogram.window_on
@1000200
-histogram
@c00200
@c00200
-sdram
-sdram
@22
@22
...
...
x353_1.tf
View file @
49896216
...
@@ -35,7 +35,8 @@ module testbench353();
...
@@ -35,7 +35,8 @@ module testbench353();
parameter
SYNC_BIT_LENGTH
=
8
-
1
;
/// 7 pixel clock pulses
parameter
SYNC_BIT_LENGTH
=
8
-
1
;
/// 7 pixel clock pulses
parameter
FPGA_XTRA_CYCLES
=
1500
;
// 1072+;
parameter
FPGA_XTRA_CYCLES
=
1500
;
// 1072+;
parameter
HISTOGRAM_LEFT
=
0
;
//2; // left
parameter
HISTOGRAM_LEFT
=
0
;
//2; // left
parameter
HISTOGRAM_TOP
=
2
;
// top
// parameter HISTOGRAM_TOP = 2; // top
parameter
HISTOGRAM_TOP
=
8
;
// top - otherwise no time to erase
parameter
HISTOGRAM_WIDTH
=
6
;
// width
parameter
HISTOGRAM_WIDTH
=
6
;
// width
parameter
HISTOGRAM_HEIGHT
=
6
;
// height
parameter
HISTOGRAM_HEIGHT
=
6
;
// height
parameter
CLK0_PER
=
6.25
;
//160MHz
parameter
CLK0_PER
=
6.25
;
//160MHz
...
@@ -1122,7 +1123,8 @@ $display ("saturation=2");
...
@@ -1122,7 +1123,8 @@ $display ("saturation=2");
// cpu_wr('
h62
,
'h0c002400); // JP46 - mode 2
// cpu_wr('
h62
,
'h0c002400); // JP46 - mode 2
cpu_wr('
h62
,
'h0c000006); // mode - single
cpu_wr('
h62
,
'h0c000006); // mode - single
cpu_wr('
h62
,
'h4e000000 | '
h4
);
// bayer=0
cpu_wr('
h62
,
'h4e000000 | '
h4
);
// bayer=0
cpu_wr
(
'h64, '
h4e000000
|
'h5 );// bayer=1
//AF2015 cpu_wr('h64, 'h4e000000 | 'h5 );// bayer=1
cpu_wr
(
'h65, '
h4e000000
|
'h5 );// bayer=1 AF2015 - make it later to compare with 393
/*
/*
AX(0x000000): writing 0x000000 to 0x31
AX(0x000000): writing 0x000000 to 0x31
...
@@ -1141,11 +1143,13 @@ $display ("saturation=2");
...
@@ -1141,11 +1143,13 @@ $display ("saturation=2");
// Lens flat field correction
// Lens flat field correction
cpu_wr('
h62
,
'h31000000); // [AX] => 0x0
//
cpu_wr('
h62
,
'h31000000); // [AX] => 0x0
cpu_wr('
h62
,
'h31080000); // [AY] => 0
//
cpu_wr('
h62
,
'h31080000); // [AY] => 0
cpu_wr('
h62
,
'h31108000); // [C] => 0x8000
cpu_wr('
h62
,
'h31108000); // [C] => 0x8000
cpu_wr('
h62
,
'h31200000); // [BX] => 0
cpu_wr('
h62
,
'h31380000); // [BX] => 0x180000; // 0
cpu_wr('
h62
,
'h31400000); // [BY] => 0
cpu_wr('
h62
,
'h31580000); // [BY] => 0x180000; // 0
// cpu_wr('
h62
,
'h31200000); // [BX] => 0x180000; // 0
// cpu_wr('
h62
,
'h31400000); // [BY] => 0x180000; // 0
cpu_wr('
h62
,
'h31608000); // [scales0] => 32768
cpu_wr('
h62
,
'h31608000); // [scales0] => 32768
cpu_wr('
h62
,
'h31628000); // [scales1] => 32768
cpu_wr('
h62
,
'h31628000); // [scales1] => 32768
...
@@ -1155,11 +1159,14 @@ $display ("saturation=2");
...
@@ -1155,11 +1159,14 @@ $display ("saturation=2");
cpu_wr('
h62
,
'h31690000); // [fatzero_out] => 0
cpu_wr('
h62
,
'h31690000); // [fatzero_out] => 0
cpu_wr('
h62
,
'h316a0001); // [post_scale] => 3 - X
cpu_wr('
h62
,
'h316a0001); // [post_scale] => 3 - X
cpu_wr('
h63
,
'h31020000); // [AX] => 0x20000
// cpu_wr('
h63
,
'h31020000); // [AX] => 0x20000
cpu_wr('
h63
,
'h310a0000); // [AY] => 0x20000
// cpu_wr('
h63
,
'h310a0000); // [AY] => 0x20000
cpu_wr('
h62
,
'h31020000); // [AX] => 0x20000
cpu_wr('
h62
,
'h310a0000); // [AY] => 0x20000
cpu_wr('
h64
,
'h31200000); // [BX] => 0x180000
// TODO: move to '
h62
(
together
with
393
)
cpu_wr('
h64
,
'h31400000); // [BY] => 0x180000
// cpu_wr('h64,'h31200000); // [BX] => 0x180000
// cpu_wr('h64,'h31400000); // [BY] => 0x180000
`
ifdef
CONTINUOUS_COMPRESSION
`
ifdef
CONTINUOUS_COMPRESSION
TEST_TITLE
=
"START_CONTINUOUS_COMPRESSION"
;
TEST_TITLE
=
"START_CONTINUOUS_COMPRESSION"
;
...
...
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