Pass FF synchronous set values to code generator.
This commit is contained in:
parent
c26df174a1
commit
7521aa83f8
39
t-dll-api.cc
39
t-dll-api.cc
|
|
@ -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
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: t-dll-api.cc,v 1.103 2003/08/22 23:14:26 steve Exp $"
|
#ident "$Id: t-dll-api.cc,v 1.104 2003/09/03 23:33:30 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -464,8 +464,25 @@ extern "C" const char* ivl_expr_string(ivl_expr_t net)
|
||||||
|
|
||||||
extern "C" unsigned long ivl_expr_uvalue(ivl_expr_t net)
|
extern "C" unsigned long ivl_expr_uvalue(ivl_expr_t net)
|
||||||
{
|
{
|
||||||
assert(net->type_ == IVL_EX_ULONG);
|
switch (net->type_) {
|
||||||
return net->u_.ulong_.value;
|
|
||||||
|
case IVL_EX_ULONG:
|
||||||
|
return net->u_.ulong_.value;
|
||||||
|
|
||||||
|
case IVL_EX_NUMBER: {
|
||||||
|
unsigned long val = 0;
|
||||||
|
for (unsigned long idx = 0 ; idx < net->width_ ; idx += 1) {
|
||||||
|
if (net->u_.number_.bits_[idx] == '1')
|
||||||
|
val |= 1UL << idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" ivl_variable_type_t ivl_expr_value(ivl_expr_t net)
|
extern "C" ivl_variable_type_t ivl_expr_value(ivl_expr_t net)
|
||||||
|
|
@ -681,6 +698,19 @@ extern "C" ivl_expr_t ivl_lpm_aset_value(ivl_lpm_t net)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
extern "C" ivl_expr_t ivl_lpm_sset_value(ivl_lpm_t net)
|
||||||
|
{
|
||||||
|
assert(net);
|
||||||
|
switch (net->type) {
|
||||||
|
case IVL_LPM_FF:
|
||||||
|
case IVL_LPM_RAM:
|
||||||
|
return net->u_.ff.sset_value;
|
||||||
|
default:
|
||||||
|
assert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" ivl_scope_t ivl_lpm_define(ivl_lpm_t net)
|
extern "C" ivl_scope_t ivl_lpm_define(ivl_lpm_t net)
|
||||||
{
|
{
|
||||||
assert(net);
|
assert(net);
|
||||||
|
|
@ -1883,6 +1913,9 @@ extern "C" ivl_variable_type_t ivl_variable_type(ivl_variable_t net)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll-api.cc,v $
|
* $Log: t-dll-api.cc,v $
|
||||||
|
* Revision 1.104 2003/09/03 23:33:30 steve
|
||||||
|
* Pass FF synchronous set values to code generator.
|
||||||
|
*
|
||||||
* Revision 1.103 2003/08/22 23:14:26 steve
|
* Revision 1.103 2003/08/22 23:14:26 steve
|
||||||
* Preserve variable ranges all the way to the vpi.
|
* Preserve variable ranges all the way to the vpi.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
21
t-dll.cc
21
t-dll.cc
|
|
@ -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
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: t-dll.cc,v 1.120 2003/08/22 04:14:33 steve Exp $"
|
#ident "$Id: t-dll.cc,v 1.121 2003/09/03 23:33:29 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -1537,8 +1537,20 @@ void dll_target::lpm_ff(const NetFF*net)
|
||||||
obj->u_.ff.sclr = 0;
|
obj->u_.ff.sclr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXXX Not supported yet. */
|
if (net->pin_Sset().is_linked()) {
|
||||||
obj->u_.ff.sset = 0;
|
nex = net->pin_Sset().nexus();
|
||||||
|
assert(nex->t_cookie());
|
||||||
|
obj->u_.ff.sset = (ivl_nexus_t) nex->t_cookie();
|
||||||
|
assert(obj->u_.ff.sset);
|
||||||
|
nexus_lpm_add(obj->u_.ff.sset, obj, 0, IVL_DR_HiZ, IVL_DR_HiZ);
|
||||||
|
|
||||||
|
verinum tmp = net->sset_value();
|
||||||
|
obj->u_.ff.sset_value = expr_from_value_(tmp);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
obj->u_.ff.sset = 0;
|
||||||
|
obj->u_.ff.sset_value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (obj->u_.ff.width == 1) {
|
if (obj->u_.ff.width == 1) {
|
||||||
nex = net->pin_Q(0).nexus();
|
nex = net->pin_Q(0).nexus();
|
||||||
|
|
@ -2147,6 +2159,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll.cc,v $
|
* $Log: t-dll.cc,v $
|
||||||
|
* Revision 1.121 2003/09/03 23:33:29 steve
|
||||||
|
* Pass FF synchronous set values to code generator.
|
||||||
|
*
|
||||||
* Revision 1.120 2003/08/22 04:14:33 steve
|
* Revision 1.120 2003/08/22 04:14:33 steve
|
||||||
* Fix uninitialized sset member.
|
* Fix uninitialized sset member.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
6
t-dll.h
6
t-dll.h
|
|
@ -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
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
#ifdef HAVE_CVS_IDENT
|
||||||
#ident "$Id: t-dll.h,v 1.105 2003/08/15 02:23:53 steve Exp $"
|
#ident "$Id: t-dll.h,v 1.106 2003/09/03 23:33:29 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "target.h"
|
# include "target.h"
|
||||||
|
|
@ -315,6 +315,7 @@ struct ivl_lpm_s {
|
||||||
} s;
|
} s;
|
||||||
ivl_memory_t mem; // ram only
|
ivl_memory_t mem; // ram only
|
||||||
ivl_expr_t aset_value;
|
ivl_expr_t aset_value;
|
||||||
|
ivl_expr_t sset_value;
|
||||||
} ff;
|
} ff;
|
||||||
|
|
||||||
struct ivl_lpm_mux_s {
|
struct ivl_lpm_mux_s {
|
||||||
|
|
@ -683,6 +684,9 @@ struct ivl_variable_s {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: t-dll.h,v $
|
* $Log: t-dll.h,v $
|
||||||
|
* Revision 1.106 2003/09/03 23:33:29 steve
|
||||||
|
* Pass FF synchronous set values to code generator.
|
||||||
|
*
|
||||||
* Revision 1.105 2003/08/15 02:23:53 steve
|
* Revision 1.105 2003/08/15 02:23:53 steve
|
||||||
* Add synthesis support for synchronous reset.
|
* Add synthesis support for synchronous reset.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue