Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

VHDL for FPGA Design/4-Bit BCD Counter with Clock Enable

From Wikibooks, open books for an open world
<VHDL for FPGA Design
VHDL for FPGA Design

4-Bit BCD Up Counter with Clock Enable

[edit |edit source]
libraryIEEE;useIEEE.STD_LOGIC_1164.ALL;useIEEE.STD_LOGIC_ARITH.ALL;useIEEE.STD_LOGIC_UNSIGNED.ALL;entityCounter2_VHDLisport(Clock_enable_B:instd_logic;Clock:instd_logic;Reset:instd_logic;Output:outstd_logic_vector(0to3));endCounter2_VHDL;architectureBehavioralofCounter2_VHDLissignaltemp:std_logic_vector(0to3);beginprocess(Clock,Reset)beginifReset='1'thentemp<="0000";elsif(rising_edge(Clock))thenifClock_enable_B='0'theniftemp="1001"thentemp<="0000";elsetemp<=temp+1;endif;endif;endif;endprocess;Output<=temp;endBehavioral;

Simulation Results

[edit |edit source]
Retrieved from "https://en.wikibooks.org/w/index.php?title=VHDL_for_FPGA_Design/4-Bit_BCD_Counter_with_Clock_Enable&oldid=3812776"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp