中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

濰坊營銷型網(wǎng)站建設(shè)防止惡意點擊軟件管用嗎

濰坊營銷型網(wǎng)站建設(shè),防止惡意點擊軟件管用嗎,免費安裝電腦wordpress,北京微信小程序忽如一夜春風(fēng)來,千樹萬樹梨花開 —— 《白雪歌誦武判官歸京》 岑參 【唐】 目錄 簡易數(shù)字鐘 要點剖析: 逐步分析: 端口說明: 代碼展示: 分部解釋: 代碼編譯結(jié)果: 提醒 : …

忽如一夜春風(fēng)來,千樹萬樹梨花開

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? —— 《白雪歌誦武判官歸京》? 岑參? 【唐】


目錄

簡易數(shù)字鐘

要點剖析:?

?逐步分析:

端口說明:

代碼展示:

分部解釋:

代碼編譯結(jié)果:

提醒 :

仿真實例:

仿真結(jié)果:

?編輯?

求一個免費的贊,也可以點一點關(guān)注,十分感謝

簡易數(shù)字鐘代碼和PPT


通過網(wǎng)盤分享的文件:簡易數(shù)字鐘.zip
鏈接: https://pan.baidu.com/s/1oQ3v6up_G5D2VKsISCRmBQ?pwd=0406

提取碼: 0406

為大家?guī)頂?shù)電課設(shè)(簡易數(shù)字鐘)的教程。本教程基于Quartus Ⅱ來編寫代碼,進行仿真。文章內(nèi)有代碼,仿真報告,答辯PPT,按需自取。

簡易數(shù)字鐘

大家先看一看上面的題目和其要求實現(xiàn)的功能。

要點剖析:?

  1. 利用quartus軟件,基于VHDL語言來編寫。
  2. 時,分,秒三個計數(shù)器,分別是二十四進制計數(shù)器和六十進制計數(shù)器。
  3. 鬧鐘功能,并且設(shè)定時間,到時間鳴叫30秒。
  4. 具有整點報時功能,到預(yù)定時間鳴叫10秒。
  5. 完成仿真,具有基本功能。

?逐步分析:

1.對于這一點大家從b站找教程或者某寶找人遠程下載,對于vhdl語言大家可以自行學(xué)習(xí),這個課設(shè)需要的代碼造詣不高,大家完全可以自學(xué)(相較于C++就十分簡單了)。

2.計時器,VHDL代碼內(nèi)有基本的語法結(jié)構(gòu),我們只需要知道二十四位計數(shù)器需要五位二進制數(shù),六十進制計數(shù)器需要六位二進制數(shù),這就ok了。

3.鬧鐘功能,這個就需要我們獨立設(shè)計邏輯。

4.整點報時基本和鬧鐘功能有著類似的代碼邏輯,大家看后續(xù)代碼。

5.仿真,大家就利用軟件內(nèi)置的來做。

端口說明:

代碼展示:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;entity Simple_Clock isport(clk : in std_logic; reset : in std_logic;set_alarm : in std_logic;alarm_time_sec : in std_logic_vector(5 downto 0);alarm_time_min : in std_logic_vector(5 downto 0);alarm_time_hour : in std_logic_vector(4 downto 0);alarm_out : out std_logic;chime_out : out std_logic;sec_out : out std_logic_vector(5 downto 0);min_out : out std_logic_vector(5 downto 0);hour_out : out std_logic_vector(4 downto 0));
end entity Simple_Clock;architecture Behavioral of Simple_Clock issignal sec_count : unsigned(5 downto 0) := (others => '0');--六位無符號數(shù),初始全為0signal min_count : unsigned(5 downto 0) := (others => '0');signal hour_count : unsigned(4 downto 0) := (others => '0');signal alarm_active : std_logic := '0';--表示鬧鐘是否激活signal chime_active : std_logic := '0';--表示整點報時是否激活signal alarm_timer : unsigned(4 downto 0) := (others => '0');--鬧鐘激活后的計時signal chime_timer : unsigned(3 downto 0) := (others => '0');signal alarm_time_sec_u : unsigned(5 downto 0);--類型轉(zhuǎn)換為無符號的數(shù)signal alarm_time_min_u : unsigned(5 downto 0);signal alarm_time_hour_u : unsigned(4 downto 0);
begin-- 轉(zhuǎn)換輸入為unsigned類型alarm_time_sec_u <= unsigned(alarm_time_sec);alarm_time_min_u <= unsigned(alarm_time_min);alarm_time_hour_u <= unsigned(alarm_time_hour);-- 秒計數(shù)器process(clk, reset)--上下限beginif reset = '1' then-- 重置所有信號sec_count <= (others => '0');min_count <= (others => '0');hour_count <= (others => '0');alarm_active <= '0';chime_active <= '0';alarm_timer <= (others => '0');chime_timer <= (others => '0');elsif rising_edge(clk) then-- 秒計數(shù)邏輯if sec_count = 59 thensec_count <= (others => '0');if min_count = 59 thenmin_count <= (others => '0');if hour_count = 23 thenhour_count <= (others => '0');elsehour_count <= hour_count + 1;end if;elsemin_count <= min_count + 1;end if;elsesec_count <= sec_count + 1;end if;-- 鬧鐘邏輯if alarm_active = '1' and alarm_timer < 30 then--如果激活鬧鐘,那么鬧鐘計時小于30秒則加一,響鈴一段時間alarm_timer <= alarm_timer + 1;elsif alarm_timer >= 30 then--大于三十則清零,便于下次計時alarm_active <= '0';alarm_timer <= (others => '0');end if;-- 整點報時邏輯if chime_active = '1' and chime_timer < 10 thenchime_timer <= chime_timer + 1;elsif chime_timer >= 10 thenchime_active <= '0';--關(guān)閉計時狀態(tài)chime_timer <= (others => '0');end if;-- 激活鬧鐘和整點報時if set_alarm = '1' and sec_count = alarm_time_sec_u and min_count = alarm_time_min_u and hour_count = alarm_time_hour_u thenalarm_active <= '1';--啟動鬧鐘alarm_timer <= (others => '0');elsif sec_count = 0 and min_count = 0 then--分,秒為零,意味著整點chime_active <= '1';chime_timer <= (others => '0');end if;end if;end process;-- 輸出信號alarm_out <= alarm_active;chime_out <= chime_active;sec_out <= std_logic_vector(sec_count);min_out <= std_logic_vector(min_count);hour_out <= std_logic_vector(hour_count);
end architecture Behavioral;

分部解釋:

-- 秒計數(shù)器process(clk, reset)--上下限beginif reset = '1' then-- 重置所有信號sec_count <= (others => '0');min_count <= (others => '0');hour_count <= (others => '0');alarm_active <= '0';chime_active <= '0';alarm_timer <= (others => '0');chime_timer <= (others => '0');elsif rising_edge(clk) then這里首先編寫了一個關(guān)于清零的功能(類似于函數(shù),但是并不調(diào)用)
是全部清零,包括鬧鐘的計時,時鐘的計時都是會清零的,類似于恢復(fù)出廠設(shè)置-- 秒計數(shù)邏輯if sec_count = 59 thensec_count <= (others => '0');if min_count = 59 thenmin_count <= (others => '0');if hour_count = 23 thenhour_count <= (others => '0');elsehour_count <= hour_count + 1;end if;elsemin_count <= min_count + 1;end if;elsesec_count <= sec_count + 1;end if;這就是計時功能的相關(guān)代碼,我們編寫了計時功能,只要秒鐘累加到59,那么下一次就會分鐘加1,只要分鐘累加到59,那么就會時鐘加1。如果時鐘累加到23,那么就會清零。-- 鬧鐘邏輯if alarm_active = '1' and alarm_timer < 30 then--如果激活鬧鐘,那么鬧鐘計時小于30秒則加一,響鈴一段時間alarm_timer <= alarm_timer + 1;elsif alarm_timer >= 30 then--大于三十則清零,便于下次計時alarm_active <= '0';alarm_timer <= (others => '0');end if;-- 整點報時邏輯if chime_active = '1' and chime_timer < 10 thenchime_timer <= chime_timer + 1;elsif chime_timer >= 10 thenchime_active <= '0';--關(guān)閉計時狀態(tài)chime_timer <= (others => '0');end if;兩個功能的邏輯十分相似,都有一個置1且相關(guān)計時小于我們要求響鈴的時長(鬧鐘 30;報時 10)那么就會響鈴一段時間,如果功能內(nèi)部的timer大于要求響鈴的時長,那么timer就會清零,便于我們下一次使用-- 激活鬧鐘和整點報時if set_alarm = '1' and sec_count = alarm_time_sec_u and min_count = alarm_time_min_u and hour_count = alarm_time_hour_u thenalarm_active <= '1';--啟動鬧鐘alarm_timer <= (others => '0');elsif sec_count = 0 and min_count = 0 then--分,秒為零,意味著整點chime_active <= '1';chime_timer <= (others => '0');end if;end if;end process;激活鬧鐘,首先要set_alarm = '1',然后給鬧鐘制定時間,到時間就會自動響鈴。
激活整點報時,我們不需要set這個邏輯(因為整點報時是一直開著的),當(dāng)分和秒為零,那么就意味著整點,即可以響鈴

代碼編譯結(jié)果:

?

提醒 :

清零之后鬧鐘會響鈴!這是因為我的代碼中設(shè)置了在清零后鬧鐘響鈴的程序(只要在鬧鐘打開的時間內(nèi)清零,鬧鐘在清零結(jié)束后就會響鈴)。我認為是有用的,也可以當(dāng)作防偽標(biāo)志。

仿真實例:

定時鬧鐘在45分時響鈴。

仿真結(jié)果:

大家可以看一看ppt從中可以找到更多細節(jié)。?

求一個免費的贊,也可以點一點關(guān)注,十分感謝

http://www.risenshineclean.com/news/2697.html

相關(guān)文章:

  • 做論壇網(wǎng)站要辦理什么證件百度站長工具抓取診斷
  • 古田住房與建設(shè)局網(wǎng)站aso優(yōu)化違法嗎
  • 用sublime text做網(wǎng)站查詢網(wǎng)站服務(wù)器
  • 哪里做網(wǎng)站比較好關(guān)鍵詞的作用
  • 做網(wǎng)站實名認證總是失敗怎么回事我們seo
  • 北京網(wǎng)站設(shè)計公司youx成都柚米科技15寧波seo外包推廣排名
  • 門戶網(wǎng)站廣告是什么專門做排名的軟件
  • nba網(wǎng)站建設(shè)營銷技巧五步推銷法
  • 做資源網(wǎng)站需要什么seo優(yōu)化關(guān)鍵詞0
  • 深圳建工是國企還是私企武漢seo公司哪家好
  • 尋找做網(wǎng)站的廣告網(wǎng)站策劃方案
  • 幫你省網(wǎng)站怎么做優(yōu)秀的軟文廣告案例
  • 有贊商城官網(wǎng)登錄旺道seo網(wǎng)站優(yōu)化大師
  • 常平網(wǎng)站仿做百度手機衛(wèi)士
  • 網(wǎng)站優(yōu)化網(wǎng)千鋒教育培訓(xùn)機構(gòu)怎么樣
  • 做色情網(wǎng)站多久會被抓網(wǎng)絡(luò)營銷服務(wù)
  • 泉州市住房和城鄉(xiāng)建設(shè)部網(wǎng)站南寧網(wǎng)站優(yōu)化公司電話
  • 自制游戲軟件seo怎樣
  • 網(wǎng)站做維恩圖公司網(wǎng)站制作教程
  • 合肥軟件外包公司關(guān)鍵詞優(yōu)化排名查詢
  • 南寧微信網(wǎng)站制作周口網(wǎng)絡(luò)推廣哪家好
  • 做網(wǎng)站優(yōu)化要多少錢廣州網(wǎng)絡(luò)seo優(yōu)化
  • 網(wǎng)站名字大全有哪些鄭州網(wǎng)站優(yōu)化外包
  • 網(wǎng)站建設(shè)微信商城多少錢病毒式營銷案例
  • wordpress摘要添加省略號鄂州網(wǎng)站seo
  • 網(wǎng)站的收費標(biāo)準(zhǔn)品牌運營策劃
  • 建設(shè)網(wǎng)站怎么掙錢廣東網(wǎng)約車漲價
  • 山東自助seo建站商丘seo外包
  • 卡地亞手表官方網(wǎng)站查詢上海seo優(yōu)化服務(wù)公司
  • 展示型企業(yè)網(wǎng)站有哪些推廣普通話黑板報