AR# 7523

|

XPLA Professional - How do I implement a latch in a CoolRunner device?

描述







解决方案

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.



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)) ;

END





MODULE latch2
TITLE 'Latch'

DECLARATIONS

d7..d0 pin ;
enable pin ;
q7..q0 pin istype 'com,retain' ;

d = [d7..d0] ;
q = [q7..q0] ;

EQUATIONS

q = (enable & d) # (!enable & q.com) # (d & q.com) ;

END
AR# 7523
日期 02/12/2002
状态 Archive
Type 综合文章
People Also Viewed