메뉴 건너뛰기

app

[HDL] Verilog - 반가산기, 신호등 모델 - RTL

박영식2007.05.05 21:56조회 수 5128댓글 0

    • 글자 크기

<반 가산기>
module half_adder(p0,p1,co,sum);


input p0;
input p1;
output co;
output sum;


wire  w2;
wire  w3;
wire  w5;
wire  w4;


assign co = w2;
assign sum = w3;
assign w5 = p0;
assign w4 = p1;


and(w2,w5,w4);
xor(w3,w5,w4);
endmodule


<신호등 모델>
module hw3(A,B,O1,O2,O3,O4,O5,O6,O7,O8,O9,O10,O11,O12);


input A, B;
output O1,O2,O3,O4,O5,O6,O7,O8,O9,O10,O11,O12;


wire anot;
wire bnot;


not(anot, A);
not(bnot, B);


and(O1, anot, bnot);
and(O7, anot, bnot);


and(O2, anot, B);
and(O8, anot, B);


or(O3, A, bnot);
or(O9, A, bnot);


and(O4, A, bnot);
and(O10, A, bnot);


and(O5, A, B);
and(O11, A, B);


or(O6, anot, bnot);
or(O12, anot, bnot);


endmodule

박영식 (비회원)
    • 글자 크기
[php] 파일 다운로드 하기 (by 박영식) [tweak] Cercube for youtube (by suritam9)

댓글 달기

박영식
2007.04.04 조회 5474
suritam9
2021.12.15 조회 133
suritam9
2013.06.28 조회 2175
이전 1 ... 4 5 6 7 8 9 10 11 12 13 14다음
첨부 (0)
위로