UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 7523

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

Description

Keywords: XPLA, Professional, CoolRunner, fitter, latch

Urgency: Hot

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

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
创建日期 09/14/1999
Last Updated 02/12/2002
状态 Archive
Type 综合文章