




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、四、課程設計的總體步驟1、單個字符的顯示(如:黃):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity xianshi isport( clk2:in std_logic;rck,sck:out std_logic;si:out std_logic);end ;architecture one of xianshi issignal sel:std_logic_vector(3 downto 0);signal q: std_logic_vector(31 downto 0);signa
2、l i:integer range 0 to 31;signal coi:std_logic;begin process(sel,clk1)begincase sel is when others =>null; end case; if clk1'event and clk1='1'then si<=q(i);i<=i+1;coi<='0' if i=31 then i<=0;coi<='1'sel<=sel+'1' end if; rck<=not coi; end if
3、;end process;sck<=clk1;end ;時序仿真:從圖中可以看出,當clk1在第32個上升沿rck變為低電頻,sck與clk1是同一電頻,故此程序滿足要求。 2、多個字符的跳動顯示(如:黃小紅):library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity xianshi isport( clk1:in std_logic;clk2:in std_logic;rck,sck:out std_logic;si:out std_logic);end ;architecture o
4、ne of xianshi issignal lie:std_logic_vector(3 downto 0);signal sel:std_logic_vector(3 downto 0);signal q: std_logic_vector(31 downto 0);signal i:integer range 0 to 31;signal coi:std_logic;begin process(sel,clk1,clk2)beginif clk2'event and clk2='1' then lie<=lie+'1' end if; cas
5、e lie is when "0000"=> case sel is when others =>null; end case; when"0001"=> case sel is when others =>null; end case; when"0010"=> case sel is when others =>null; end case; when others=>null; end case; if clk1'event and clk1='1'then si
6、<=q(i);i<=i+1;coi<='0' if i=31 then i<=0;coi<='1'sel<=sel+'1' end if; rck<=not coi; end if;end process;sck<=clk1;end ; 時序仿真:從上圖看出,當clk1在第32個上升沿rck變為低電頻,sck與clk1是同一電頻,故此程序滿足要求。3、漢字的滾動和動畫顯示(如:黃小紅+笑臉):library ieee;use ieee.std_logic_1164.all;use ieee.std_
7、logic_unsigned.all;entity xianshi isport( clk1:in std_logic;clk2:in std_logic;rck,sck:out std_logic;si:out std_logic);end ;architecture one of xianshi issignal lie:std_logic_vector(3 downto 0);signal sel:std_logic_vector(3 downto 0);signal q: std_logic_vector(31 downto 0);signal i:integer range 0 to
8、 31;signal coi:std_logic;begin process(sel,clk1,clk2)beginif clk2'event and clk2='1' then lie<=lie+'1' end if; case lie is when "0000"=> case sel is when others =>null; end case; when"0001"=> case sel is when others =>null; end case; when"0
9、010"=> case sel is when others =>null; end case; when"0011"=> case sel is when others =>null; end case; when"0100"=> case sel is when others =>null; end case; when"0101"=> case sel is when others =>null; end case; when"0110"=> c
10、ase sel is when others =>null; end case; when"0111"=> case sel is when others =>null; end case; when"1000"=> case sel is when others =>null; end case; when"1001"=> case sel is when others =>null; end case; when"1010"=> case sel is when
11、others =>null; end case; when"1011"=> case sel is when others =>null; end case; when"1100"=> case sel is when others =>null; end case; when"1101"=> case sel is when others =>null; end case; when"1110"=> case sel is when others =>null
12、; end case; when"1111"=> case sel is when others =>null; end case;when others =>null; end case; if clk1'event and clk1='1'then si<=q(i);i<=i+1;coi<='0' if i=31 then i<=0;coi<='1'sel<=sel+'1' end if; rck<=not coi; end if;end
13、process;sck<=clk1;end ;時序仿真:從上圖看出,當clk1在第32個上升沿rck變為低電頻,sck與clk1是同一電頻,si為輸出電頻,故此程序滿足要求。五、結論與收獲在三周的EDA課程設計過程中,我對VHDL語言有了更加深刻的認識。VHDL是超高速集成電路的硬件描述語言,它能夠描述硬件的結構、行為與功能。另外,VHDL具有并發性,采用自上而下的結構式設計方法,適合大型設計工程的分工合作。在編寫程序的時候,我才發現能看懂程序和能自己寫程序是兩個完全不同的概念,自己一開始寫程序時,即便是一個很簡單的功能模塊,在編譯時也可能產生很多錯誤,在不斷的改錯過程中,自己對VHDL語言的語法結構有了深刻的理解,對編譯過程中常見的錯誤也有了全面的認識。通過這十三周的課程設計,我在熟悉了基于FPGA設計的同時,也學到了很多在學習課本知識時所體會不到的東西。完成此次設計后,我不僅能對Quartus II開發仿真軟件熟練操作,能達到學以致用,同時還掌握了矩陣鍵盤和16×16點陣的工作原理。經過這一過程,我發現平常的學習在注重理論知識的掌握同時,要加強實驗環節,只有通過不斷
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 幼兒園安全演練評估與改進計劃
- 2025年幼兒園中班第一學期師生互動計劃
- 小學二年級上學期課程改進工作計劃
- 七年級(上)道德與法治項目學習計劃
- 2025名師工作室人才培養計劃
- 人教版物理課堂管理與教學計劃
- 學生心理健康輔導工作計劃
- 小學畢業班學業評估工作計劃
- 電商行業管培生全方位培訓計劃
- 車位尾盤包銷合同協議
- 2025年二級風力發電運維值班員職業技能鑒定考試題庫(濃縮500題)
- 江蘇省南京市、鹽城市2025屆高三年級5月第二次模擬考試化學試題及答案(南京鹽城二模)
- 2025新能源汽車技術的應急管理策略試題及答案
- 中國世界文化遺產長城的資料整理
- GB/T 18656-2002工業系統、裝置與設備以及工業產品系統內端子的標識
- 文獻閱讀技巧課件
- 一年級數學下冊-應用題專項練習
- 2021人教版新教材高中英語必修三全冊課文翻譯(中英文Word)
- 研究生入學體檢表
- 工控培訓教程、手冊合集倍福plc從入門到精通
- 三年級下冊美術教案-第11課 門票設計-非遺館|浙美版
評論
0/150
提交評論