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
44928b65
Commit
44928b65
authored
Mar 21, 2021
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing delay setup for par12 and hispi, ran for par12
parent
9faf797c
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
332 additions
and
302 deletions
+332
-302
fpga_version.vh
fpga_version.vh
+251
-249
byte_lane.v
memctrl/phy/byte_lane.v
+1
-1
dqs_single_nofine.v
memctrl/phy/dqs_single_nofine.v
+3
-2
pxd_clock.v
sensor/pxd_clock.v
+4
-4
pxd_single.v
sensor/pxd_single.v
+5
-5
sens_10398.v
sensor/sens_10398.v
+4
-4
sens_103993.v
sensor/sens_103993.v
+2
-1
sens_103993_clock.v
sensor/sens_103993_clock.v
+1
-1
sens_103993_din.v
sensor/sens_103993_din.v
+8
-8
sens_103993_l3.v
sensor/sens_103993_l3.v
+1
-1
sens_hispi12l4.v
sensor/sens_hispi12l4.v
+3
-3
sens_hispi_clock.v
sensor/sens_hispi_clock.v
+6
-3
sens_hispi_din.v
sensor/sens_hispi_din.v
+6
-3
sens_parallel12.v
sensor/sens_parallel12.v
+34
-15
system_defines.vh
system_defines.vh
+2
-1
camsync393.v
timing/camsync393.v
+1
-1
x393_parallel.bit
x393_parallel.bit
+0
-0
No files found.
fpga_version.vh
View file @
44928b65
This diff is collapsed.
Click to expand it.
memctrl/phy/byte_lane.v
View file @
44928b65
...
@@ -192,7 +192,7 @@ dm_single #(
...
@@ -192,7 +192,7 @@ dm_single #(
.
din
(
din_dm_r
[
3
:
0
])
,
// parallel data to be sent out
.
din
(
din_dm_r
[
3
:
0
])
,
// parallel data to be sent out
.
tin
(
tin_dq_r
)
,
// tristate for data out (sent out earlier than data!)
.
tin
(
tin_dq_r
)
,
// tristate for data out (sent out earlier than data!)
.
set_odelay
(
set_r
)
,
// clk_div synchronous load odelay value from dly_data
.
set_odelay
(
set_r
)
,
// clk_div synchronous load odelay value from dly_data
.
ld_odelay
(
ld_odly_dm
)
// clk_div synchronous set odealy value from loaded
.
ld_odelay
(
ld_odly_dm
)
// clk_div synchronous set odealy value from loaded
)
;
)
;
`ifdef
NOFINEDELAY_DQS
`ifdef
NOFINEDELAY_DQS
...
...
memctrl/phy/dqs_single_nofine.v
View file @
44928b65
...
@@ -61,8 +61,8 @@ module dqs_single_nofine #(
...
@@ -61,8 +61,8 @@ module dqs_single_nofine #(
input
[
7
:
0
]
dly_data
,
input
[
7
:
0
]
dly_data
,
input
[
3
:
0
]
din
,
input
[
3
:
0
]
din
,
input
[
3
:
0
]
tin
,
input
[
3
:
0
]
tin
,
input
set_odelay
,
input
set_odelay
,
// apply loaded pipeline register data
input
ld_odelay
,
input
ld_odelay
,
// load pipeline register data
input
set_idelay
,
input
set_idelay
,
input
ld_idelay
input
ld_idelay
)
;
)
;
...
@@ -113,6 +113,7 @@ IOBUFDS_DCIEN #(
...
@@ -113,6 +113,7 @@ IOBUFDS_DCIEN #(
.
IBUFDISABLE
(
1'b0
)
,
.
IBUFDISABLE
(
1'b0
)
,
.
I
(
dqs_data_dly
)
,
//dqs_data),
.
I
(
dqs_data_dly
)
,
//dqs_data),
.
T
(
dqs_tri
))
;
.
T
(
dqs_tri
))
;
idelay_nofine
#
(
idelay_nofine
#
(
.
IODELAY_GRP
(
IODELAY_GRP
)
,
.
IODELAY_GRP
(
IODELAY_GRP
)
,
.
DELAY_VALUE
(
IDELAY_VALUE
>>
3
)
,
.
DELAY_VALUE
(
IDELAY_VALUE
>>
3
)
,
...
...
sensor/pxd_clock.v
View file @
44928b65
...
@@ -56,8 +56,8 @@ module pxd_clock #(
...
@@ -56,8 +56,8 @@ module pxd_clock #(
input
rst
,
// reset
input
rst
,
// reset
input
mclk
,
// clock for setting delay values
input
mclk
,
// clock for setting delay values
input
[
7
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
[
7
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
set_idelay
,
// mclk synchronous
load idelay value
input
set_idelay
,
// mclk synchronous
apply loaded delay values
input
ld_idelay
// mclk synchronous
set idealy value
input
ld_idelay
// mclk synchronous
load delay value to pipeline register
)
;
)
;
wire
pxclk_iobuf
;
wire
pxclk_iobuf
;
...
@@ -97,8 +97,8 @@ module pxd_clock #(
...
@@ -97,8 +97,8 @@ module pxd_clock #(
)
pxclk_dly_i
(
)
pxclk_dly_i
(
.
clk
(
mclk
)
,
.
clk
(
mclk
)
,
.
rst
(
rst
)
,
.
rst
(
rst
)
,
.
set
(
set_idelay
)
,
.
set
(
set_idelay
)
,
// apply loaded delay values
.
ld
(
ld_idelay
)
,
.
ld
(
ld_idelay
)
,
// load delay value to pipeline register
.
delay
(
dly_data
[
7
:
3
])
,
.
delay
(
dly_data
[
7
:
3
])
,
.
data_in
(
pxclk_iobuf
)
,
.
data_in
(
pxclk_iobuf
)
,
.
data_out
(
pxclk_in
)
.
data_out
(
pxclk_in
)
...
...
sensor/pxd_single.v
View file @
44928b65
...
@@ -60,9 +60,9 @@ module pxd_single#(
...
@@ -60,9 +60,9 @@ module pxd_single#(
input
irst
,
// reset @ posedge iclk
input
irst
,
// reset @ posedge iclk
input
mclk
,
// clock for setting delay values
input
mclk
,
// clock for setting delay values
input
[
7
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
[
7
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
set_idelay
,
// mclk synchronous
load idelay value
input
set_idelay
,
// mclk synchronous
apply loaded delay values
input
ld_idelay
,
// mclk synchronous
set idealy value
input
ld_idelay
,
// mclk synchronous
load delay value to pipeline register
input
[
1
:
0
]
quadrant
// select one of 4 90-degree shifts for the data (MT9P0xx) have VACT, HACT shifted from PXD
input
[
1
:
0
]
quadrant
// select one of 4 90-degree shifts for the data (MT9P0xx) have VACT, HACT shifted from PXD
)
;
)
;
wire
pxd_iobuf
;
wire
pxd_iobuf
;
wire
pxd_delayed
;
wire
pxd_delayed
;
...
@@ -114,8 +114,8 @@ module pxd_single#(
...
@@ -114,8 +114,8 @@ module pxd_single#(
)
pxd_dly_i
(
)
pxd_dly_i
(
.
clk
(
mclk
)
,
.
clk
(
mclk
)
,
.
rst
(
mrst
)
,
.
rst
(
mrst
)
,
.
set
(
set_idelay
)
,
.
set
(
set_idelay
)
,
// apply loaded delay values
.
ld
(
ld_idelay
)
,
.
ld
(
ld_idelay
)
,
// load delay value to pipeline register
.
delay
(
dly_data
[
7
:
3
])
,
.
delay
(
dly_data
[
7
:
3
])
,
.
data_in
(
pxd_iobuf
)
,
.
data_in
(
pxd_iobuf
)
,
.
data_out
(
pxd_delayed
)
.
data_out
(
pxd_delayed
)
...
...
sensor/sens_10398.v
View file @
44928b65
...
@@ -204,7 +204,7 @@ module sens_10398 #(
...
@@ -204,7 +204,7 @@ module sens_10398 #(
reg
iarst
=
0
;
reg
iarst
=
0
;
reg
imrst
=
0
;
// active low
reg
imrst
=
0
;
// active low
reg
rst_mmcm
=
1
;
// rst and command - en/dis
reg
rst_mmcm
=
1
;
// rst and command - en/dis
reg
ld
_idelay
=
0
;
reg
apply
_idelay
=
0
;
reg
ignore_embed
=
0
;
// do not process sensor data marked as "embedded"
reg
ignore_embed
=
0
;
// do not process sensor data marked as "embedded"
// wire [14:0] status;
// wire [14:0] status;
...
@@ -317,8 +317,8 @@ module sens_10398 #(
...
@@ -317,8 +317,8 @@ module sens_10398 #(
if
(
mrst
)
ignore_embed
<=
0
;
if
(
mrst
)
ignore_embed
<=
0
;
else
if
(
set_ctrl_r
&&
data_r
[
SENS_CTRL_IGNORE_EMBED
+
1
])
ignore_embed
<=
data_r
[
SENS_CTRL_IGNORE_EMBED
]
;
else
if
(
set_ctrl_r
&&
data_r
[
SENS_CTRL_IGNORE_EMBED
+
1
])
ignore_embed
<=
data_r
[
SENS_CTRL_IGNORE_EMBED
]
;
if
(
mrst
)
ld
_idelay
<=
0
;
if
(
mrst
)
apply
_idelay
<=
0
;
else
ld
_idelay
<=
set_ctrl_r
&&
data_r
[
SENS_CTRL_LD_DLY
]
;
else
apply
_idelay
<=
set_ctrl_r
&&
data_r
[
SENS_CTRL_LD_DLY
]
;
if
(
mrst
)
gp_r
[
1
:
0
]
<=
0
;
if
(
mrst
)
gp_r
[
1
:
0
]
<=
0
;
else
if
(
set_ctrl_r
&&
data_r
[
SENS_CTRL_GP0
+
2
])
gp_r
[
1
:
0
]
<=
data_r
[
SENS_CTRL_GP0
+:
2
]
;
else
if
(
set_ctrl_r
&&
data_r
[
SENS_CTRL_GP0
+
2
])
gp_r
[
1
:
0
]
<=
data_r
[
SENS_CTRL_GP0
+:
2
]
;
...
@@ -482,7 +482,7 @@ module sens_10398 #(
...
@@ -482,7 +482,7 @@ module sens_10398 #(
.
set_lanes_map
(
set_lanes_map
)
,
// input
.
set_lanes_map
(
set_lanes_map
)
,
// input
.
set_fifo_dly
(
set_fifo_dly
)
,
// input
.
set_fifo_dly
(
set_fifo_dly
)
,
// input
.
set_idelay
(
{
4
{
set_idelays
}}
)
,
// input[3:0]
.
set_idelay
(
{
4
{
set_idelays
}}
)
,
// input[3:0]
.
ld_idelay
(
ld_idelay
)
,
// input
.
apply_idelay
(
apply_idelay
)
,
// input
.
set_clk_phase
(
set_iclk_phase
)
,
// input
.
set_clk_phase
(
set_iclk_phase
)
,
// input
.
rst_mmcm
(
rst_mmcm
)
,
// input
.
rst_mmcm
(
rst_mmcm
)
,
// input
.
ignore_embedded
(
ignore_embed
)
,
// input
.
ignore_embedded
(
ignore_embed
)
,
// input
...
...
sensor/sens_103993.v
View file @
44928b65
...
@@ -690,7 +690,8 @@ module sens_103993 #(
...
@@ -690,7 +690,8 @@ module sens_103993 #(
// end of dummy
// end of dummy
// pulldown to detect sensor presense
// mpulldown i_snsrxd_pulldown (sns_rxd);
// READ RXD
// READ RXD
ibuf_ibufg
#(
ibuf_ibufg
#(
.
CAPACITANCE
(
PXD_CAPACITANCE
)
,
.
CAPACITANCE
(
PXD_CAPACITANCE
)
,
...
...
sensor/sens_103993_clock.v
View file @
44928b65
/*!
/*!
* <b>Module:</b>sens_
hispi
_clock
* <b>Module:</b>sens_
103993
_clock
* @file sens_103993_clock.v
* @file sens_103993_clock.v
* @date 2020-12-16
* @date 2020-12-16
* @author Andrey Filippov
* @author Andrey Filippov
...
...
sensor/sens_103993_din.v
View file @
44928b65
/*!
/*!
* <b>Module:</b>sens_103993_din
* <b>Module:</b>sens_103993_din
* @file sens_
hispi
_din.v
* @file sens_
103993
_din.v
* @date 2020-12-16
* @date 2020-12-16
* @author Andrey Filippov
* @author Andrey Filippov
*
*
...
@@ -56,13 +56,13 @@ module sens_103993_din #(
...
@@ -56,13 +56,13 @@ module sens_103993_din #(
)(
)(
input
mclk
,
input
mclk
,
input
mrst
,
input
mrst
,
input
[
NUMLANES
*
8
-
1
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
[
NUMLANES
*
8
-
1
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
[
NUMLANES
-
1
:
0
]
set_idelay
,
// mclk synchronous load idelay value
input
[
NUMLANES
-
1
:
0
]
set_idelay
,
// mclk synchronous load idelay value
input
ld_idelay
,
// mclk synchronous set ideal
y value
input
ld_idelay
,
// mclk synchronous apply idela
y value
input
pclk
,
// 27 MHz
input
pclk
,
// 27 MHz
// input ipclk, // 165 MHz
// input ipclk,
// 165 MHz
input
ipclk2x
,
// 330 MHz
input
ipclk2x
,
// 330 MHz
// input irst, // reset @posedge iclk
// input irst,
// reset @posedge iclk
input
[
NUMLANES
-
1
:
0
]
din_p
,
input
[
NUMLANES
-
1
:
0
]
din_p
,
input
[
NUMLANES
-
1
:
0
]
din_n
,
input
[
NUMLANES
-
1
:
0
]
din_n
,
output
[
NUMLANES
*
10
-
1
:
0
]
dout
output
[
NUMLANES
*
10
-
1
:
0
]
dout
...
...
sensor/sens_103993_l3.v
View file @
44928b65
/*!
/*!
* <b>Module:</b>sens_103993_l3
* <b>Module:</b>sens_103993_l3
* @file sens_
hispi12l4
.v
* @file sens_
103993_l3
.v
* @date 2015-10-13
* @date 2015-10-13
* @author Andrey Filippov
* @author Andrey Filippov
*
*
...
...
sensor/sens_hispi12l4.v
View file @
44928b65
...
@@ -105,7 +105,7 @@ module sens_hispi12l4#(
...
@@ -105,7 +105,7 @@ module sens_hispi12l4#(
input
set_lanes_map
,
// set number of physical lane for each logical one
input
set_lanes_map
,
// set number of physical lane for each logical one
input
set_fifo_dly
,
input
set_fifo_dly
,
input
[
HISPI_NUMLANES
-
1
:
0
]
set_idelay
,
// mclk synchronous load idelay value
input
[
HISPI_NUMLANES
-
1
:
0
]
set_idelay
,
// mclk synchronous load idelay value
input
ld_idelay
,
// mclk synchronous set idealy value
input
apply_idelay
,
// mclk synchronous set idealy value
input
set_clk_phase
,
// mclk synchronous set idealy value
input
set_clk_phase
,
// mclk synchronous set idealy value
input
rst_mmcm
,
input
rst_mmcm
,
input
ignore_embedded
,
// ignore lines with embedded data
input
ignore_embedded
,
// ignore lines with embedded data
...
@@ -253,7 +253,7 @@ module sens_hispi12l4#(
...
@@ -253,7 +253,7 @@ module sens_hispi12l4#(
.
mrst
(
mrst
)
,
// input
.
mrst
(
mrst
)
,
// input
.
phase
(
dly_data
[
7
:
0
])
,
// input[7:0]
.
phase
(
dly_data
[
7
:
0
])
,
// input[7:0]
.
set_phase
(
set_clk_phase
)
,
// input
.
set_phase
(
set_clk_phase
)
,
// input
.
load
(
ld_idelay
)
,
// input
.
apply_phase
(
apply_idelay
)
,
// input
.
rst_mmcm
(
rst_mmcm
)
,
// input
.
rst_mmcm
(
rst_mmcm
)
,
// input
.
clp_p
(
sns_clkp
)
,
// input
.
clp_p
(
sns_clkp
)
,
// input
.
clk_n
(
sns_clkn
)
,
// input
.
clk_n
(
sns_clkn
)
,
// input
...
@@ -285,7 +285,7 @@ module sens_hispi12l4#(
...
@@ -285,7 +285,7 @@ module sens_hispi12l4#(
.
mrst
(
mrst
)
,
// input
.
mrst
(
mrst
)
,
// input
.
dly_data
(
dly_data
)
,
// input[31:0]
.
dly_data
(
dly_data
)
,
// input[31:0]
.
set_idelay
(
set_idelay
)
,
// input[3:0]
.
set_idelay
(
set_idelay
)
,
// input[3:0]
.
ld_idelay
(
ld
_idelay
)
,
// input
.
apply_idelay
(
apply
_idelay
)
,
// input
.
ipclk
(
ipclk
)
,
// input
.
ipclk
(
ipclk
)
,
// input
.
ipclk2x
(
ipclk2x
)
,
// input
.
ipclk2x
(
ipclk2x
)
,
// input
.
irst
(
irst
)
,
// input
.
irst
(
irst
)
,
// input
...
...
sensor/sens_hispi_clock.v
View file @
44928b65
...
@@ -78,7 +78,7 @@ module sens_hispi_clock#(
...
@@ -78,7 +78,7 @@ module sens_hispi_clock#(
input
mrst
,
input
mrst
,
input
[
7
:
0
]
phase
,
input
[
7
:
0
]
phase
,
input
set_phase
,
input
set_phase
,
input
load
,
// only used when delay, not phase
input
apply_phase
,
// only used when delay, not phase
input
rst_mmcm
,
input
rst_mmcm
,
input
clp_p
,
input
clp_p
,
input
clk_n
,
input
clk_n
,
...
@@ -144,8 +144,11 @@ module sens_hispi_clock#(
...
@@ -144,8 +144,11 @@ module sens_hispi_clock#(
)
clk_dly_i
(
)
clk_dly_i
(
.
clk
(
mclk
)
,
.
clk
(
mclk
)
,
.
rst
(
mrst
)
,
.
rst
(
mrst
)
,
.
set
(
set_phase
)
,
// .set (set_phase), // apply pipeline register
.
ld
(
load
)
,
// .ld (load), // load pipeline register
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set
(
apply_phase
)
,
// apply pipeline register
.
ld
(
set_phase
)
,
// load pipeline register
.
delay
(
phase
[
4
:
0
])
,
.
delay
(
phase
[
4
:
0
])
,
.
data_in
(
clk_int
)
,
.
data_in
(
clk_int
)
,
.
data_out
(
clk_in
)
.
data_out
(
clk_in
)
...
...
sensor/sens_hispi_din.v
View file @
44928b65
...
@@ -58,7 +58,7 @@ module sens_hispi_din #(
...
@@ -58,7 +58,7 @@ module sens_hispi_din #(
input
mrst
,
input
mrst
,
input
[
HISPI_NUMLANES
*
8
-
1
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
[
HISPI_NUMLANES
*
8
-
1
:
0
]
dly_data
,
// delay value (3 LSB - fine delay) - @posedge mclk
input
[
HISPI_NUMLANES
-
1
:
0
]
set_idelay
,
// mclk synchronous load idelay value
input
[
HISPI_NUMLANES
-
1
:
0
]
set_idelay
,
// mclk synchronous load idelay value
input
ld
_idelay
,
// mclk synchronous set idealy value
input
apply
_idelay
,
// mclk synchronous set idealy value
input
ipclk
,
// 165 MHz
input
ipclk
,
// 165 MHz
input
ipclk2x
,
// 330 MHz
input
ipclk2x
,
// 330 MHz
input
irst
,
// reset @posedge iclk
input
irst
,
// reset @posedge iclk
...
@@ -111,8 +111,11 @@ module sens_hispi_din #(
...
@@ -111,8 +111,11 @@ module sens_hispi_din #(
)
pxd_dly_i
(
)
pxd_dly_i
(
.
clk
(
mclk
)
,
.
clk
(
mclk
)
,
.
rst
(
mrst
)
,
.
rst
(
mrst
)
,
.
set
(
set_idelay
[
i
])
,
// .set (set_idelay[i]),
.
ld
(
ld_idelay
)
,
// .ld (apply_idelay),
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set
(
apply_idelay
)
,
.
ld
(
set_idelay
[
i
])
,
.
delay
(
dly_data
[
3
+
8
*
i
+:
5
])
,
.
delay
(
dly_data
[
3
+
8
*
i
+:
5
])
,
.
data_in
(
din
[
i
])
,
.
data_in
(
din
[
i
])
,
.
data_out
(
din_dly
[
i
])
.
data_out
(
din_dly
[
i
])
...
...
sensor/sens_parallel12.v
View file @
44928b65
...
@@ -191,7 +191,7 @@ module sens_parallel12 #(
...
@@ -191,7 +191,7 @@ module sens_parallel12 #(
reg
imrst
=
0
;
reg
imrst
=
0
;
reg
rst_mmcm
=
1
;
// rst and command - en/dis
reg
rst_mmcm
=
1
;
// rst and command - en/dis
reg
[
SENS_CTRL_QUADRANTS_WIDTH
-
1
:
0
]
quadrants
=
0
;
//90-degree shifts for data [1:0], hact [3:2] and vact [5:4], [6] odd/even
reg
[
SENS_CTRL_QUADRANTS_WIDTH
-
1
:
0
]
quadrants
=
0
;
//90-degree shifts for data [1:0], hact [3:2] and vact [5:4], [6] odd/even
reg
ld_idelay
=
0
;
reg
apply_idelay
=
0
;
//
ld_idelay=0;
reg
sel_ext_clk
=
0
;
// select clock source from the sensor (0 - use internal clock - to sensor)
reg
sel_ext_clk
=
0
;
// select clock source from the sensor (0 - use internal clock - to sensor)
...
@@ -324,8 +324,8 @@ module sens_parallel12 #(
...
@@ -324,8 +324,8 @@ module sens_parallel12 #(
if
(
mclk_rst
)
quadrants
<=
0
;
if
(
mclk_rst
)
quadrants
<=
0
;
else
if
(
set_ctrl_r
&&
data_r
[
SENS_CTRL_QUADRANTS_EN
])
quadrants
<=
data_r
[
SENS_CTRL_QUADRANTS
+:
SENS_CTRL_QUADRANTS_WIDTH
]
;
else
if
(
set_ctrl_r
&&
data_r
[
SENS_CTRL_QUADRANTS_EN
])
quadrants
<=
data_r
[
SENS_CTRL_QUADRANTS
+:
SENS_CTRL_QUADRANTS_WIDTH
]
;
if
(
mclk_rst
)
ld
_idelay
<=
0
;
if
(
mclk_rst
)
apply
_idelay
<=
0
;
else
ld
_idelay
<=
set_ctrl_r
&&
data_r
[
SENS_CTRL_LD_DLY
]
;
else
apply
_idelay
<=
set_ctrl_r
&&
data_r
[
SENS_CTRL_LD_DLY
]
;
if
(
mclk_rst
)
set_width_r
<=
0
;
if
(
mclk_rst
)
set_width_r
<=
0
;
else
set_width_r
<=
{
set_width_r
[
0
]
,
cmd_we
&&
(
cmd_a
==
SENSIO_WIDTH
)
};
else
set_width_r
<=
{
set_width_r
[
0
]
,
cmd_we
&&
(
cmd_a
==
SENSIO_WIDTH
)
};
...
@@ -485,8 +485,11 @@ module sens_parallel12 #(
...
@@ -485,8 +485,11 @@ module sens_parallel12 #(
.
irst
(
irst
)
,
// input
.
irst
(
irst
)
,
// input
.
mclk
(
mclk
)
,
// input
.
mclk
(
mclk
)
,
// input
.
dly_data
(
data_r
[
7
:
0
])
,
// input[7:0]
.
dly_data
(
data_r
[
7
:
0
])
,
// input[7:0]
.
set_idelay
(
set_pxd_delay
[
0
])
,
// input
// .set_idelay (set_pxd_delay[0]),// input
.
ld_idelay
(
ld_idelay
)
,
// input
// .ld_idelay (ld_idelay), // input
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set_idelay
(
apply_idelay
)
,
// input
.
ld_idelay
(
set_pxd_delay
[
0
])
,
// input
.
quadrant
(
quadrants
[
1
:
0
])
// input[1:0]
.
quadrant
(
quadrants
[
1
:
0
])
// input[1:0]
)
;
)
;
...
@@ -531,8 +534,11 @@ module sens_parallel12 #(
...
@@ -531,8 +534,11 @@ module sens_parallel12 #(
.
irst
(
irst
)
,
// input
.
irst
(
irst
)
,
// input
.
mclk
(
mclk
)
,
// input
.
mclk
(
mclk
)
,
// input
.
dly_data
(
data_r
[
15
:
8
])
,
// input[7:0]
.
dly_data
(
data_r
[
15
:
8
])
,
// input[7:0]
.
set_idelay
(
set_pxd_delay
[
0
])
,
// input
// .set_idelay (set_pxd_delay[0]),// input
.
ld_idelay
(
ld_idelay
)
,
// input
// .ld_idelay (ld_idelay), // input
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set_idelay
(
apply_idelay
)
,
// input
.
ld_idelay
(
set_pxd_delay
[
0
])
,
// input
.
quadrant
(
quadrants
[
1
:
0
])
// input[1:0]
.
quadrant
(
quadrants
[
1
:
0
])
// input[1:0]
)
;
)
;
`endif
`endif
...
@@ -566,8 +572,11 @@ module sens_parallel12 #(
...
@@ -566,8 +572,11 @@ module sens_parallel12 #(
// .dly_data (data_r[8*((i+2)&3)+:8]), // input[7:0] alternating bytes of 32-bit word
// .dly_data (data_r[8*((i+2)&3)+:8]), // input[7:0] alternating bytes of 32-bit word
// .set_idelay (set_pxd_delay[(i+2)>>2]),// input 0 for pxd[3:2], 1 for pxd[7:4], 2 for pxd [11:8]
// .set_idelay (set_pxd_delay[(i+2)>>2]),// input 0 for pxd[3:2], 1 for pxd[7:4], 2 for pxd [11:8]
.
dly_data
(
data_r
[
8
*
(
i
&
3
)
+:
8
])
,
// input[7:0] alternating bytes of 32-bit word
.
dly_data
(
data_r
[
8
*
(
i
&
3
)
+:
8
])
,
// input[7:0] alternating bytes of 32-bit word
.
set_idelay
(
set_pxd_delay
[
i
>>
2
])
,
// input 0 for pxd[3:2], 1 for pxd[7:4], 2 for pxd [11:8]
// .set_idelay (set_pxd_delay[i >> 2]),// input 0 for pxd[3:2], 1 for pxd[7:4], 2 for pxd [11:8]
.
ld_idelay
(
ld_idelay
)
,
// input
// .ld_idelay (ld_idelay), // input
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set_idelay
(
apply_idelay
)
,
// input
.
ld_idelay
(
set_pxd_delay
[
i
>>
2
])
,
// input
.
quadrant
(
quadrants
[
1
:
0
])
// input[1:0]
.
quadrant
(
quadrants
[
1
:
0
])
// input[1:0]
)
;
)
;
end
end
...
@@ -594,8 +603,12 @@ module sens_parallel12 #(
...
@@ -594,8 +603,12 @@ module sens_parallel12 #(
.
irst
(
irst
)
,
// input
.
irst
(
irst
)
,
// input
.
mclk
(
mclk
)
,
// input
.
mclk
(
mclk
)
,
// input
.
dly_data
(
data_r
[
7
:
0
])
,
// input[7:0]
.
dly_data
(
data_r
[
7
:
0
])
,
// input[7:0]
.
set_idelay
(
set_other_delay
)
,
// input
// .set_idelay (set_other_delay),// input
.
ld_idelay
(
ld_idelay
)
,
// input
// .ld_idelay (ld_idelay), // input
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set_idelay
(
apply_idelay
)
,
// input
.
ld_idelay
(
set_other_delay
)
,
// input
.
quadrant
(
quadrants
[
3
:
2
])
// input[1:0]
.
quadrant
(
quadrants
[
3
:
2
])
// input[1:0]
)
;
)
;
...
@@ -620,8 +633,11 @@ module sens_parallel12 #(
...
@@ -620,8 +633,11 @@ module sens_parallel12 #(
.
irst
(
irst
)
,
// input
.
irst
(
irst
)
,
// input
.
mclk
(
mclk
)
,
// input
.
mclk
(
mclk
)
,
// input
.
dly_data
(
data_r
[
15
:
8
])
,
// input[7:0]
.
dly_data
(
data_r
[
15
:
8
])
,
// input[7:0]
.
set_idelay
(
set_other_delay
)
,
// input
// .set_idelay (set_other_delay),// input
.
ld_idelay
(
ld_idelay
)
,
// input
// .ld_idelay (ld_idelay), // input
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set_idelay
(
apply_idelay
)
,
// input
.
ld_idelay
(
set_other_delay
)
,
// input
.
quadrant
(
quadrants
[
5
:
4
])
// input[1:0]
.
quadrant
(
quadrants
[
5
:
4
])
// input[1:0]
)
;
)
;
// receive clock from sensor
// receive clock from sensor
...
@@ -642,8 +658,11 @@ module sens_parallel12 #(
...
@@ -642,8 +658,11 @@ module sens_parallel12 #(
.
rst
(
mclk_rst
)
,
// input
.
rst
(
mclk_rst
)
,
// input
.
mclk
(
mclk
)
,
// input
.
mclk
(
mclk
)
,
// input
.
dly_data
(
data_r
[
23
:
16
])
,
// input[7:0]
.
dly_data
(
data_r
[
23
:
16
])
,
// input[7:0]
.
set_idelay
(
set_other_delay
)
,
// input
// .set_idelay (set_other_delay), // input
.
ld_idelay
(
ld_idelay
)
// input
// .ld_idelay (ld_idelay) // input
/// Seems to be a major old bug may need to be changed in idelay_nofine and idelay_fine_pipe (odelay too?)
.
set_idelay
(
apply_idelay
)
,
// input
.
ld_idelay
(
set_other_delay
)
// input
)
;
)
;
// generate dclk output
// generate dclk output
oddr_ss
#(
oddr_ss
#(
...
...
system_defines.vh
View file @
44928b65
...
@@ -64,9 +64,10 @@
...
@@ -64,9 +64,10 @@
`define PRELOAD_BRAMS
`define PRELOAD_BRAMS
`define DISPLAY_COMPRESSED_DATA
`define DISPLAY_COMPRESSED_DATA
// if HISPI is not defined, parallel sensor interface is used for all channels
// if HISPI is not defined, parallel sensor interface is used for all channels
`define BOSON 1 /*************** CHANGE here and x393_hispi/x393_parallel/x393_lwir
in bitstream tool settings ****************/
// `define BOSON 1 /*************** CHANGE here and x393_hispi/x393_parallel/x393_lwir/x393_boson
in bitstream tool settings ****************/
// `define LWIR /*************** CHANGE here and x393_hispi/x393_parallel/x393_lwir in bitstream tool settings ****************/
// `define LWIR /*************** CHANGE here and x393_hispi/x393_parallel/x393_lwir in bitstream tool settings ****************/
// `define HISPI /*************** CHANGE here and x393_hispi/x393_parallel in bitstream tool settings ****************/
// `define HISPI /*************** CHANGE here and x393_hispi/x393_parallel in bitstream tool settings ****************/
// also change in utilization and timimg summary tools (x393_parallel_utilization.report, ...)
`ifdef BOSON
`ifdef BOSON
`elsif LWIR
`elsif LWIR
...
...
timing/camsync393.v
View file @
44928b65
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
//`define GENERATE_TRIG_OVERDUE 1
//`define GENERATE_TRIG_OVERDUE 1
`undef
GENERATE_TRIG_OVERDUE
`undef
GENERATE_TRIG_OVERDUE
module
camsync393
#(
module
camsync393
#(
parameter
CAMSYNC_ADDR
=
'h
160
,
//TODO: assign valid address
parameter
CAMSYNC_ADDR
=
'h
708
,
//TODO: assign valid address
parameter
CAMSYNC_MASK
=
'h7f8
,
parameter
CAMSYNC_MASK
=
'h7f8
,
parameter
CAMSYNC_MODE
=
'h0
,
parameter
CAMSYNC_MODE
=
'h0
,
parameter
CAMSYNC_TRIG_SRC
=
'h1
,
// setup trigger source
parameter
CAMSYNC_TRIG_SRC
=
'h1
,
// setup trigger source
...
...
x393_parallel.bit
View file @
44928b65
No preview for this file type
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