Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha - Gateware
Commits
9f76ed4d
Commit
9f76ed4d
authored
Mar 10, 2020
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[hdl] expose SERDES PLL lock status to CSR
Signed-off-by:
Dimitris Lampridis
<
dimitris.lampridis@cern.ch
>
parent
1330c85a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
ltc2174_2l16b_receiver.vhd
hdl/platform/xilinx/spartan6/ltc2174_2l16b_receiver.vhd
+6
-4
fmc_adc_100Ms_core.vhd
hdl/rtl/fmc_adc_100Ms_core.vhd
+11
-1
No files found.
hdl/platform/xilinx/spartan6/ltc2174_2l16b_receiver.vhd
View file @
9f76ed4d
...
...
@@ -61,6 +61,9 @@ entity ltc2174_2l16b_receiver is
serdes_arst_i
:
in
std_logic
:
=
'0'
;
-- Manual bitslip command (optional)
serdes_bslip_i
:
in
std_logic
:
=
'0'
;
-- SERDES BUFPLL lock status flag
-- (used when g_USE_PLL=TRUE, otherwise it is tied to '1')
serdes_locked_o
:
out
std_logic
;
-- Indication that SERDES is ok and locked to
-- frame start pattern
serdes_synced_o
:
out
std_logic
;
...
...
@@ -81,7 +84,6 @@ architecture arch of ltc2174_2l16b_receiver is
signal
adc_outb
:
std_logic_vector
(
3
downto
0
);
signal
clk_serdes_p
:
std_logic
;
signal
clk_serdes_n
:
std_logic
;
signal
bufpll_locked
:
std_logic
;
signal
clk_div_buf
:
std_logic
;
signal
serdes_strobe
:
std_logic
:
=
'0'
;
signal
serdes_auto_bslip
:
std_logic
:
=
'0'
;
...
...
@@ -232,7 +234,7 @@ begin -- architecture arch
DIVIDE
=>
8
)
port
map
(
IOCLK
=>
clk_serdes_p
,
LOCK
=>
bufpll_locked
,
LOCK
=>
serdes_locked_o
,
SERDESSTROBE
=>
serdes_strobe
,
GCLK
=>
clk_div_buf
,
LOCKED
=>
l_pll_locked
,
...
...
@@ -282,7 +284,7 @@ begin -- architecture arch
O
=>
clk_div_buf
);
-- not used in this case
bufpll_locked
<=
'1'
;
serdes_locked_o
<=
'1'
;
end
generate
gen_dual_bufio2
;
...
...
@@ -316,7 +318,7 @@ begin -- architecture arch
end
process
p_auto_bitslip
;
serdes_bitslip
<=
serdes_auto_bslip
or
serdes_bslip_i
;
serdes_synced_o
<=
serdes_synced
and
bufpll_locked
;
serdes_synced_o
<=
serdes_synced
;
------------------------------------------------------------------------------
-- Data deserializer
...
...
hdl/rtl/fmc_adc_100Ms_core.vhd
View file @
9f76ed4d
...
...
@@ -177,6 +177,8 @@ architecture rtl of fmc_adc_100Ms_core is
signal
serdes_out_data_synced
:
std_logic_vector
(
63
downto
0
);
signal
serdes_man_bitslip
:
std_logic
;
signal
serdes_man_bitslip_sync
:
std_logic
;
signal
serdes_locked
:
std_logic
;
signal
serdes_locked_sync
:
std_logic
;
signal
serdes_synced
:
std_logic
;
signal
serdes_synced_sync
:
std_logic
;
...
...
@@ -455,6 +457,7 @@ begin
adc_outb_n_i
=>
adc_outb_n_i
,
serdes_arst_i
=>
serdes_arst
,
serdes_bslip_i
=>
serdes_man_bitslip_sync
,
serdes_locked_o
=>
serdes_locked
,
serdes_synced_o
=>
serdes_synced
,
adc_data_o
=>
serdes_out_data
,
adc_clk_o
=>
fs_clk
);
...
...
@@ -466,6 +469,13 @@ begin
d_i
=>
serdes_synced
,
q_o
=>
serdes_synced_sync
);
cmp_serdes_locked_sync
:
gc_sync
port
map
(
clk_i
=>
sys_clk_i
,
rst_n_a_i
=>
'1'
,
d_i
=>
serdes_locked
,
q_o
=>
serdes_locked_sync
);
------------------------------------------------------------------------------
-- ADC core control and status registers (CSR)
------------------------------------------------------------------------------
...
...
@@ -479,7 +489,7 @@ begin
fmc_adc_100Ms_csr_o
=>
csr_regout
);
csr_regin
.
sta_fsm
<=
acq_fsm_state
;
csr_regin
.
sta_serdes_pll
<=
'1'
;
csr_regin
.
sta_serdes_pll
<=
serdes_locked_sync
;
csr_regin
.
sta_serdes_synced
<=
serdes_synced_sync
;
csr_regin
.
sta_acq_cfg
<=
acq_config_ok
;
csr_regin
.
trig_stat_ext
<=
trig_storage
(
0
);
...
...
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