FPGA/HDLBits
Exams/m2014 q4a
장영현
2023. 6. 18. 15:07
728x90
Problem Statement
Implement the following circuit:
Note that this is a latch, so a Quartus warning about having inferred a latch is expected.
module top_module (
input d,
input ena,
output q);
assign q = (ena ? d : q);
endmodule
게이트형 D 래치
ena는 D래치에서 enable단자의 역할을 한다.
- ena = 0이면 S=R=0으로 Q가 이전값을 유지하게 된다.
- ena = 1이면 q = d