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 * 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.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 #endif
# include "config.h" # 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 /* Save information about the ports in the ivl_lpm_s
structure. Note that port 0 is the return value. */ structure. Note that port 0 is the return value. */
obj->u_.ufunc.ports = net->port_count(); 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) for (unsigned idx = 0 ; idx < obj->u_.ufunc.ports ; idx += 1)
obj->u_.ufunc.port_wid[idx] = net->port_width(idx); 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 $ * $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 * Revision 1.112 2003/05/13 16:30:39 steve
* Clear pin pointers if pin is not connected. * 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 * 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.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 #endif
# include "target.h" # include "target.h"
@ -178,7 +178,7 @@ struct dll_target : public target_t, public expr_scan_t {
struct ivl_event_s { struct ivl_event_s {
const char*name; const char*name;
ivl_scope_t scope; ivl_scope_t scope;
unsigned short nany, nneg, npos; unsigned nany, nneg, npos;
ivl_nexus_t*pins; ivl_nexus_t*pins;
}; };
@ -192,7 +192,7 @@ struct ivl_expr_s {
ivl_expr_type_t type_; ivl_expr_type_t type_;
ivl_variable_type_t value_; ivl_variable_type_t value_;
unsigned width_ :24; unsigned width_;
unsigned signed_ : 1; unsigned signed_ : 1;
union { union {
@ -208,8 +208,8 @@ struct ivl_expr_s {
} bitsel_; } bitsel_;
struct { struct {
unsigned rept :16; unsigned rept;
unsigned parms :16; unsigned parms;
ivl_expr_t*parm; ivl_expr_t*parm;
} concat_; } concat_;
@ -232,9 +232,9 @@ struct ivl_expr_s {
} signal_; } signal_;
struct { struct {
const char *name_; const char *name_;
ivl_expr_t *parm; ivl_expr_t *parm;
unsigned short parms; unsigned parms;
} sfunc_; } sfunc_;
struct { struct {
@ -255,8 +255,8 @@ struct ivl_expr_s {
struct { struct {
ivl_scope_t def; ivl_scope_t def;
ivl_expr_t *parm; ivl_expr_t *parm;
unsigned short parms; unsigned parms;
} ufunc_; } ufunc_;
struct { struct {
@ -293,8 +293,8 @@ struct ivl_lpm_s {
union { union {
struct ivl_lpm_ff_s { struct ivl_lpm_ff_s {
unsigned short width; unsigned width;
unsigned short swid; // ram only unsigned swid; // ram only
ivl_nexus_t clk; ivl_nexus_t clk;
ivl_nexus_t we; ivl_nexus_t we;
ivl_nexus_t aclr; ivl_nexus_t aclr;
@ -316,9 +316,9 @@ struct ivl_lpm_s {
} ff; } ff;
struct ivl_lpm_mux_s { struct ivl_lpm_mux_s {
unsigned short width; unsigned width;
unsigned short size; unsigned size;
unsigned short swid; unsigned swid;
ivl_nexus_t*d; ivl_nexus_t*d;
union { union {
ivl_nexus_t*pins; ivl_nexus_t*pins;
@ -331,23 +331,23 @@ struct ivl_lpm_s {
} mux; } mux;
struct ivl_lpm_shift_s { struct ivl_lpm_shift_s {
unsigned short width; unsigned width;
unsigned short select; unsigned select;
ivl_nexus_t*q; ivl_nexus_t*q;
ivl_nexus_t*d; ivl_nexus_t*d;
ivl_nexus_t*s; ivl_nexus_t*s;
} shift; } shift;
struct ivl_lpm_arith_s { struct ivl_lpm_arith_s {
unsigned width :16; unsigned width;
unsigned signed_flag :1; unsigned signed_flag :1;
ivl_nexus_t*q, *a, *b; ivl_nexus_t*q, *a, *b;
} arith; } arith;
struct ivl_lpm_ufunc_s { struct ivl_lpm_ufunc_s {
ivl_scope_t def; ivl_scope_t def;
unsigned short ports; unsigned ports;
unsigned short*port_wid; unsigned *port_wid;
ivl_nexus_t*pins; ivl_nexus_t*pins;
} ufunc; } ufunc;
} u_; } u_;
@ -368,8 +368,8 @@ enum ivl_lval_type_t {
}; };
struct ivl_lval_s { struct ivl_lval_s {
unsigned width_ :24; unsigned width_;
unsigned loff_ :24; unsigned loff_;
unsigned type_ : 8; unsigned type_ : 8;
ivl_expr_t idx; ivl_expr_t idx;
union { union {
@ -384,7 +384,7 @@ struct ivl_lval_s {
* structural context. * structural context.
*/ */
struct ivl_net_const_s { struct ivl_net_const_s {
unsigned width_ :24; unsigned width_;
unsigned signed_ : 1; unsigned signed_ : 1;
union { union {
@ -425,7 +425,7 @@ struct ivl_net_logic_s {
struct ivl_udp_s { struct ivl_udp_s {
const char* name; const char* name;
unsigned nin; unsigned nin;
unsigned short sequ; unsigned sequ;
char init; char init;
unsigned nrows; unsigned nrows;
typedef const char*ccharp_t; typedef const char*ccharp_t;
@ -445,7 +445,7 @@ struct ivl_udp_s {
* input to the device, then the drives are both HiZ. * input to the device, then the drives are both HiZ.
*/ */
struct ivl_nexus_ptr_s { struct ivl_nexus_ptr_s {
unsigned pin_ :24; unsigned pin_;
unsigned type_ : 8; unsigned type_ : 8;
unsigned drive0 : 3; unsigned drive0 : 3;
unsigned drive1 : 3; unsigned drive1 : 3;
@ -475,7 +475,7 @@ struct ivl_nexus_s {
struct ivl_memory_s { struct ivl_memory_s {
const char*basename_; const char*basename_;
ivl_scope_t scope_; ivl_scope_t scope_;
unsigned width_ :24; unsigned width_;
unsigned signed_ : 1; unsigned signed_ : 1;
unsigned size_; unsigned size_;
int root_; int root_;
@ -559,15 +559,15 @@ struct ivl_signal_s {
ivl_signal_type_t type_; ivl_signal_type_t type_;
ivl_signal_port_t port_; ivl_signal_port_t port_;
unsigned width_ :24; unsigned width_;
unsigned signed_ : 1; unsigned signed_ : 1;
unsigned isint_ : 1; unsigned isint_ : 1;
unsigned local_ : 1; unsigned local_ : 1;
/* These encode the run-time index for the least significant /* These encode the run-time index for the least significant
bit, and the distance to the second bit. */ bit, and the distance to the second bit. */
signed lsb_index :24; signed lsb_index;
signed lsb_dist : 8; signed lsb_dist;
const char*name_; const char*name_;
ivl_scope_t scope_; ivl_scope_t scope_;
@ -678,6 +678,9 @@ struct ivl_variable_s {
/* /*
* $Log: t-dll.h,v $ * $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 * Revision 1.102 2003/04/22 04:48:30 steve
* Support event names as expressions elements. * Support event names as expressions elements.
* *

View File

@ -18,7 +18,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: 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 #endif
#include "udp.h" #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 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); int idx = ipoint_input_index(base, i);
edge_inputs_functor_s *pfun = 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 in1x = invec & in01; // all 'x' and '1'
udp_vec_t in0 = ~invec & in01; // all '0' 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; 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 $ * $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 * Revision 1.20 2003/04/01 05:32:56 steve
* Propagate output of sequential udp like non-blocksing assign. * 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 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #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 #endif
#include "functor.h" #include "functor.h"
@ -33,9 +33,9 @@ struct vvp_udp_s
{ {
char *name; char *name;
udp_table_entry_t table; udp_table_entry_t table;
unsigned short ntable; unsigned ntable;
unsigned short sequ; unsigned sequ;
unsigned short nin; unsigned nin;
unsigned char init; unsigned char init;
void compile_table(char **tab); void compile_table(char **tab);
@ -62,6 +62,9 @@ public:
/* /*
* $Log: udp.h,v $ * $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 * Revision 1.11 2002/08/12 01:35:08 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *

View File

@ -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: 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 #endif
# include "vthread.h" # include "vthread.h"
@ -2372,7 +2372,7 @@ bool of_SET_X0(vthread_t thr, vvp_code_t cp)
if (idx < 0) if (idx < 0)
return true; return true;
if (idx > cp->bit_idx[1]) if ((unsigned)idx > cp->bit_idx[1])
return true; return true;
/* Form the functor pointer from the base pointer and the /* 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 $ * $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 * Revision 1.109 2003/06/17 19:17:42 steve
* Remove short int restrictions from vvp opcodes. * Remove short int restrictions from vvp opcodes.
* *