General Description: How do I implement a latch, as latches are not directly supported by the CoolRunner?
ソリューション
The following are PHDL examples for two types of latches. The first is a latch that implements an asynchronous set and an asynchronous reset. The second does not implement the set or reset function.
MODULE latch1 TITLE 'Latch with Asynchronous Set and Reset'
DECLARATIONS
set,reset,enable,d pin ; q pin istype 'com' ;
EQUATIONS
q = !reset & (set # (enable & d # !enable & q.com # d & q.com)) ;