From 82c0a2ebacb4c43d2793ea175a07ca31f719ac37 Mon Sep 17 00:00:00 2001 From: steve Date: Thu, 1 Nov 2001 03:00:19 +0000 Subject: [PATCH] Add force/cassign/release/deassign support. (Stephan Boettcher) --- vvp/Makefile.in | 4 +- vvp/README.txt | 38 ++++++-- vvp/codes.h | 29 ++++-- vvp/compile.cc | 63 ++++++++++-- vvp/compile.h | 11 ++- vvp/force.cc | 250 ++++++++++++++++++++++++++++++++++++++++++++++++ vvp/force.h | 59 ++++++++++++ vvp/functor.cc | 20 +--- vvp/functor.h | 43 ++------- vvp/lexor.lex | 6 +- vvp/opcodes.txt | 42 +++++++- vvp/parse.y | 14 ++- vvp/vthread.cc | 227 +++++++++++++++++++++---------------------- 13 files changed, 609 insertions(+), 197 deletions(-) create mode 100644 vvp/force.cc create mode 100644 vvp/force.h diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 3911c80fa..185b6c1aa 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -16,7 +16,7 @@ # 59 Temple Place - Suite 330 # Boston, MA 02111-1307, USA # -#ident "$Id: Makefile.in,v 1.29 2001/10/21 21:59:50 steve Exp $" +#ident "$Id: Makefile.in,v 1.30 2001/11/01 03:00:19 steve Exp $" # # SHELL = /bin/sh @@ -65,7 +65,7 @@ vpi_vthr_vector.o vvp_vpi.o O = main.o parse.o parse_misc.o lexor.o arith.o bufif.o compile.o debug.o \ functor.o fvectors.o npmos.o resolv.o symbols.o codes.o vthread.o schedule.o \ -tables.o udp.o memory.o $V +tables.o udp.o memory.o force.o $V vvp: $O $(CXX) $(rdynamic) $(CXXFLAGS) $(LDFLAGS) -o vvp $O $(LIBS) $(dllib) diff --git a/vvp/README.txt b/vvp/README.txt index 630539c00..352862e35 100644 --- a/vvp/README.txt +++ b/vvp/README.txt @@ -1,7 +1,7 @@ /* * Copyright (c) 2001 Stephen Williams (steve@icarus.com) * - * $Id: README.txt,v 1.37 2001/10/16 02:47:37 steve Exp $ + * $Id: README.txt,v 1.38 2001/11/01 03:00:19 steve Exp $ */ VVP SIMULATION ENGINE @@ -218,12 +218,13 @@ read by behavioral code. If the .var represents a vector of .functors, the index of the LSB is always, from the perspective of vvp, ZERO. The , details are there only for the benefit of VPI support. -The variable .functor implicitly has three inputs. The first is the -value that gets set by assignments or procedural continuous -assignments. The second is a forced value that can be connected to a -force expression (as a functor) when a value is being forced. And the -third input selects the source to use. The default is to select the -assignment input. +The variable .functor implicitly has two inputs. The first is the +value that gets set by assignments. The second input is connected to +the driving expression of a procedural continuous assignments. +Variable functors have an extra internal bit that tells if a +procedural continuous assignment is active. The %cassign opcode +connects and activates the procedural continuous assignment. The +%deassign opcode disconnects and deactivates it. The variable statement also creates a VPI object of the appropriate type. See the vpi.txt file for details about that object. The msb and @@ -397,6 +398,29 @@ resolution function.