⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cal_ctl.vhd

📁 XILINX memory interface generator. XILINX的外部存储器接口。
💻 VHD
📖 第 1 页 / 共 2 页
字号:
				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) = "01010") and (trans_twoDtct = '0')) then
            		if (flop_10_11 = '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) = "01011") and (trans_twoDtct = '0')) then
            		if (flop_11_12 = '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) = "01100") and (trans_twoDtct = '0')) then
            		if (flop_12_13 = '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) = "01101") and (trans_twoDtct = '0')) then
            		if (flop_13_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 (flop_14_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 (flop_15_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 (flop_16_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 (flop_17_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 (flop_18_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 (flop_19_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 (flop_20_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 (flop_21_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 (flop_22_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 (flop_23_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 (flop_24_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 (flop_25_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 (flop_26_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 (flop_27_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 (flop_28_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 (flop_29_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 (flop_30_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 > "01100"))   then
					tapForDqs_val_rl <= tap6;
		      	elsif (phase_cnt < "01000") then
					tapForDqs_val_rl <= tap3;
		      	elsif (phase_cnt < "01011") then
					tapForDqs_val_rl <= tap4;	
			      else	
					tapForDqs_val_rl <= tap5;
		      	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 <= tap6;
		      	elsif (phase_cnt < "01010") then
					tapForDqs_val_tb <= tap1;
		      	elsif (phase_cnt < "01011") then
					tapForDqs_val_tb <= tap2;	
		      	elsif (phase_cnt < "01100") then
					tapForDqs_val_tb <= tap3;	
		      	elsif (phase_cnt < "01110") then
					tapForDqs_val_tb <= tap4;	
				else	
					tapForDqs_val_tb <= tap5;
		      	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 + -