Update to new LPM API for flip-flops.
This commit is contained in:
parent
e85b669307
commit
a616cfd0c2
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: fit_log.c,v 1.2 2001/02/07 22:22:00 steve Exp $"
|
||||
#ident "$Id: fit_log.c,v 1.3 2001/05/16 03:55:30 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "ivl_target.h"
|
||||
|
|
@ -109,8 +109,8 @@ int fit_logic(void)
|
|||
/* If there is a reg, then the input to the cell is
|
||||
really the D input to the ff. */
|
||||
if (pin->reg) {
|
||||
assert(cell == ivl_lpm_ff_q(pin->reg, pin->reg_q));
|
||||
cell = ivl_lpm_ff_data(pin->reg, pin->reg_q);
|
||||
assert(cell == ivl_lpm_q(pin->reg, pin->reg_q));
|
||||
cell = ivl_lpm_data(pin->reg, pin->reg_q);
|
||||
}
|
||||
|
||||
assert(cell);
|
||||
|
|
@ -126,6 +126,9 @@ int fit_logic(void)
|
|||
|
||||
/*
|
||||
* $Log: fit_log.c,v $
|
||||
* Revision 1.3 2001/05/16 03:55:30 steve
|
||||
* Update to new LPM API for flip-flops.
|
||||
*
|
||||
* Revision 1.2 2001/02/07 22:22:00 steve
|
||||
* ivl_target header search path fixes.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: fit_reg.c,v 1.4 2001/02/07 22:22:00 steve Exp $"
|
||||
#ident "$Id: fit_reg.c,v 1.5 2001/05/16 03:55:30 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "ivl_target.h"
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
* not, then just pick a free macrocell and drop it there.
|
||||
*/
|
||||
|
||||
static int scan_ff_q(ivl_lpm_ff_t ff, unsigned q);
|
||||
static int scan_ff_q(ivl_lpm_t ff, unsigned q);
|
||||
|
||||
int fit_registers(ivl_scope_t scope, void*x)
|
||||
{
|
||||
|
|
@ -53,17 +53,15 @@ int fit_registers(ivl_scope_t scope, void*x)
|
|||
lpms = ivl_scope_lpms(scope);
|
||||
for (idx = 0 ; idx < lpms ; idx += 1) {
|
||||
ivl_lpm_t lpm = ivl_scope_lpm(scope, idx);
|
||||
ivl_lpm_ff_t ff;
|
||||
unsigned wid, q;
|
||||
|
||||
if (ivl_lpm_type(lpm) != IVL_LPM_FF)
|
||||
continue;
|
||||
|
||||
wid = ivl_lpm_width(lpm);
|
||||
ff = ivl_lpm_ff(lpm);
|
||||
|
||||
for (q = 0 ; q < wid ; q += 1) {
|
||||
rc = scan_ff_q(ff, q);
|
||||
rc = scan_ff_q(lpm, q);
|
||||
if (rc != 0)
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -76,12 +74,12 @@ int fit_registers(ivl_scope_t scope, void*x)
|
|||
* This is the part that actually assigns the single bit of a single
|
||||
* flip-flop to a single macrocell.
|
||||
*/
|
||||
int scan_ff_q(ivl_lpm_ff_t ff, unsigned q)
|
||||
int scan_ff_q(ivl_lpm_t ff, unsigned q)
|
||||
{
|
||||
unsigned idx;
|
||||
ivl_nexus_t nex;
|
||||
|
||||
nex = ivl_lpm_ff_q(ff, q);
|
||||
nex = ivl_lpm_q(ff, q);
|
||||
|
||||
/* First, look to see if the Q is already connected to a pin
|
||||
or an enable. If I find such a connection, then immediately
|
||||
|
|
@ -136,6 +134,9 @@ int scan_ff_q(ivl_lpm_ff_t ff, unsigned q)
|
|||
|
||||
/*
|
||||
* $Log: fit_reg.c,v $
|
||||
* Revision 1.5 2001/05/16 03:55:30 steve
|
||||
* Update to new LPM API for flip-flops.
|
||||
*
|
||||
* Revision 1.4 2001/02/07 22:22:00 steve
|
||||
* ivl_target header search path fixes.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: priv.h,v 1.5 2001/01/15 00:05:39 steve Exp $"
|
||||
#ident "$Id: priv.h,v 1.6 2001/05/16 03:55:30 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include <ivl_target.h>
|
||||
|
|
@ -74,7 +74,7 @@ struct pal_bind_s {
|
|||
term_t **enable_ex;
|
||||
|
||||
/* If there is a register here, this is it. */
|
||||
ivl_lpm_ff_t reg;
|
||||
ivl_lpm_t reg;
|
||||
unsigned reg_q;
|
||||
|
||||
/* The input to the cell is this expression. */
|
||||
|
|
@ -102,6 +102,9 @@ extern int emit_jedec(const char*path);
|
|||
|
||||
/*
|
||||
* $Log: priv.h,v $
|
||||
* Revision 1.6 2001/05/16 03:55:30 steve
|
||||
* Update to new LPM API for flip-flops.
|
||||
*
|
||||
* Revision 1.5 2001/01/15 00:05:39 steve
|
||||
* Add client data pointer for scope and process scanners.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue