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

📄 16cunter.vhd

📁 这是一个SD卡的TESTBENCH,源码中有如何产生一个特定的命令序列的样例。支持产生任何的SD卡交互过程中用到的命令序列。
💻 VHD
字号:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity Counter16 is 
	port(Clock:in std_logic:='0';
	Count:out std_logic_vector(3 downto 0):="0110");
end entity;
architecture Counter16Arc of Counter16 is
--signal CountVar:std_logic_vector(3 downto 0):="0110"; 
signal CountTest:integer:=0;
begin
	MainProcess:
	process(Clock)
	begin
		variable CountVar:std_logic_vector(3 downto 0);
		
		if Clock='1' and Clock'event then --and Clock'event then 
		--	Count<="1111";
		--else
			--Count<="0000";
			if CountTest+1<16 then
				CountTest<=CountTest+1;
			else
				CountTest<=0;
			end if;
			if CountVar+1<16 then 
				CountVar:=CountVar+1;
			else
				CountVar:="0000";
			end if;
		end if;
		Count<=CountVar;
	end process;
end architecture;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -