From 7e0b0d7328f062ee044b8443bbb43182a18425b1 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 28 Jul 2001 03:12:39 +0000 Subject: [PATCH] Support C and C special symbols. --- vvp/compile.cc | 33 ++++++++++++++++++++++++++++++++- vvp/functor.h | 7 ++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/vvp/compile.cc b/vvp/compile.cc index ae67820c2..986d4fa43 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: compile.cc,v 1.90 2001/07/26 03:13:51 steve Exp $" +#ident "$Id: compile.cc,v 1.91 2001/07/28 03:12:39 steve Exp $" #endif # include "arith.h" @@ -291,6 +291,12 @@ static void inputs_connect(vvp_ipoint_t fdx, unsigned argc, struct symb_s*argv) continue; } + if (strcmp(argv[idx].text, "C") == 0) { + free(argv[idx].text); + functor_put_input(iobj, idx, 0, Su0); + continue; + } + if (strcmp(argv[idx].text, "C<1>") == 0) { free(argv[idx].text); functor_put_input(iobj, idx, 1, St1); @@ -303,6 +309,12 @@ static void inputs_connect(vvp_ipoint_t fdx, unsigned argc, struct symb_s*argv) continue; } + if (strcmp(argv[idx].text, "C") == 0) { + free(argv[idx].text); + functor_put_input(iobj, idx, 1, Su1); + continue; + } + if (strcmp(argv[idx].text, "C") == 0) { free(argv[idx].text); functor_put_input(iobj, idx, 2, StX); @@ -1367,12 +1379,28 @@ void compile_net(char*label, char*name, int msb, int lsb, bool signed_flag, continue; } + if (strcmp(argv[idx].text, "C") == 0) { + obj->oval = 0; + obj->odrive0 = 7; + obj->odrive1 = 7; + schedule_functor(ptr, 0); + continue; + } + if (strcmp(argv[idx].text, "C<1>") == 0) { obj->oval = 1; schedule_functor(ptr, 0); continue; } + if (strcmp(argv[idx].text, "C") == 0) { + obj->oval = 1; + obj->odrive0 = 7; + obj->odrive1 = 7; + schedule_functor(ptr, 0); + continue; + } + if (strcmp(argv[idx].text, "C") == 0) { obj->oval = 2; continue; @@ -1537,6 +1565,9 @@ vvp_ipoint_t debug_lookup_functor(const char*name) /* * $Log: compile.cc,v $ + * Revision 1.91 2001/07/28 03:12:39 steve + * Support C and C special symbols. + * * Revision 1.90 2001/07/26 03:13:51 steve * Make the -M flag add module search paths. * diff --git a/vvp/functor.h b/vvp/functor.h index b6c058af2..f33469987 100644 --- a/vvp/functor.h +++ b/vvp/functor.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: functor.h,v 1.28 2001/07/16 17:57:51 steve Exp $" +#ident "$Id: functor.h,v 1.29 2001/07/28 03:12:39 steve Exp $" #endif # include "pointers.h" @@ -161,8 +161,10 @@ typedef struct functor_s *functor_t; enum strength_e { HiZ = 0x00, + Su0 = 0x77, /* Su0-Su0 */ St0 = 0x66, /* St0-St0 */ Pu0 = 0x55, /* Pu0-Pu0 */ + Su1 = 0x77|0x88, /* Su1 - Su1 */ St1 = 0x66|0x88, /* St1 - St1 */ Pu1 = 0x55|0x88, /* Pu1 - Pu1 */ StX = 0x66|0x80, /* St0 - St1 */ @@ -298,6 +300,9 @@ extern const unsigned char ft_var[]; /* * $Log: functor.h,v $ + * Revision 1.29 2001/07/28 03:12:39 steve + * Support C and C special symbols. + * * Revision 1.28 2001/07/16 17:57:51 steve * Merge sig and old_ival into union to save space. *