Quality control (1) 17

Verilog - LFSR( Linear feedback shift register ) / Fibonacci & Galois LFSR

LFSR LFSR이란? : Linear Feedback Shift Register의 약자로, 선형 되먹임 시프트 레지스터이다. Shift Register에 입력되는 값이 이전 상태의 선형 함수로 다시 되먹임되는 Linear Feedback구조이다. 이전 상태가 Feedback되어 다음 상태를 만들기 때문에 "결정론적이다"라고 할 수도 있다. Fibonacci LFSR module fibonacci_LFSR( input clk, input arst_n, output LFSR ); parameter BITWIDTH = 5; //bitwidth만큼 reg생성 output reg [BITWIDTH -1 : 0 ] LFSR; always @(posedge clk or negedge arst_n) begin if(..

Verilog - Finite State Machine (FSM) / Lemming Game

FSM(Moore)을 이용한 Lemming Game(1) [Problem] Design source code //RTL code module Lemmings1( input clk, input rst_n, input bump_left, input bump_right, output walk_left, output walk_right ); //explicit expression localparam LEFT = 0, RIGHT = 1; reg present_state, next_state; //next_state compuation always @(*) begin //next state computation logic - Combinational Logic case (present_state) LEFT : ne..

Verilog - 4bit Ripple Carry Adder

Full Adder 4bit Full Adder Hierarchical Design module이 여러개일 때 ( design source) 4bit full adder를 만들기 위해서는 half_adder, full_adder, full_adder_4bit 총 3개의 module을 필요로 한다. Vivado에서는 여러 개의 모듈을 사용할 수 있다. 여러 개의 모듈이 포함된 위와 같은 vivado design을 작성할 때, 일반적으로 하나의 design source file에 모든 모듈을 작성한다. 이렇게 하면 모듈 간 종속성을 쉽게 관리할 수 있으며, 코드를 쉽게 재사용할 수 있다. 따라서, 여러 개의 module을 사용하더라도 하나의 design source file에 모든 module을 작성하는 것..

Electormagnetics - Coordinate System

Coordinate System Rectangular Coordinate System 가장 흔하게 사용하는 좌표계로 ( x , y , z )로 표현된다. Cylindrical Coordinate System ( ρ , φ , z )로 표현된다. ρ : z축으로부터 점까지의 거리 φ : xy평면상에서 x축으로부터의 각도 z :높이(z좌표) Spherical Coordinate System ( r , θ , φ )로 표현된다. r : 원접으로부터 점까지의 거리 θ : z축으로부터의 각도 φ : xy평면상에서 x축으로부터의 각도 // Cylindrcal에서와 동일하다 좌표 표현 위치가 다르다 각 Coordinate System에서의 표현 동일한 위치의 점이라도 좌표계에 따라 위와 같이 다르게 표현될 수 있다.

Electromagnetics - Vector Analysis(3) / Cross Product

Cross Product The cross Product A x B is a vector. ( 벡터의 외적은 벡터! (not scalar) ) The magnitude of A x B : is equal to the product of the magnitude of A,B, and the sine of the smaller angle between A and B. The direction of A x B : is perpendicular to the plane containing A and B and is along that one of the two possible perpendiculars which is in the direction of advance of a right-handed screw a..

Electromagnetics - Vector Analysis(2) / Dot Product

Dot Product Dot Product (내적) ( = Scalar Product = Inner Product ) 좌변은 Vector와 Vectoc의 곱이지만, 우변은 크기와 코사인값의 곱이므로 Scalar값을 가진다. 따라서 Vector간의 내적 값은 Scalar값임을 알 수 있다. 내적 특성 정리 1. vector내적 위치 바꾸기 각각의 크기와 그 사이 각도에 대한 cos값만을 다루므로 두 벡터의 위치를 바꾸어도 내적값이 동일하다. 2.단위벡터끼리의 곱 단위벡터의 크기가 1이고 cos(0)=1 이므로 단위벡터의 본인과의 내적값은 1이다. 허나, 좌표계의 각각 다른 단위벡터의 사이각은 90'며 cos(90)=0이므로 본인이 아닌 다른 단위벡터와의 내적값은 0이다. 3. 벡터 내적 2번과 같은 이유로..

Electromagnetics - Vector Analysis(1)

Vector Analysis Scalar & Vector - Scalar : Temperature, Time, Distance, Mass, Density, Pressure, Voltage, charge density ........ - Vector : Force, Velocity, Acceleration, Electric field intesnity Scalar field & Vector field - Scalar field : scalar 물리량의 위치별 분포 ex) T(x,y,z) = 20'C / T(x,y,z) = 20'C*x - 10'C - Vector field : vector 물리량의 위치별 분포 ( 위치별로 vector 물리량이 달라짐 ) We are accustomed to thinking..

Verilog - Synthesis (full_adder_dataflow) / LUT / truth table

Synthesis full_adder_dataflow module full_adder_dataflow( x,y,c_in, sum,c_out ); input x,y,c_in; output sum,c_out; assign {c_out,sum}=x+y+c_in; endmodule 위 코드를 작성하고 schematic을 확인하면 위와 같이 RLD_ADD를 확인할 수 있으나, RTL_ADD가 실제로 어떤 gate들로 이루어지는지 알 수 없다. 이 때 Verilog code의 gate합성을 확인할 수 있는 도구가 바로 sythesis이다. Synthesis : High-level language 를 Low-level language로 변환하는 것을 일반적으로 Synthesis라고 한다. 디지털 시스템 설계에서의 S..