diff --git a/tgt-fpga/d-lpm.c b/tgt-fpga/d-lpm.c index ffebc31be..29e072f95 100644 --- a/tgt-fpga/d-lpm.c +++ b/tgt-fpga/d-lpm.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: d-lpm.c,v 1.4 2003/08/09 03:23:03 steve Exp $" +#ident "$Id: d-lpm.c,v 1.5 2003/08/10 16:42:23 steve Exp $" #endif /* @@ -350,7 +350,11 @@ static void lpm_show_dff(ivl_lpm_t net) unsigned idx; unsigned pin, wid = ivl_lpm_width(net); - sprintf(name, "fd%s%u", ivl_lpm_enable(net)? "ce" : "", wid); + sprintf(name, "fd%s%s%u", + ivl_lpm_enable(net)? "ce" : "", + ivl_lpm_async_clr(net)? "cl" : "", + wid); + cell = edif_xlibrary_findcell(xlib, name); if (cell == 0) { @@ -358,6 +362,8 @@ static void lpm_show_dff(ivl_lpm_t net) pin = 0; if (ivl_lpm_enable(net)) nports += 1; + if (ivl_lpm_async_clr(net)) + nports += 1; cell = edif_xcell_create(xlib, strdup(name), nports); edif_cell_pstring(cell, "LPM_Type", "LPM_FF"); @@ -381,6 +387,11 @@ static void lpm_show_dff(ivl_lpm_t net) pin += 1; } + if (ivl_lpm_async_clr(net)) { + edif_cell_portconfig(cell, pin, "Aclr", IVL_SIP_INPUT); + pin += 1; + } + edif_cell_portconfig(cell, pin, "Clock", IVL_SIP_INPUT); pin += 1; @@ -401,6 +412,13 @@ static void lpm_show_dff(ivl_lpm_t net) edif_add_to_joint(jnt, ref, pin); } + if (ivl_lpm_async_clr(net)) { + pin = edif_cell_port_byname(cell, "Aclr"); + + jnt = edif_joint_of_nexus(edf, ivl_lpm_async_clr(net)); + edif_add_to_joint(jnt, ref, pin); + } + for (idx = 0 ; idx < wid ; idx += 1) { sprintf(name, "Q%u", idx); @@ -672,6 +690,9 @@ const struct device_s d_lpm_edif = { /* * $Log: d-lpm.c,v $ + * Revision 1.5 2003/08/10 16:42:23 steve + * Add async clear to LPM_FF devices. + * * Revision 1.4 2003/08/09 03:23:03 steve * Add support for IVL_LPM_MULT device. *