Count different types of functors.
This commit is contained in:
parent
d0dfe2e7e7
commit
54b96ea7bd
12
vvp/bufif.cc
12
vvp/bufif.cc
|
|
@ -17,12 +17,19 @@
|
||||||
* 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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: bufif.cc,v 1.6 2001/12/19 23:43:03 steve Exp $"
|
#ident "$Id: bufif.cc,v 1.7 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "bufif.h"
|
# include "bufif.h"
|
||||||
# include "functor.h"
|
# include "functor.h"
|
||||||
# include "schedule.h"
|
# include "schedule.h"
|
||||||
|
# include "statistics.h"
|
||||||
|
|
||||||
|
vvp_bufif_s::vvp_bufif_s(bool en_invert, bool out_invert)
|
||||||
|
: pol_(en_invert? 1 : 0), inv_(out_invert? 1 : 0)
|
||||||
|
{
|
||||||
|
count_functors_bufif += 1;
|
||||||
|
}
|
||||||
|
|
||||||
void vvp_bufif_s::set(vvp_ipoint_t ptr, bool push, unsigned v, unsigned)
|
void vvp_bufif_s::set(vvp_ipoint_t ptr, bool push, unsigned v, unsigned)
|
||||||
{
|
{
|
||||||
|
|
@ -91,6 +98,9 @@ void vvp_bufif_s::set(vvp_ipoint_t ptr, bool push, unsigned v, unsigned)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: bufif.cc,v $
|
* $Log: bufif.cc,v $
|
||||||
|
* Revision 1.7 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.6 2001/12/19 23:43:03 steve
|
* Revision 1.6 2001/12/19 23:43:03 steve
|
||||||
* clarify bufif output strenghts.
|
* clarify bufif output strenghts.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: bufif.h,v 1.3 2001/12/14 06:03:17 steve Exp $"
|
#ident "$Id: bufif.h,v 1.4 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "functor.h"
|
# include "functor.h"
|
||||||
|
|
@ -27,8 +27,7 @@
|
||||||
class vvp_bufif_s : public functor_s {
|
class vvp_bufif_s : public functor_s {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
vvp_bufif_s(bool en_invert, bool out_invert)
|
vvp_bufif_s(bool en_invert, bool out_invert);
|
||||||
: pol_(en_invert? 1 : 0), inv_(out_invert? 1 : 0) {}
|
|
||||||
|
|
||||||
virtual void set(vvp_ipoint_t i, bool push, unsigned val, unsigned str);
|
virtual void set(vvp_ipoint_t i, bool push, unsigned val, unsigned str);
|
||||||
|
|
||||||
|
|
@ -39,6 +38,9 @@ class vvp_bufif_s : public functor_s {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: bufif.h,v $
|
* $Log: bufif.h,v $
|
||||||
|
* Revision 1.4 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.3 2001/12/14 06:03:17 steve
|
* Revision 1.3 2001/12/14 06:03:17 steve
|
||||||
* Arrange bufif to support notif as well.
|
* Arrange bufif to support notif as well.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: compile.cc,v 1.134 2002/07/05 17:14:15 steve Exp $"
|
#ident "$Id: compile.cc,v 1.135 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "arith.h"
|
# include "arith.h"
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
# include "schedule.h"
|
# include "schedule.h"
|
||||||
# include "vpi_priv.h"
|
# include "vpi_priv.h"
|
||||||
# include "parse_misc.h"
|
# include "parse_misc.h"
|
||||||
|
# include "statistics.h"
|
||||||
#ifdef HAVE_MALLOC_H
|
#ifdef HAVE_MALLOC_H
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1377,10 +1378,11 @@ void compile_variable(char*label, char*name, int msb, int lsb,
|
||||||
vvp_ipoint_t fdx = functor_allocate(wid);
|
vvp_ipoint_t fdx = functor_allocate(wid);
|
||||||
define_functor_symbol(label, fdx);
|
define_functor_symbol(label, fdx);
|
||||||
|
|
||||||
|
functor_t fu = new var_functor_s [wid];
|
||||||
for (unsigned idx = 0 ; idx < wid ; idx += 1) {
|
for (unsigned idx = 0 ; idx < wid ; idx += 1) {
|
||||||
functor_t fu = new var_functor_s;
|
functor_define(ipoint_index(fdx, idx), fu+idx);
|
||||||
functor_define(ipoint_index(fdx, idx), fu);
|
|
||||||
}
|
}
|
||||||
|
count_functors_var += wid;
|
||||||
|
|
||||||
/* Make the vpiHandle for the reg. */
|
/* Make the vpiHandle for the reg. */
|
||||||
vvp_fvector_t vec = vvp_fvector_continuous_new(wid, fdx);
|
vvp_fvector_t vec = vvp_fvector_continuous_new(wid, fdx);
|
||||||
|
|
@ -1421,6 +1423,9 @@ void compile_net(char*label, char*name, int msb, int lsb, bool signed_flag,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: compile.cc,v $
|
* $Log: compile.cc,v $
|
||||||
|
* Revision 1.135 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.134 2002/07/05 17:14:15 steve
|
* Revision 1.134 2002/07/05 17:14:15 steve
|
||||||
* Names of vpi objects allocated as vpip_strings.
|
* Names of vpi objects allocated as vpip_strings.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@
|
||||||
* 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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: logic.cc,v 1.8 2002/03/17 05:48:49 steve Exp $"
|
#ident "$Id: logic.cc,v 1.9 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "logic.h"
|
# include "logic.h"
|
||||||
# include "compile.h"
|
# include "compile.h"
|
||||||
# include "bufif.h"
|
# include "bufif.h"
|
||||||
# include "npmos.h"
|
# include "npmos.h"
|
||||||
|
# include "statistics.h"
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
# include <malloc.h>
|
# include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Implementation of the table functor, which provides logic with up
|
* Implementation of the table functor, which provides logic with up
|
||||||
* to 4 inputs.
|
* to 4 inputs.
|
||||||
|
|
@ -40,6 +41,7 @@
|
||||||
table_functor_s::table_functor_s(truth_t t, unsigned str0, unsigned str1)
|
table_functor_s::table_functor_s(truth_t t, unsigned str0, unsigned str1)
|
||||||
: table(t)
|
: table(t)
|
||||||
{
|
{
|
||||||
|
count_functors_table += 1;
|
||||||
assert(str0 <= 7);
|
assert(str0 <= 7);
|
||||||
assert(str1 <= 7);
|
assert(str1 <= 7);
|
||||||
odrive0 = str0;
|
odrive0 = str0;
|
||||||
|
|
@ -162,6 +164,9 @@ void compile_functor(char*label, char*type,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: logic.cc,v $
|
* $Log: logic.cc,v $
|
||||||
|
* Revision 1.9 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.8 2002/03/17 05:48:49 steve
|
* Revision 1.8 2002/03/17 05:48:49 steve
|
||||||
* Do not push values through logic gates.
|
* Do not push values through logic gates.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,11 @@
|
||||||
* 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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: logic.h,v 1.3 2002/01/12 04:02:16 steve Exp $"
|
#ident "$Id: logic.h,v 1.4 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "functor.h"
|
# include "functor.h"
|
||||||
|
# include <stddef.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Table driven functor. oval = table[ival];
|
* Table driven functor. oval = table[ival];
|
||||||
|
|
@ -62,6 +63,9 @@ extern const unsigned char ft_var[];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: logic.h,v $
|
* $Log: logic.h,v $
|
||||||
|
* Revision 1.4 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.3 2002/01/12 04:02:16 steve
|
* Revision 1.3 2002/01/12 04:02:16 steve
|
||||||
* Support the BUFZ logic device.
|
* Support the BUFZ logic device.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: main.cc,v 1.27 2002/07/05 17:14:15 steve Exp $"
|
#ident "$Id: main.cc,v 1.28 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
@ -239,6 +239,10 @@ int main(int argc, char*argv[])
|
||||||
|
|
||||||
if (verbose_flag) {
|
if (verbose_flag) {
|
||||||
fprintf(stderr, " ... %8lu functors\n", count_functors);
|
fprintf(stderr, " ... %8lu functors\n", count_functors);
|
||||||
|
fprintf(stderr, " %8lu table\n", count_functors_table);
|
||||||
|
fprintf(stderr, " %8lu bufif\n", count_functors_bufif);
|
||||||
|
fprintf(stderr, " %8lu resolv\n", count_functors_resolv);
|
||||||
|
fprintf(stderr, " %8lu variable\n", count_functors_var);
|
||||||
fprintf(stderr, " ... %8lu opcodes (%lu bytes)\n",
|
fprintf(stderr, " ... %8lu opcodes (%lu bytes)\n",
|
||||||
count_opcodes, size_opcodes);
|
count_opcodes, size_opcodes);
|
||||||
fprintf(stderr, " ... %8lu nets\n", count_vpi_nets);
|
fprintf(stderr, " ... %8lu nets\n", count_vpi_nets);
|
||||||
|
|
@ -275,6 +279,9 @@ int main(int argc, char*argv[])
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: main.cc,v $
|
* $Log: main.cc,v $
|
||||||
|
* Revision 1.28 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.27 2002/07/05 17:14:15 steve
|
* Revision 1.27 2002/07/05 17:14:15 steve
|
||||||
* Names of vpi objects allocated as vpip_strings.
|
* Names of vpi objects allocated as vpip_strings.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,12 @@
|
||||||
* 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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: resolv.cc,v 1.12 2001/12/18 05:32:11 steve Exp $"
|
#ident "$Id: resolv.cc,v 1.13 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "resolv.h"
|
# include "resolv.h"
|
||||||
# include "schedule.h"
|
# include "schedule.h"
|
||||||
|
# include "statistics.h"
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -135,6 +136,7 @@ static unsigned blend(unsigned a, unsigned b)
|
||||||
|
|
||||||
resolv_functor_s::resolv_functor_s(unsigned char pull)
|
resolv_functor_s::resolv_functor_s(unsigned char pull)
|
||||||
{
|
{
|
||||||
|
count_functors_resolv += 1;
|
||||||
istr[0]=istr[1]=istr[2]=istr[3]=StX;
|
istr[0]=istr[1]=istr[2]=istr[3]=StX;
|
||||||
hiz_ = pull;
|
hiz_ = pull;
|
||||||
}
|
}
|
||||||
|
|
@ -201,6 +203,9 @@ void resolv_functor_s::debug_print(vvp_ipoint_t fnc)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: resolv.cc,v $
|
* $Log: resolv.cc,v $
|
||||||
|
* Revision 1.13 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.12 2001/12/18 05:32:11 steve
|
* Revision 1.12 2001/12/18 05:32:11 steve
|
||||||
* Improved functor debug dumps.
|
* Improved functor debug dumps.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: statistics.cc,v 1.3 2002/07/05 17:14:15 steve Exp $"
|
#ident "$Id: statistics.cc,v 1.4 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "statistics.h"
|
# include "statistics.h"
|
||||||
|
|
@ -28,6 +28,10 @@
|
||||||
unsigned long count_opcodes = 0;
|
unsigned long count_opcodes = 0;
|
||||||
|
|
||||||
unsigned long count_functors = 0;
|
unsigned long count_functors = 0;
|
||||||
|
unsigned long count_functors_table = 0;
|
||||||
|
unsigned long count_functors_bufif = 0;
|
||||||
|
unsigned long count_functors_resolv= 0;
|
||||||
|
unsigned long count_functors_var = 0;
|
||||||
|
|
||||||
unsigned long count_vpi_nets = 0;
|
unsigned long count_vpi_nets = 0;
|
||||||
|
|
||||||
|
|
@ -40,6 +44,9 @@ size_t size_opcodes = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: statistics.cc,v $
|
* $Log: statistics.cc,v $
|
||||||
|
* Revision 1.4 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.3 2002/07/05 17:14:15 steve
|
* Revision 1.3 2002/07/05 17:14:15 steve
|
||||||
* Names of vpi objects allocated as vpip_strings.
|
* Names of vpi objects allocated as vpip_strings.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,17 @@
|
||||||
* 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)
|
#if !defined(WINNT)
|
||||||
#ident "$Id: statistics.h,v 1.3 2002/07/05 17:14:15 steve Exp $"
|
#ident "$Id: statistics.h,v 1.4 2002/07/05 20:08:44 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
|
|
||||||
extern unsigned long count_opcodes;
|
extern unsigned long count_opcodes;
|
||||||
extern unsigned long count_functors;
|
extern unsigned long count_functors;
|
||||||
|
extern unsigned long count_functors_table;
|
||||||
|
extern unsigned long count_functors_bufif;
|
||||||
|
extern unsigned long count_functors_resolv;
|
||||||
|
extern unsigned long count_functors_var;
|
||||||
extern unsigned long count_vpi_nets;
|
extern unsigned long count_vpi_nets;
|
||||||
extern unsigned long count_vpi_scopes;
|
extern unsigned long count_vpi_scopes;
|
||||||
extern unsigned long count_vpi_memories;
|
extern unsigned long count_vpi_memories;
|
||||||
|
|
@ -34,6 +38,9 @@ extern size_t size_opcodes;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: statistics.h,v $
|
* $Log: statistics.h,v $
|
||||||
|
* Revision 1.4 2002/07/05 20:08:44 steve
|
||||||
|
* Count different types of functors.
|
||||||
|
*
|
||||||
* Revision 1.3 2002/07/05 17:14:15 steve
|
* Revision 1.3 2002/07/05 17:14:15 steve
|
||||||
* Names of vpi objects allocated as vpip_strings.
|
* Names of vpi objects allocated as vpip_strings.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue