본문 바로가기

Semiconductor

(27)
Block RAM( BRAM) Black RAMs stands for Block Random Access Memory. Block RAMs are used for storing large amounts of data inside of your FPGA. They one of four commonly identified components on an FPGA datasheet. The other three are Flip-Flops, Look-up tables and Digital signal processors. Usually the bigger and more expensive the FPGA, the more Block RAM it will have on it. Since this is found right at the top o..
Crossing Clock Domain Crossing Clock Domain inside of an FPGA is a common task. Problems can occur if the digital designer does not understand all of the details involved in crossing from one clock domain into another. A single clock domain entails all of the Flip-Flops that are driven by one. Crossing from slower clock domain to faster clock domain The simplest type of crossing is going from one clock domain to a fa..
Timing Verilog 합성에 있어 Timing과 동작 기능은 항상 같이 고려해야 할 문제입니다. 설계자가 설계한 것을 Simulation을 통해 정상적인 동작을 하는지 검증한 후 합성과정을 거치게 됩니다. 이러한 합성과정에서 Verilog 코드는 특정한 Technology library( 칩 공정에 해당하는 Cell-library)에 있는 Hardware Logic-gate로 Mapping됩니다. 이 때 설계자는 합성 Tool의 합성을 위한 설계 제한( Design contraint) 즉, 동작속도제한, 합성 Logic 크기제한 등을 지정하게 됩니다. 합성 Tool은 이러한 설계제한에 맞추어 Hardware를 최적화 시키며 합성하게 됩니다. 이 후 이러한 합성 결과가 Timing 기준을 만족시키면 설계자는 La..
Propagation Delay Propagation delay is the amount of time it takes for a signal to travel from a source to a destination. Propagation delay is a fundamental concept of how digital circuits work. Inside of FPGA or ASIC there are thousands of tiny wires running everywhere. When you add up the physical length of the wires, they can easily be over a foot long, which is pretty amazing considering how small the chips a..
Shift Register Create delays and convert serial to parallel data in FPGAs Shift registers are a common FPGA building block. They are created by cascading Flip-Flops in a chain. All registers must share the same clock, the output of one register must be connected to the input of the next register in the chain. Shift registers are mainly used to accomplish one of three goals. Delaying data by some number of cloc..
Metastability Metastability Asynchronous clock간 신호를 교환 할 시 보통 Flip-Flop 2개를 연달아 지나가도록 설계합니다. 이러한 방법으로 Metastability를 피할 수 있다고 하며 Metastability란 간단히 Low-level도 High-level도 아닌 중간 상황이 지속되는 것을 말합니다. 이것 말고 unknown이라는것도 있는데 이것은 말 그대로 Low인지 High인지 모르지만 둘 중 하나인것입니다. Metastability는 중간값을 가지는 것이 문제입니다. 문제가 되는 이유는 CMOS 회로는 간단하게 PMOS로 이루어져 VDD로 출력을 연결하는 PULL-UP회로와 NMOS로 이루어져서 출력을 GROUND로 연결하는 PULL-DOWN회로로 구성됩니다. 그래서 일반적인 ..
LFSR( Linear Feedback Shift Register) 디지털 회로에서 현재 상태에 대한 선형 연산( linear function)으로 다음 상태를 만드는 레지스터다. 해당 연산에는 다양한 종류들이 있겠지만 일반적으로 쓰이는건 XOR이라고 한다. LFSR의 초기값은 Seed라고 부르며 다음 상태를 생성하는 연산에 관여하는 bit는 tap이라고 하며 또한 가장 오른쪽에 있는 bit를 output bit라고 한다. 기본적인 내용은 다음과 같다. LFSR의 초기값을 다음과 같은 8bits로 설정한다. 현재의 상태는 0x59이다. LFSR의 tap이 5, 6, 8번째 bits라고 가정하자. 현재 상태의 output bit과 tap들을 XOR 연산시킨 값을 MSB로 보낸다. 다음 상태는 0x2C가 되었다. 같은 방법으로 다음 상태를 계속하여 생성할 수 있다. 8bit..
Double Dabble BCD( Binary Coded Decimal) 2진수 4비트를 묶어서 10진수 한 자리를 나타내는 코드. 따라서 BCD는 10진수로 표현하기 용이하다. 하지만, 일반적인 2진수로 10진수를 나타내기는 쉽지 않다. 그래서 사용하는 알고리즘이 shift 더하기 3 알고리즘, Double Dabble 알고리즘이다. 이 알고리즘을 간단하게 설명하면 다음과 같다. 일반 2진수 코드를 왼쪽으로 1bit씩 shift한다. 4bits씩 묶어서 5 이상인 자리에는 3을 더해준다. 모든 bits가 왼쪽으로 shift 될 때까지 위 과정을 반복한다. $log2=0.3010..$이므로 10진수 한 자리를 표현하려면 약 3.33bits가 필요하다. 예를 들어, 2진수 11001100( =204)을 BCD코드로 변환하면 약 3..
Carry lookahead Full Adder CPU의 연산처리과정 중 그 흔한 덧셈을 어떻게 최적화 시켰을까 궁금하여 찾아보게 된 자료이다. 가산기는 간단히 두 수의 덧셈을 연산하는 논리회로이다. 반가산기, 전가산기 그리고 RCA는 익숙하지 않은 사람이 회로만 확인하여도 이해가 가능할 정도로 간결한 회로이다. 정리하면 반가산기는 입력으로 두 개의 bits가 주어졌을 경우 sum과 carry bit을 구한다. 전가산기는 반가산기에 carry bit 입력까지 더하였고, RCA는 이러한 전가산기를 여러 bits에서 연산 가능하도록 조합한 형태이다. RCA로 가산기를 만들었다 생각하고 32bits 덧셈을 하는데 몇 개의 논리게이트를 통과하는지 생각해보자. 1bit의 전가산기를 연산하는데 2단의 논리게이트를 통과하고 자리올림을 확인하기 위해 첫번째 자리부터..
What is a FPGA Latch? You should never use a latch in your FPGA. Let's discuss what latch is and how they are generated in HDL code and learn how to avoid generating them accidentally. The usual latch that is generated by the synthesis tools( The tools that convert your Verilog or VHDL code to low-level FPGA components) is the Gated D Latch. However, there are other types of latches. I suggeted that latches should be..