본문 바로가기

Language/Verilog & SV22

[System Verilog] always @(*), always_ff, always_comb, always_latch always @(*) Verilog의 always sensitivity list가 바뀔때 동작 always_comb Verilog에서의 combination logic을 구현할 때 사용 sensitive list 필요 없음 latch가 생기지 않도록 모든 조건문 필요 Code [ always @(*), always_comb ] module test; logic a, b, c, always_d, always_comb_d; function logic my_func(input logic m_c); my_func = a | b | m_c; endfunction always @* always_d = my_func(c); always_comb always_comb_d = my_func(c); initial begi.. 2024. 4. 7.
[Verilog] 1bit Half adder(반가산기) 목차 Half adder 1비트 이진수 두 개를 더한 합 Sum (S)과 자리올림 수 Carry (C)를 구하는 회로 Code 2023. 7. 23.
[Verilog] Frequency(Clock) Divider 목차 Frequency(Clock) Divider D F/F를 이용한 주파수 분할입니다. 간단하게 하나의 F/F를 거치면 2 분할됩니다. 카운터를 활용해서 분할할 수 도 있습니다. 생산 이후에 Clock divider를 잘못설계하면(ex. 홀수 분주 시 Timing 고려하지 않은 경우) clock glitch가 발생할 수 있습니다. 간단하게 말해서 clock내 Timing문제가 생겨 해당 clock를 사용하거나 동기화된 모든 기능이 먹통이 될 수 있습니다. 제일 안전하게 분주하는 방법은 F/F를 활용하여 짝수 분주하는 방법입니다. Code D F/F를 이용한 Clock divide Code입니다. 위 그림의 D F/F가 연달아 3개 이어져 있다고 생각하시면 됩니다. 2023. 7. 21.
[Verilog] Counter 목차 Counter 카운터를 활용하여, 기존 Clock의 주기를 Count 하여 동작의 기준을 새로 바꿔줄 수도 있고, SR(상태레지스터)를 일정 시간 후에 계속 확인을 한다던지, 시계, 타이머등을 설계할 수 있습니다. 가장 기본적인 Counter Code에 대해 다뤄보겠습니다. 해당 Code는 rst이 negedge일 때 counter를 0으로 초기화하고 Clock의 posedge때마다 1씩 상승합니다. 그리고 counter가 4'b1000에 도달하면 0으로 초기화합니다. Code 2023. 7. 21.
[Verilog] APB의 State FSM, 간단한 Master Code 목차 APB란? 2023.07.20 - [Knowledge] - APB란? AMBA APB에 대해 알아보자 APB란? AMBA APB에 대해 알아보자 *All photos and content in this article are copyrighted by Arm Ltd. This is a personal compilation for students and practitioners entering digital design. Content may be removed or modified at any time at the request of the copyright holder, Arm Ltd. Copyr vir-us.tistory.com APB에 대한 내용은 이전글을 참고바랍니다. APB States AP.. 2023. 7. 21.
[Verilog] Full-adder, Ripple-carry adder 목차 1bit Full-adder circuit diagram and truth table Code 2023. 7. 20.
반응형