본문 바로가기

분류 전체보기

(271)
Verilog RTL 설계(7월 12일 - 5, 동기식 업/다운 카운터) 1. Synchronous Up Down Counter (Negative edge trigger)Up counter로 동작하며, Down Counter로서 동작할 수 있다. // Syncrhronous Up Down Counter implemented with D Flip Flopmodule Synchronous_Up_Down_Counter_Negative( input up_down, input clk, enable, reset_p, output reg [3:0] count ); // 0 : Up Counting, 1 : Down Counting always @(negedge clk or posedge reset_p) begin if(reset_p) coun..
Verilog RTL 설계(7월 12일 - 4, 동기식 BCD 카운터) 1. BCD codeBCD (Binary coded decimal) code는 십진수로 표현된 값의 각 자리 수를 이진수로 표현하는 방법이다.ex) 십진수로 표현된 수인 10에 대해서 2진법으로 변환하면 A이지만, BCD 코드로 표현할 경우, 각 자리 수 1, 0을 각각 2진수로 변환하기 때문에 BCD 코드로 변환하면 0001 0000 으로 변환된다. ●  Binary code : 10 → A ●  BCD code : 10 → 0001 0000  1.1. BCD code의 장점1) 10진수와 같은 수 체계를 사용하여 친숙하다.- Binary code와 달리 10진수의 각 자리수를 이진화하기 때문에 10진수와 같은 수 체계를 사용하여 사용자에게 친숙하다. 2) BCD 변환기는 하드웨어적으로 구현하기 쉽다...
Verilog RTL 설계(7월 12일 - 3, 동기식 카운터 - 2) 1. Synchronous MOD-16 Up Counter implemented with T - Flip Flop// Behavioral modeling of T Flip Flopmodule t_flip_flop ( input t, input clk, enable, reset_p, output reg q); always @(posedge clk or posedge reset_p) begin if(reset_p) q = 0; else if(enable) q = (t)? ~q : q; else q = q; end endmodule// Synchronous MOD-16 Up Counter implemented with T Flip-..
Verilog RTL 설계(7월 12일 - 2, 동기식 카운터 - 1) 1. 비동기식 카운터비동기식 카운터는 첫 번째 플립플롭만 클럭 펄스 (Clock Pulse)와 동기화되어 있는 카운터를 의미한다.비동기식 카운터 중 하나인 리플 카운터 (Ripple Counter)을 이용하여 비동기식 업, 다운 카운터를 설계했다.https://jbhdeve.tistory.com/201 Verilog RTL 설계(6월 25일 - 3, Counter)1. Counter들어오는 펄스 신호를 세는 장치이전까지 카운트 했던 값에다가 +1을 하며, 카운트해야 하기 때문에 기억 소자가 필요하다.따라서 이전까지 카운트 했던 값을 임시 저장하기 위해 기억jbhdeve.tistory.com 하지만, 비동기식 카운터는 첫 번째 플립플롭만 클럭 펄스와 동기화 되어 있기 때문에 클럭 변화에 대해서 카운트 값이..
Verilog RTL 설계(7월 12일 - 1, 비동기 카운터까지 복습) 1. Combinational Logic Circuit Verilog에서 증감 연산자, 복합 대입 연산자를 지원하지 않는다.비교기는 가산기처럼 단순 병렬 연결함으로서 2bit 이상의 비교기를 설계할 수 없다.- 따라서 2bit 이상의 비교기는 별도로 설계해야 한다.- 하지만, 32bit 비교기를 설계한다면 32 이하 비트에서 비교를 할 때, 특정 비트만 값을 넣고,  나머지 bit에 대해서 0으로 채워줌으로서 32bit 비교기를 통해 비교 연산 수행 가능하다. Decoder와 Encoder도 가산기처럼 병렬 연결하여 사용할 수 있다.DEMUX를 구현에서 선택선에 의해 선택 받지 못한 출력선에 대해서 0을 출력하도록 설계했다.- 선택 받지  못한 출력선에 대해서 0으로 출력하지 않도록 설계한다면 해당 출력..
비동기식 카운터 (Asynchronous counter) 1. Asynchronous MOD 16 up counter, T Flip-Flop // Behavioral modeling of T Flip Flopmodule 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; endendmodule// Asynchronous up counter MOD 10 module Asynchronous_Up_Counter_MOD_10_T_Flip_Flop..
T Flip Flop 1. Behavioral Modeling of T Flip Flop (Positive edge sensitive)// Behavioral modeling of T Flip Flopmodule Behavioral_Modeling_of_T_Flip_Flop_Positive( 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        2. Behavioral Modeling ..
Convert from analog to digital 보호되어 있는 글입니다.