Commit 2f78019e authored by Tristan Gingold's avatar Tristan Gingold

sys: change patterns, also resync serdes

parent 46a5100e
......@@ -27,6 +27,7 @@ architecture arch of diot_sys_patterns is
begin
process (clk_100m_i)
variable patcnt : unsigned (11 downto 0);
variable sl : unsigned(3 downto 0);
begin
if rising_edge(clk_100m_i) then
if rst_100m_n_i = '0' then
......@@ -37,12 +38,13 @@ begin
end if;
for i in samples_o'range loop
for j in 0 to 7 loop
samples_o (i)(j) <= std_logic_vector
(patcnt (7 downto 0) & to_unsigned (j + i*8, 4));
sl := to_unsigned(j + 1, 4);
samples_o (i)(j) <= std_logic_vector (sl & sl & sl);
-- (patcnt (7 downto 0) & to_unsigned (j + i*8, 4));
end loop;
samples_o (i)(7) <= std_logic_vector (patcnt);
samples_o (i)(6) <=
std_logic_vector (to_unsigned (6 + i*8, 8) & "0000");
-- samples_o (i)(7) <= std_logic_vector (patcnt);
-- samples_o (i)(6) <=
-- std_logic_vector (to_unsigned (6 + i*8, 8) & "0000");
end loop;
end if;
end if;
......
......@@ -130,6 +130,7 @@ begin
dat_o => samples (i),
locking_i => lock,
locked_o => locked (i),
resync_i => resync_i,
freeze_delays_i => freeze_delays_i,
stat_sel_ch_i => stat_sel_ch_i,
stat_sel_dl_i => stat_sel_dl_i,
......
......@@ -27,6 +27,9 @@ entity sys_fsi_rx is
-- Locking status
locked_o : out std_logic;
-- Resync serdes
resync_i : std_logic;
-- Do not change delays when set.
freeze_delays_i : std_logic;
......@@ -315,7 +318,7 @@ begin
process (clk_100m_i) is
begin
if rising_edge(clk_100m_i) then
if rst_n_i = '0' then
if rst_n_i = '0' or resync_i = '1' then
cntvalue <= to_unsigned(250, 9);
dly <= (others => '1');
load <= '0';
......@@ -412,7 +415,7 @@ begin
process (clk_100m_i) is
begin
if rising_edge(clk_100m_i) then
if rst_n_i = '0' then
if rst_n_i = '0' or resync_i = '1' then
locked (i) <= '0';
lock_cnt <= 0;
bitslip_cnt <= (others => '0');
......
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