티스토리 뷰
5-6-7 반복 카운터
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity counter_567 is port( nRst : in std_logic; clk : in std_logic; q : out std_logic_vector(2 downto 0) ); end counter_567; architecture BEH of counter_567 is signal cnt : std_logic_vector(2 downto 0); begin process(nRst, clk) begin if(nRst = '0') then cnt <= "101"; elsif rising_edge(clk) then if(cnt = 7) then cnt <= "101"; else cnt <= cnt + 1; end if; end if; end process; q <= cnt; end BEH; | cs |
16진 카운터
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity counter_16 is port( nRst : in std_logic; clk : in std_logic; q : out std_logic_vector(3 downto 0) ); end counter_16; architecture BEH of counter_16 is signal cnt : std_logic_vector(3 downto 0); begin process(nRst, clk) begin if(nRst = '0') then cnt <= (others => '0'); elsif rising_edge(clk) then cnt <= cnt + 1; end if; end process; q <= cnt; end BEH; | cs |
10진 카운터
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity counter_10 is port( nRst : in std_logic; clk : in std_logic; q : out std_logic_vector(3 downto 0) ); end counter_10; architecture BEH of counter_10 is signal cnt : std_logic_vector(3 downto 0); begin process(nRst, clk) begin if(nRst = '0') then cnt <= (others => '0'); elsif rising_edge(clk) then if(cnt = 9) then cnt <= (others => '0'); else cnt <= cnt + 1; end if; end if; end process; q <= cnt; end BEH; | cs |
'프로그래밍 > Quartus 2' 카테고리의 다른 글
[VHDL] DIGITAL WATCH (0) | 2018.04.10 |
---|---|
[VHDL] 계층구조 연습, MUX 설계 (0) | 2018.04.02 |
[VHDL] 논리 게이트 (0) | 2018.03.16 |
[VHDL] VHDL 개요 (0) | 2018.03.16 |
[VHDL] 간단한 프로그램 만들기(VHDL) (0) | 2018.03.16 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Next.js
- alpine.js
- vue.js
- Remix
- Cloud
- 이진탐색 #중복
- MySQL
- Angular
- oracle
- Gatsby.js
- svelte
- aws
- node.js
- Quasar
- REACT
- nuxt.js
- PostgreSQL
- vue
- gcp
- RDBMS
- Azure
- SQLite
- nosql
- DevOps
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함