Skip to content

Commit

Permalink
flip-flop pins for ivl_target API.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve committed Nov 12, 2000
1 parent 28bc621 commit 0ca9b27
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 5 deletions.
8 changes: 7 additions & 1 deletion ivl_target.h
Expand Up @@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #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 #endif


#ifdef __cplusplus #ifdef __cplusplus
Expand Down Expand Up @@ -385,6 +385,9 @@ extern unsigned ivl_lpm_width(ivl_lpm_t net);
* the requested type, checking for errors along the way. * the requested type, checking for errors along the way.
*/ */
extern ivl_lpm_ff_t ivl_lpm_ff(ivl_lpm_t net); 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 /* LVAL
Expand Down Expand Up @@ -598,6 +601,9 @@ _END_DECL


/* /*
* $Log: ivl_target.h,v $ * $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 * Revision 1.28 2000/11/11 01:52:09 steve
* change set for support of nmos, pmos, rnmos, rpmos, notif0, and notif1 * change set for support of nmos, pmos, rnmos, rpmos, notif0, and notif1
* change set to correct behavior of bufif0 and bufif1 * change set to correct behavior of bufif0 and bufif1
Expand Down
31 changes: 30 additions & 1 deletion t-dll-api.cc
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #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 #endif


# include "t-dll.h" # include "t-dll.h"
Expand Down Expand Up @@ -240,6 +240,32 @@ extern "C" ivl_lpm_ff_t ivl_lpm_ff(ivl_lpm_t net)
return (ivl_lpm_ff_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) extern "C" const char* ivl_lpm_name(ivl_lpm_t net)
{ {
return net->name; return net->name;
Expand Down Expand Up @@ -570,6 +596,9 @@ extern "C" ivl_statement_t ivl_stmt_sub_stmt(ivl_statement_t net)


/* /*
* $Log: t-dll-api.cc,v $ * $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 * Revision 1.17 2000/11/11 00:03:36 steve
* Add support for the t-dll backend grabing flip-flops. * Add support for the t-dll backend grabing flip-flops.
* *
Expand Down
22 changes: 19 additions & 3 deletions tgt-stub/stub.c
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #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 #endif


/* /*
Expand Down Expand Up @@ -90,13 +90,26 @@ static void show_expression(ivl_expr_t net, unsigned ind)


static void show_lpm(ivl_lpm_t net) static void show_lpm(ivl_lpm_t net)
{ {
unsigned idx;
unsigned width = ivl_lpm_width(net);

switch (ivl_lpm_type(net)) { switch (ivl_lpm_type(net)) {
case IVL_LPM_FF: { case IVL_LPM_FF: {
ivl_lpm_ff_t ff = ivl_lpm_ff(net); ivl_lpm_ff_t ff = ivl_lpm_ff(net);


fprintf(out, " LPM_FF %s: <width=%u>\n", fprintf(out, " LPM_FF %s: <width=%u>\n",
ivl_lpm_name(net), ivl_lpm_name(net), width);
ivl_lpm_width(net)); 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; break;
} }


Expand Down Expand Up @@ -361,6 +374,9 @@ DECLARE_CYGWIN_DLL(DllMain);


/* /*
* $Log: stub.c,v $ * $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 * Revision 1.24 2000/11/11 00:03:36 steve
* Add support for the t-dll backend grabing flip-flops. * Add support for the t-dll backend grabing flip-flops.
* *
Expand Down

0 comments on commit 0ca9b27

Please sign in to comment.