Support synchronous set of LPM_FF devices.
This commit is contained in:
parent
7521aa83f8
commit
fea68f7fe7
|
|
@ -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.7 2003/08/26 04:45:47 steve Exp $"
|
||||
#ident "$Id: d-lpm.c,v 1.8 2003/09/03 23:34:09 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -416,10 +416,12 @@ static void lpm_show_dff(ivl_lpm_t net)
|
|||
unsigned idx;
|
||||
unsigned pin, wid = ivl_lpm_width(net);
|
||||
|
||||
sprintf(name, "fd%s%s%s%u",
|
||||
sprintf(name, "fd%s%s%s%s%s%u",
|
||||
ivl_lpm_enable(net)? "ce" : "",
|
||||
ivl_lpm_async_clr(net)? "cl" : "",
|
||||
ivl_lpm_sync_clr(net)? "sc" : "",
|
||||
ivl_lpm_async_set(net)? "se" : "",
|
||||
ivl_lpm_sync_set(net)? "ss" : "",
|
||||
wid);
|
||||
|
||||
cell = edif_xlibrary_findcell(xlib, name);
|
||||
|
|
@ -433,6 +435,10 @@ static void lpm_show_dff(ivl_lpm_t net)
|
|||
nports += 1;
|
||||
if (ivl_lpm_sync_clr(net))
|
||||
nports += 1;
|
||||
if (ivl_lpm_async_set(net))
|
||||
nports += 1;
|
||||
if (ivl_lpm_sync_set(net))
|
||||
nports += 1;
|
||||
|
||||
cell = edif_xcell_create(xlib, strdup(name), nports);
|
||||
edif_cell_pstring(cell, "LPM_Type", "LPM_FF");
|
||||
|
|
@ -466,6 +472,16 @@ static void lpm_show_dff(ivl_lpm_t net)
|
|||
pin += 1;
|
||||
}
|
||||
|
||||
if (ivl_lpm_async_set(net)) {
|
||||
edif_cell_portconfig(cell, pin, "Aset", IVL_SIP_INPUT);
|
||||
pin += 1;
|
||||
}
|
||||
|
||||
if (ivl_lpm_sync_set(net)) {
|
||||
edif_cell_portconfig(cell, pin, "Sset", IVL_SIP_INPUT);
|
||||
pin += 1;
|
||||
}
|
||||
|
||||
edif_cell_portconfig(cell, pin, "Clock", IVL_SIP_INPUT);
|
||||
pin += 1;
|
||||
|
||||
|
|
@ -500,6 +516,24 @@ static void lpm_show_dff(ivl_lpm_t net)
|
|||
edif_add_to_joint(jnt, ref, pin);
|
||||
}
|
||||
|
||||
if (ivl_lpm_async_set(net)) {
|
||||
pin = edif_cell_port_byname(cell, "Aset");
|
||||
|
||||
jnt = edif_joint_of_nexus(edf, ivl_lpm_async_set(net));
|
||||
edif_add_to_joint(jnt, ref, pin);
|
||||
}
|
||||
|
||||
if (ivl_lpm_sync_set(net)) {
|
||||
ivl_expr_t svalue = ivl_lpm_sset_value(net);
|
||||
|
||||
pin = edif_cell_port_byname(cell, "Sset");
|
||||
|
||||
jnt = edif_joint_of_nexus(edf, ivl_lpm_sync_set(net));
|
||||
edif_add_to_joint(jnt, ref, pin);
|
||||
|
||||
edif_cellref_pinteger(ref, "LPM_Svalue", ivl_expr_uvalue(svalue));
|
||||
}
|
||||
|
||||
for (idx = 0 ; idx < wid ; idx += 1) {
|
||||
|
||||
sprintf(name, "Q%u", idx);
|
||||
|
|
@ -771,6 +805,9 @@ const struct device_s d_lpm_edif = {
|
|||
|
||||
/*
|
||||
* $Log: d-lpm.c,v $
|
||||
* Revision 1.8 2003/09/03 23:34:09 steve
|
||||
* Support synchronous set of LPM_FF devices.
|
||||
*
|
||||
* Revision 1.7 2003/08/26 04:45:47 steve
|
||||
* iverilog-vpi support --cflags a la gtk.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: edif.c,v 1.7 2003/08/07 05:18:04 steve Exp $"
|
||||
#ident "$Id: edif.c,v 1.8 2003/09/03 23:34:09 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "edif.h"
|
||||
|
|
@ -357,6 +357,16 @@ void edif_cellref_pstring(edif_cellref_t ref, const char*name,
|
|||
ref->property = prp;
|
||||
}
|
||||
|
||||
void edif_cellref_pinteger(edif_cellref_t ref, const char*name, int value)
|
||||
{
|
||||
struct cellref_property_*prp = malloc(sizeof(struct cellref_property_));
|
||||
prp->name = name;
|
||||
prp->ptype = PRP_INTEGER;
|
||||
prp->value_.num = value;
|
||||
prp->next = ref->property;
|
||||
ref->property = prp;
|
||||
}
|
||||
|
||||
edif_joint_t edif_joint_create(edif_t edf)
|
||||
{
|
||||
edif_joint_t jnt = malloc(sizeof(struct edif_joint_s));
|
||||
|
|
@ -607,6 +617,9 @@ void edif_print(FILE*fd, edif_t edf)
|
|||
|
||||
/*
|
||||
* $Log: edif.c,v $
|
||||
* Revision 1.8 2003/09/03 23:34:09 steve
|
||||
* Support synchronous set of LPM_FF devices.
|
||||
*
|
||||
* Revision 1.7 2003/08/07 05:18:04 steve
|
||||
* Add support for OR/NOR/bufif0/bufif1.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: edif.h,v 1.6 2003/08/07 05:18:04 steve Exp $"
|
||||
#ident "$Id: edif.h,v 1.7 2003/09/03 23:34:09 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <stdio.h>
|
||||
|
|
@ -203,6 +203,8 @@ extern edif_cellref_t edif_cellref_create(edif_t edf, edif_cell_t cell);
|
|||
FPGA devices. */
|
||||
extern void edif_cellref_pstring(edif_cellref_t ref, const char*name,
|
||||
const char*value);
|
||||
extern void edif_cellref_pinteger(edif_cellref_t ref, const char*name,
|
||||
int value);
|
||||
|
||||
/* This function gets the joint associated with a nexus. This will
|
||||
create a joint if necessary. */
|
||||
|
|
@ -229,6 +231,9 @@ extern void edif_print(FILE*fd, edif_t design);
|
|||
|
||||
/*
|
||||
* $Log: edif.h,v $
|
||||
* Revision 1.7 2003/09/03 23:34:09 steve
|
||||
* Support synchronous set of LPM_FF devices.
|
||||
*
|
||||
* Revision 1.6 2003/08/07 05:18:04 steve
|
||||
* Add support for OR/NOR/bufif0/bufif1.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue