flip-flop pins for ivl_target API.

This commit is contained in:
steve 2000-11-12 17:47:29 +00:00
parent 28bc621f11
commit 0ca9b2736b
3 changed files with 56 additions and 5 deletions

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: ivl_target.h,v 1.28 2000/11/11 01:52:09 steve Exp $"
#ident "$Id: ivl_target.h,v 1.29 2000/11/12 17:47:29 steve Exp $"
#endif
#ifdef __cplusplus
@ -385,6 +385,9 @@ extern unsigned ivl_lpm_width(ivl_lpm_t net);
* the requested type, checking for errors along the way.
*/
extern ivl_lpm_ff_t ivl_lpm_ff(ivl_lpm_t net);
extern ivl_nexus_t ivl_lpm_ff_clk(ivl_lpm_ff_t net);
extern ivl_nexus_t ivl_lpm_ff_data(ivl_lpm_ff_t net, unsigned idx);
extern ivl_nexus_t ivl_lpm_ff_q(ivl_lpm_ff_t net, unsigned idx);
/* LVAL
@ -598,6 +601,9 @@ _END_DECL
/*
* $Log: ivl_target.h,v $
* Revision 1.29 2000/11/12 17:47:29 steve
* flip-flop pins for ivl_target API.
*
* Revision 1.28 2000/11/11 01:52:09 steve
* change set for support of nmos, pmos, rnmos, rpmos, notif0, and notif1
* change set to correct behavior of bufif0 and bufif1

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-dll-api.cc,v 1.17 2000/11/11 00:03:36 steve Exp $"
#ident "$Id: t-dll-api.cc,v 1.18 2000/11/12 17:47:29 steve Exp $"
#endif
# include "t-dll.h"
@ -240,6 +240,32 @@ extern "C" ivl_lpm_ff_t ivl_lpm_ff(ivl_lpm_t net)
return (ivl_lpm_ff_t)net;
}
extern "C" ivl_nexus_t ivl_lpm_ff_clk(ivl_lpm_ff_t net)
{
assert(net);
return net->clk;
}
extern "C" ivl_nexus_t ivl_lpm_ff_data(ivl_lpm_ff_t net, unsigned idx)
{
assert(net);
assert(idx < net->base.width);
if (net->base.width == 1)
return net->d.pin;
else
return net->d.pins[idx];
}
extern "C" ivl_nexus_t ivl_lpm_ff_q(ivl_lpm_ff_t net, unsigned idx)
{
assert(net);
assert(idx < net->base.width);
if (net->base.width == 1)
return net->q.pin;
else
return net->q.pins[idx];
}
extern "C" const char* ivl_lpm_name(ivl_lpm_t net)
{
return net->name;
@ -570,6 +596,9 @@ extern "C" ivl_statement_t ivl_stmt_sub_stmt(ivl_statement_t net)
/*
* $Log: t-dll-api.cc,v $
* Revision 1.18 2000/11/12 17:47:29 steve
* flip-flop pins for ivl_target API.
*
* Revision 1.17 2000/11/11 00:03:36 steve
* Add support for the t-dll backend grabing flip-flops.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT) && !defined(macintosh)
#ident "$Id: stub.c,v 1.24 2000/11/11 00:03:36 steve Exp $"
#ident "$Id: stub.c,v 1.25 2000/11/12 17:47:29 steve Exp $"
#endif
/*
@ -90,13 +90,26 @@ static void show_expression(ivl_expr_t net, unsigned ind)
static void show_lpm(ivl_lpm_t net)
{
unsigned idx;
unsigned width = ivl_lpm_width(net);
switch (ivl_lpm_type(net)) {
case IVL_LPM_FF: {
ivl_lpm_ff_t ff = ivl_lpm_ff(net);
fprintf(out, " LPM_FF %s: <width=%u>\n",
ivl_lpm_name(net),
ivl_lpm_width(net));
ivl_lpm_name(net), width);
fprintf(out, " clk: %s\n",
ivl_nexus_name(ivl_lpm_ff_clk(ff)));
for (idx = 0 ; idx < width ; idx += 1)
fprintf(out, " Data %u: %s\n", idx,
ivl_nexus_name(ivl_lpm_ff_data(ff, idx)));
for (idx = 0 ; idx < width ; idx += 1)
fprintf(out, " Q %u: %s\n", idx,
ivl_nexus_name(ivl_lpm_ff_q(ff, idx)));
break;
}
@ -361,6 +374,9 @@ DECLARE_CYGWIN_DLL(DllMain);
/*
* $Log: stub.c,v $
* Revision 1.25 2000/11/12 17:47:29 steve
* flip-flop pins for ivl_target API.
*
* Revision 1.24 2000/11/11 00:03:36 steve
* Add support for the t-dll backend grabing flip-flops.
*