Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- D Flip Flop
- soc 설계
- vivado
- dataflow modeling
- verilog
- atmega 128a
- java
- structural modeling
- half adder
- LED
- BASYS3
- KEYPAD
- Recursion
- uart 통신
- stop watch
- hc-sr04
- i2c 통신
- prescaling
- Edge Detector
- FND
- behavioral modeling
- DHT11
- pwm
- Algorithm
- ring counter
- test bench
- Linked List
- ATMEGA128A
- gpio
- Pspice
Archives
- Today
- Total
거북이처럼 천천히
비동기식 카운터 (Asynchronous counter) 본문
1. Asynchronous MOD 16 up counter, T Flip-Flop
< Source code >
// Behavioral modeling of T Flip Flop
module t_flip_flop (
input t,
input clk, enable, reset,
output reg q );
always @(negedge clk or posedge reset) begin
if(reset) q = 0;
else if(enable) q = (t)? ~q : q;
else q = q;
end
endmodule
// Asynchronous up counter MOD 10
module Asynchronous_Up_Counter_MOD_10_T_Flip_Flop(
input clk, enable, reset,
output [3:0] result );
t_flip_flop t_flip_flop_0 (1, clk, enable, reset, result[0]);
t_flip_flop t_flip_flop_1 (1, result[0], enable, reset, result[1]);
t_flip_flop t_flip_flop_2 (1, result[1], enable, reset, result[2]);
t_flip_flop t_flip_flop_3 (1, result[2], enable, reset, result[3]);
endmodule
< Simulation >
< RTL analysis >
< Synthnesis >
2. Asynchronous MOD 16 down counter, T Flip-Flop
< Source code >
// Behavioral modeling of T Flip Flop
module t_flip_flop (
input t,
input clk, enable, reset,
output reg q );
always @(posedge clk or posedge reset) begin
if(reset) q = 0;
else if(enable) q = (t)? ~q : q;
else q = q;
end
endmodule
// Asynchronous MOD 16 Down counter
module Asynchronous_Down_Counter_MOD_16__T_Flip_Flop(
input clk, enable, reset,
output [3:0] result );
t_flip_flop t_flip_flop_0 (1, clk, enable, reset, result[0]);
t_flip_flop t_flip_flop_1 (1, result[0], enable, reset, result[1]);
t_flip_flop t_flip_flop_2 (1, result[1], enable, reset, result[2]);
t_flip_flop t_flip_flop_3 (1, result[2], enable, reset, result[3]);
endmodule
< Simulation >
< RTL analysis >
< Synthnesis >
'RTL Design > Verilog 연습' 카테고리의 다른 글
Advanced Clock (0) | 2024.08.06 |
---|---|
Normal Clock (0) | 2024.08.04 |
T Flip Flop (0) | 2024.07.11 |
JK Flip Flop (0) | 2024.07.11 |
SR Latch / D Latch / D Flip Flop (0) | 2024.07.10 |