Support C<su0> and C<su1> special symbols.

This commit is contained in:
steve 2001-07-28 03:12:39 +00:00
parent 1be77d68ce
commit 7e0b0d7328
2 changed files with 38 additions and 2 deletions

View File

@ -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<su0>") == 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<su1>") == 0) {
free(argv[idx].text);
functor_put_input(iobj, idx, 1, Su1);
continue;
}
if (strcmp(argv[idx].text, "C<x>") == 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<su0>") == 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<su1>") == 0) {
obj->oval = 1;
obj->odrive0 = 7;
obj->odrive1 = 7;
schedule_functor(ptr, 0);
continue;
}
if (strcmp(argv[idx].text, "C<x>") == 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<su0> and C<su1> special symbols.
*
* Revision 1.90 2001/07/26 03:13:51 steve
* Make the -M flag add module search paths.
*

View File

@ -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<su0> and C<su1> special symbols.
*
* Revision 1.28 2001/07/16 17:57:51 steve
* Merge sig and old_ival into union to save space.
*