일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- Multiple transaction
- atomic access
- Interoperability
- Verilog
- single copy atomic size
- FGPA #반도체설계 #verilog #시프트레지스터 #uart
- cacheable
- 임베디드시스템
- QoS
- 스텝모터
- 구조적모델링
- 카운터
- ordering model
- APB3
- tff
- ERROR RESPONSE
- SoC
- AMBA
- AXI3
- out-of-order
- Low-power Interface
- AXI4
- ABMA
- 펌웨어
- stepmotor
- FPGA
- Multiple outstanding
- 레지스터슬라이스
- T flip flop
- STM32
Archives
- Today
- Total
CHIP KIDD
[FPGA] Verilog : 4bit Full adder (구조적 모델링, 데이터 flow 모델링) 본문
module fadder(
input x,
input y,
input cin,
output sum,
inout cout
);
wire s0, co0, co1;
hadder ha0 (x,y, s0, co0);
hadder ha1 (cin, s0, sum, co1);
or u0 (cout, co0, co1);
//assign sum = x^y^cin;
//assign cout = (x&y)|(x&cin)|(y&cin);
endmodule
module fadder_4_bit(Cin, X, Y, Sum,Cout);
output Cout;
output [3:0]Sum;
input Cin;
input [3:0]X,Y;
wire c0,c1,c2;
fadder adder0(X[0], Y[0], Cin, Sum[0], c0);
fadder adder1(X[1], Y[1], c0, Sum[1], c1);
fadder adder2(X[2], Y[2], c1, Sum[2], c2);
fadder adder3(X[3], Y[3], c2, Sum[3], Cout);
endmodule
위는 구조적 모델링, 직관적이다. half adder 를 시작으로 단계적으로 full adder -> 4bit full adder 제작, 하지만 입력수가 증가하면 복잡해지는 단점존재.
,assign 으로 주석친 부분은 dataflow 모델링
'반도체 > FPGA - Verilog' 카테고리의 다른 글
[FPGA] Verilog Code - multiplexer/ demultiplexer (0) | 2021.04.02 |
---|---|
[FPGA-Verilog : 2bit comparator (동작점 모델링)] (0) | 2021.04.02 |
[FPGA] ADC ADC-Mux 설계 (Verilog Code) , 가변저항 10진수 출력 (0) | 2021.04.01 |
[FPGA] ADC ADC-Mux 설계 (세팅) (0) | 2021.04.01 |
[FPGA] Timer Verilog Code (0) | 2021.04.01 |