Gate Primitive level modeling


Gate primitive를 이용한 modeling : NOT, XOR, NAND 등 이러한 게이트들이 미리 함수식으로 선언 되어 있는데 이것을 가져다 쓰는 것을 말함 


- Gate Primitive level modeling


module half_adder (a, b, sum, cout);

input a, b;

output sum, cout;

wire cout_bar;


xor (sum, a, b);

nand (cout_bar, a, b);

not (cout, cout_bar);

endmodule



Continuous assignment level modeling (Dataflow 중 하나)


Verilog의 연속 할당문은 assign 문으로 표현되며, 할당 기호 '='의 좌변의 신호에 우변의 결과 값을 할당한다. Verilog 모델링의 몸체부를 구성하는 문장들은 병행문이므로, 두 개의 assign 문장들은 그 순서에 무관하게 동일한 결과를 갖는다.


- Continuous assignment level modeling


module half_adder2 (a, b, sum, cout);

input a, b;

output sum, cout;

assign cout = a & b;

assign sum = a ^ b;

endmodule



Behavioral level modeling


- Behavioral level modeling


module mux2xb_if (in0, in1, sel, out);

input [1:0] in0, in1;

input sel;

output [1:0] out;

reg [1:0] out;


always @(sel or in0 or in1) begin

if (sel == 0)

out = in0;

else

out = in1;

end

endmodule




-------------------------------------------------- 잡것 정리 -----------------------------------------------


always 문법, 블로킹 연산자가 순차회로에 적합하지 않은 이유.

-> non-blocking 연산자 동일 시점에서 변수들의 순서나 상호 의존성에 의해서 할당이 이루어져야 하는 경우에 사용된다.

다시 말하면 clock이 들어오는 순간 변수가 동시에 다 바뀌는 거에 사용.

반대로 blocking 연산자는 동일시점이 아닌 (비동기) 먼저 들어온 것이 먼저 처리 되어야 할 때 blocking 연산자를 사용한다. 즉, 어떤 시점에 처리할 때 다른 연산은 block (금지)되는 용도로 사용.




- Design Specifications -> Behavioral Modeling -> RTL level HDL Modeling -> Functional Simulation -> Logic Synthesis -> Gate-level Verification


- Behavioral Modeling : 상세 설계 이전에 설계사양을 확인할 수 있도록 시스템의 전체 기능을 모델링하고 검증하는 과정.

ASIC(Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array)로 구현하기 위한 상세설계가 시작.

상세설계는 합성 가능한 Verilog 구문들을 이용하여 RTL 수준으로 모델링하고 이를 검증하기 위한 테스트 벤치를 생성하는 것. (RTL : a way of describing a circuit


- Verilog HDL 구문 : 논리합성용 구문, 시뮬레이션용 구문, 라이브러리 설계용 구문

논리합성용 구문 : assign, always, if~else, case, for 등 대부분의 논리합성 툴에서 게이트 수준 합성을 지우너하는 구문들.

시뮬레이션용 구문 : initial, $finish, $fopen 등 시뮬레이션을 위한 테스트벤치의 작성에 사용됨,

라이브러리 설계용 구문 : 


- module 몸체 부분은 always or initial 구문을 이용한 behavioral modeling, assign statement를 이용한 data flow modeling 등을 포함

'Language > verilog HDL' 카테고리의 다른 글

blocking과 nonblocking 연산자 의미  (0) 2016.11.27
Assignment  (0) 2016.11.23
Gate delay, net delay  (0) 2016.11.23
Behavioral, RTL, Gate level  (0) 2016.11.22
Little endian, Big endian  (0) 2016.11.16
Posted by 나무길 :