?? sel.vhd
字號:
-----------------------------------------------------------------------
--該模塊實(shí)現(xiàn)在停車場有汽車時,對8×8點(diǎn)陣的列選信號的確定
--本設(shè)計中列選信號是每過一個時鐘周期就變化一次的
--通過這種快速的掃描實(shí)時輸出停車場狀態(tài)信息(即有沒有有汽車進(jìn)出)
-----------------------------------------------------------------------
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity sel is
port(
clk: in std_logic;
q : out std_logic_vector(2 downto 0)
);
end sel;
architecture sel of sel is
begin
process(clk)
variable cnt:std_logic_vector(2 downto 0);
begin
if clk'event and clk='1' then
cnt:=cnt+1;
end if;
q<=cnt;
end process;
end sel;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -