각종 Verilog Design 소스코드와 시뮬레이션 결과 및 합성결과와 코멘트
- 최초 등록일
- 2014.11.23
- 최종 저작일
- 2014.09
- 9페이지/ 한컴오피스
- 가격 1,000원
목차
1. 8비트 디지털 값이 같은 경우 same핀 1 출력 < Behavioral coding, Structural coding >
1) Behavioral coding
2) Structural coding
2. negedge 비동기 리셋 Counter ( 0~1000 수행하며 1000이 됬을 때 0으로 초기화 )
3. 8비트의 두 데이터 A, B에 대해서 Operator ( 1 : + , 2 : - , 3 : * , 4 : / ) 이 수행하는 산술연산기를 설계하여라
본문내용
1. 8비트 디지털 값이 같은 경우 same핀 1 출력 < Behavioral coding, Structural coding >
1) Behavioral coding
`timescale 1ns / 1ps
module behavioral(a,b,same);
input[7:0] a,b;
output same;
reg same;
always @(a or b)
begin
if(a==b) same=1;
else same=0;
end
endmodule
--------------------------------------------------------------------
◎ Testbench 파일
`timescale 1ns / 1ps
module behavioral_tb();
reg[7:0] a,b;
wire same;
behavioral inst0(.a(a),.b(b),.same(same));
initial begin
a=8'b100110001; b=8'b01010101;
#10 a=8'b100110001; b=8'b01010101;
#10 a=8'b100110001; b=8'b01010101;
#10 a=8'b100110001; b=8'b01010101;
end
참고 자료
없음