Remove short int restrictions from vvp opcodes. (part 2)

This commit is contained in:
steve 2003-06-17 21:28:59 +00:00
parent 96ca885aca
commit 2321df4bfc
5 changed files with 55 additions and 40 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll.cc,v 1.112 2003/05/13 16:30:39 steve Exp $"
#ident "$Id: t-dll.cc,v 1.113 2003/06/17 21:28:59 steve Exp $"
#endif
# include "config.h"
@ -946,7 +946,7 @@ bool dll_target::net_function(const NetUserFunc*net)
/* Save information about the ports in the ivl_lpm_s
structure. Note that port 0 is the return value. */
obj->u_.ufunc.ports = net->port_count();
obj->u_.ufunc.port_wid = new unsigned short[net->port_count()];
obj->u_.ufunc.port_wid = new unsigned[net->port_count()];
for (unsigned idx = 0 ; idx < obj->u_.ufunc.ports ; idx += 1)
obj->u_.ufunc.port_wid[idx] = net->port_width(idx);
@ -2128,6 +2128,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
/*
* $Log: t-dll.cc,v $
* Revision 1.113 2003/06/17 21:28:59 steve
* Remove short int restrictions from vvp opcodes. (part 2)
*
* Revision 1.112 2003/05/13 16:30:39 steve
* Clear pin pointers if pin is not connected.
*

61
t-dll.h
View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll.h,v 1.102 2003/04/22 04:48:30 steve Exp $"
#ident "$Id: t-dll.h,v 1.103 2003/06/17 21:28:59 steve Exp $"
#endif
# include "target.h"
@ -178,7 +178,7 @@ struct dll_target : public target_t, public expr_scan_t {
struct ivl_event_s {
const char*name;
ivl_scope_t scope;
unsigned short nany, nneg, npos;
unsigned nany, nneg, npos;
ivl_nexus_t*pins;
};
@ -192,7 +192,7 @@ struct ivl_expr_s {
ivl_expr_type_t type_;
ivl_variable_type_t value_;
unsigned width_ :24;
unsigned width_;
unsigned signed_ : 1;
union {
@ -208,8 +208,8 @@ struct ivl_expr_s {
} bitsel_;
struct {
unsigned rept :16;
unsigned parms :16;
unsigned rept;
unsigned parms;
ivl_expr_t*parm;
} concat_;
@ -232,9 +232,9 @@ struct ivl_expr_s {
} signal_;
struct {
const char *name_;
ivl_expr_t *parm;
unsigned short parms;
const char *name_;
ivl_expr_t *parm;
unsigned parms;
} sfunc_;
struct {
@ -255,8 +255,8 @@ struct ivl_expr_s {
struct {
ivl_scope_t def;
ivl_expr_t *parm;
unsigned short parms;
ivl_expr_t *parm;
unsigned parms;
} ufunc_;
struct {
@ -293,8 +293,8 @@ struct ivl_lpm_s {
union {
struct ivl_lpm_ff_s {
unsigned short width;
unsigned short swid; // ram only
unsigned width;
unsigned swid; // ram only
ivl_nexus_t clk;
ivl_nexus_t we;
ivl_nexus_t aclr;
@ -316,9 +316,9 @@ struct ivl_lpm_s {
} ff;
struct ivl_lpm_mux_s {
unsigned short width;
unsigned short size;
unsigned short swid;
unsigned width;
unsigned size;
unsigned swid;
ivl_nexus_t*d;
union {
ivl_nexus_t*pins;
@ -331,23 +331,23 @@ struct ivl_lpm_s {
} mux;
struct ivl_lpm_shift_s {
unsigned short width;
unsigned short select;
unsigned width;
unsigned select;
ivl_nexus_t*q;
ivl_nexus_t*d;
ivl_nexus_t*s;
} shift;
struct ivl_lpm_arith_s {
unsigned width :16;
unsigned width;
unsigned signed_flag :1;
ivl_nexus_t*q, *a, *b;
} arith;
struct ivl_lpm_ufunc_s {
ivl_scope_t def;
unsigned short ports;
unsigned short*port_wid;
unsigned ports;
unsigned *port_wid;
ivl_nexus_t*pins;
} ufunc;
} u_;
@ -368,8 +368,8 @@ enum ivl_lval_type_t {
};
struct ivl_lval_s {
unsigned width_ :24;
unsigned loff_ :24;
unsigned width_;
unsigned loff_;
unsigned type_ : 8;
ivl_expr_t idx;
union {
@ -384,7 +384,7 @@ struct ivl_lval_s {
* structural context.
*/
struct ivl_net_const_s {
unsigned width_ :24;
unsigned width_;
unsigned signed_ : 1;
union {
@ -425,7 +425,7 @@ struct ivl_net_logic_s {
struct ivl_udp_s {
const char* name;
unsigned nin;
unsigned short sequ;
unsigned sequ;
char init;
unsigned nrows;
typedef const char*ccharp_t;
@ -445,7 +445,7 @@ struct ivl_udp_s {
* input to the device, then the drives are both HiZ.
*/
struct ivl_nexus_ptr_s {
unsigned pin_ :24;
unsigned pin_;
unsigned type_ : 8;
unsigned drive0 : 3;
unsigned drive1 : 3;
@ -475,7 +475,7 @@ struct ivl_nexus_s {
struct ivl_memory_s {
const char*basename_;
ivl_scope_t scope_;
unsigned width_ :24;
unsigned width_;
unsigned signed_ : 1;
unsigned size_;
int root_;
@ -559,15 +559,15 @@ struct ivl_signal_s {
ivl_signal_type_t type_;
ivl_signal_port_t port_;
unsigned width_ :24;
unsigned width_;
unsigned signed_ : 1;
unsigned isint_ : 1;
unsigned local_ : 1;
/* These encode the run-time index for the least significant
bit, and the distance to the second bit. */
signed lsb_index :24;
signed lsb_dist : 8;
signed lsb_index;
signed lsb_dist;
const char*name_;
ivl_scope_t scope_;
@ -678,6 +678,9 @@ struct ivl_variable_s {
/*
* $Log: t-dll.h,v $
* Revision 1.103 2003/06/17 21:28:59 steve
* Remove short int restrictions from vvp opcodes. (part 2)
*
* Revision 1.102 2003/04/22 04:48:30 steve
* Support event names as expressions elements.
*

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: udp.cc,v 1.20 2003/04/01 05:32:56 steve Exp $"
#ident "$Id: udp.cc,v 1.21 2003/06/17 21:28:59 steve Exp $"
#endif
#include "udp.h"
@ -104,7 +104,7 @@ unsigned char vvp_udp_s::propagate(functor_t fu, vvp_ipoint_t uix)
udp_vec_t invec = 0x0; // vector of 2-bit inputs
for (int i=0; i < nin; i+=4)
for (unsigned i=0; i < nin; i+=4)
{
int idx = ipoint_input_index(base, i);
edge_inputs_functor_s *pfun =
@ -144,7 +144,7 @@ unsigned char vvp_udp_s::propagate(functor_t fu, vvp_ipoint_t uix)
udp_vec_t in1x = invec & in01; // all 'x' and '1'
udp_vec_t in0 = ~invec & in01; // all '0'
for (int ri=0; ri < ntable; ri++)
for (unsigned ri=0; ri < ntable; ri++)
{
udp_table_entry_t row = table+ri;
@ -360,6 +360,9 @@ void vvp_udp_s::compile_row_(udp_table_entry_t row, char *rchr)
/*
* $Log: udp.cc,v $
* Revision 1.21 2003/06/17 21:28:59 steve
* Remove short int restrictions from vvp opcodes. (part 2)
*
* Revision 1.20 2003/04/01 05:32:56 steve
* Propagate output of sequential udp like non-blocksing assign.
*

View File

@ -20,7 +20,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: udp.h,v 1.11 2002/08/12 01:35:08 steve Exp $"
#ident "$Id: udp.h,v 1.12 2003/06/17 21:28:59 steve Exp $"
#endif
#include "functor.h"
@ -33,9 +33,9 @@ struct vvp_udp_s
{
char *name;
udp_table_entry_t table;
unsigned short ntable;
unsigned short sequ;
unsigned short nin;
unsigned ntable;
unsigned sequ;
unsigned nin;
unsigned char init;
void compile_table(char **tab);
@ -62,6 +62,9 @@ public:
/*
* $Log: udp.h,v $
* Revision 1.12 2003/06/17 21:28:59 steve
* Remove short int restrictions from vvp opcodes. (part 2)
*
* Revision 1.11 2002/08/12 01:35:08 steve
* conditional ident string using autoconfig.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: vthread.cc,v 1.109 2003/06/17 19:17:42 steve Exp $"
#ident "$Id: vthread.cc,v 1.110 2003/06/17 21:28:59 steve Exp $"
#endif
# include "vthread.h"
@ -2372,7 +2372,7 @@ bool of_SET_X0(vthread_t thr, vvp_code_t cp)
if (idx < 0)
return true;
if (idx > cp->bit_idx[1])
if ((unsigned)idx > cp->bit_idx[1])
return true;
/* Form the functor pointer from the base pointer and the
@ -2722,6 +2722,9 @@ bool of_JOIN_UFUNC(vthread_t thr, vvp_code_t cp)
/*
* $Log: vthread.cc,v $
* Revision 1.110 2003/06/17 21:28:59 steve
* Remove short int restrictions from vvp opcodes. (part 2)
*
* Revision 1.109 2003/06/17 19:17:42 steve
* Remove short int restrictions from vvp opcodes.
*