기본부터 차근차근 다져봅시다.
오랜만에 vivado를 쓰니, verilog부터 해봅시다.
and gate dut
`timescale 1ns / 1ps
module test_and (a, b, c);
input a, b;
output c;
assign c = a & b;
endmodule
and gate testbench
`timescale 1ns / 1ps
module tb_test_and( );
reg a;
reg b;
wire c;
test_and example0(a, b, c);
initial begin
a = 1'b0; b = 1'b0;
#10 a = 1'b0; b = 1'b1;
#10 a = 1'b1; b = 1'b0;
#10 a = 1'b1; b = 1'b1;
#10
$finish;
end
endmodule
지금까지 한번도 스케메틱을 안넣었는데, 이번엔 넣어봅시다.
run analysis→ open elaborated design → schemetic

simulation → run simulation

잘 나오네요.
이제 VHDL로 작성해봅시다.