📄 cal_ctl.vhd
字号:
if (flop2(13)='1' xor flop2(14)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "01110") and (trans_twoDtct = '0')) then
if (flop2(14)='1' xor flop2(15)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "01111") and (trans_twoDtct = '0')) then
if (flop2(15)='1' xor flop2(16)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10000") and (trans_twoDtct = '0')) then
if (flop2(16)='1' xor flop2(17)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10001") and (trans_twoDtct = '0')) then
if (flop2(17)='1' xor flop2(18)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10010") and (trans_twoDtct = '0')) then
if (flop2(18)='1' xor flop2(19)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10011") and (trans_twoDtct = '0')) then
if (flop2(19)='1' xor flop2(20)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10100") and (trans_twoDtct = '0')) then
if (flop2(20)='1' xor flop2(21)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10101") and (trans_twoDtct = '0')) then
if (flop2(21)='1' xor flop2(22)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10110") and (trans_twoDtct = '0')) then
if (flop2(22)='1' xor flop2(23)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "10111") and (trans_twoDtct = '0')) then
if (flop2(23)='1' xor flop2(24)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "11000") and (trans_twoDtct = '0')) then
if (flop2(24)='1' xor flop2(25)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "11001") and (trans_twoDtct = '0')) then
if (flop2(25)='1' xor flop2(26)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "11010") and (trans_twoDtct = '0')) then
if (flop2(26)='1' xor flop2(27)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "11011") and (trans_twoDtct = '0')) then
if (flop2(27)='1' xor flop2(28)='1' ) then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "11100") and (trans_twoDtct = '0')) then
if (flop2(28)='1' xor flop2(29)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "11101") and (trans_twoDtct = '0')) then
if (flop2(29)='1' xor flop2(30)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
elsif ((cnt(4 downto 0) = "11110") and (trans_twoDtct = '0')) then
if (flop2(30)='1' xor flop2(31)='1') then
if(trans_oneDtct = '1' and enb_trans_two_dtct ='1') then
trans_twoDtct <= '1';
else
trans_oneDtct <= '1';
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
else
trans_oneDtct <= trans_oneDtct;
trans_twoDtct <= trans_twoDtct;
end if;
end if;
end if;
end process;
process ( clk)
begin
if clk'event and clk ='1' then
if(reset= '1') then
tapForDqs_val_rl <= defaultTap;
else
if((cnt(4) = '1') and (cnt(3) = '1') and (cnt(2) = '1') and (cnt(1) = '1') and (cnt(0) = '1')) then
if ((trans_oneDtct = '0') or (trans_twoDtct = '0') or (phase_cnt > "01011")) then
tapForDqs_val_rl <= tap4;
elsif (phase_cnt > "01000") then
tapForDqs_val_rl <= tap3;
else
tapForDqs_val_rl <= tap2;
end if;
else
tapForDqs_val_rl <= tapForDqs_val_rl;
end if;
end if;
end if;
end process;
process ( clk)
begin
if clk'event and clk ='1' then
if(reset= '1') then
tapForDqs_val_tb <= defaultTap;
else
if((cnt(4) = '1') and (cnt(3) = '1') and (cnt(2) = '1') and (cnt(1) = '1') and (cnt(0) = '1')) then
if ((trans_oneDtct = '0') or (trans_twoDtct = '0') or (phase_cnt > "01110")) then
tapForDqs_val_tb <= tap5;
elsif (phase_cnt < "01000") then
tapForDqs_val_tb <= tap1;
elsif (phase_cnt < "01001") then
tapForDqs_val_tb <= tap2;
elsif (phase_cnt < "01010") then
tapForDqs_val_tb <= tap3;
elsif (phase_cnt < "01100") then
tapForDqs_val_tb <= tap4;
else
tapForDqs_val_tb <= tap1;
end if;
else
tapForDqs_val_tb <= tapForDqs_val_tb;
end if;
end if;
end if;
end process;
end arc_cal_ctl;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -