Design a level-sensitive D latch with an enable and a reset that is honored only while the latch is transparent (EN=1).
Requirements
d_latch_en_sync_resetENRSTDQEN=1, RST=1 → Q=0EN=1, RST=0 → Q=DEN=0 → Q holds previous valuealways @(EN or RST or D).EN branch.<=) for storage.Behaviour / Worked Example
From Q=0:
EN=1,RST=1,D=1 → Q=0EN=1,RST=0,D=1 → Q=1EN=0,RST=1,D=0 → Q=1EN=0,RST=0,D=1 → Q=1EN=1,RST=1,D=0 → Q=0EN=1,RST=0,D=0 → Q=0