# 四輸入投票器  * 班 級:資工二2 * 姓 名:黃柏諭 * 指導老師:林宏益 --- # 實驗內容 * **實驗目的:** 用case改寫原先的四輸入投票器 * **運用軟體:** VS Code & GTKWAVE * **實驗步驟:** 1. 將原先以if寫的RTL code改為以case撰寫。 2. 按照輸入輸出,撰寫testbench。 3. 運用Makefile產生.vcd檔。 4. 使用GTKWAVE產生波形圖。 --- # 程式碼 * input_4_vote_tb.v {%gist 7608755ed6a2af765c199224822993fc %} * input_4_vote.v {%gist 4455cba3a1272df5a01be78f185d1543 %} * Makefile {%gist d511423c64f5112879aeacc40e6684c8 %} --- # 實驗結果  --- # 結論心得 這次嘗試寫了Testbench檔案,難度頗高的,但照著先前3對8多工器的tb.v檔案的參考,最後還是成功寫出這次的作業,也特別感謝84號同學的指導。 在這是RTL Code中,原本想說只用1個case就將RTL Code寫出來,不過,在default狀況不足的情況下,會有unknow的情形出現,因此最後採用了3個case的方式撰寫。 [我的GitHub檔案](https://github.com/Midorante/4-input-voting-machine.git)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up