Describe the new .net behavior.

This commit is contained in:
steve 2001-08-10 04:31:27 +00:00
parent 645c8913f1
commit a98b5023a8
1 changed files with 52 additions and 38 deletions

View File

@ -1,7 +1,7 @@
/* /*
* Copyright (c) 2001 Stephen Williams (steve@icarus.com) * Copyright (c) 2001 Stephen Williams (steve@icarus.com)
* *
* $Id: README.txt,v 1.34 2001/07/04 22:59:04 steve Exp $ * $Id: README.txt,v 1.35 2001/08/10 04:31:27 steve Exp $
*/ */
VVP SIMULATION ENGINE VVP SIMULATION ENGINE
@ -246,50 +246,64 @@ exactly the same as the .var statement:
<label> .net "name", <msb>, <lsb>, <symbols_list>; <label> .net "name", <msb>, <lsb>, <symbols_list>;
<label> .net/s "name", <msb>, <lsb>, <symbols_list>; <label> .net/s "name", <msb>, <lsb>, <symbols_list>;
A .net statement creates a functor for each bit of the vector in Like a .var statement, the .net statement creates a VPI object with
exactly the same way that a .var creates functors. The truth table for the basename and dimensions given as parameters, but unlike a .var
a .net functor is the same, as well. The net has an output that may be statement, it creates no functors. The symbol list is a list of
connected to something, but need not. The 0 (zero) input of each bit functors that feed into each bit of the vector, and the vpiHandle
functor is the normal input, and is connected to the output of a holds references to those functors that are fed it.
functor or another net.
The second functor input is a force net. This connects to an The <label> is required and is used to locate the net object that is
expression that is announced by a force statement of some sort. The represents. This label does not map to a functor, so only references
third input is the only input settable by behavioral code, it selects that know they want access .nets are able to locate the symbol. In
between the normal input and the force input. These inputs work particular, this includes behavioral %load and %wait instructions. The
exactly the same as those for the .var functors. references to net and reg objects are done through the .net label
instead of a general functor symbol. The instruction stores the
functor pointer, though.
Since .var items are written by behavioral code, there is no worry X A .net statement creates a functor for each bit of the vector in
about how to connect their inputs. You don't. But .net items do have X exactly the same way that a .var creates functors. The truth table for
inputs that need to be connected to the outputs of other X a .net functor is the same, as well. The net has an output that may be
functors. Nets are also complicated by the fact that they come in X connected to something, but need not. The 0 (zero) input of each bit
vectors, so the inputs of all the functors in the array need to be X functor is the normal input, and is connected to the output of a
connected. Fortunately, there is only one input per .net functor that X functor or another net.
can be connected, and that is input 0.
The force input and selector input are manipulated exactly the same X The second functor input is a force net. This connects to an
way as with .var force and selector inputs, so there is no need for a X expression that is announced by a force statement of some sort. The
syntax to handle them. X third input is the only input settable by behavioral code, it selects
X between the normal input and the force input. These inputs work
X exactly the same as those for the .var functors.
Since there is exactly one input per bit in the vector, it is easy X Since .var items are written by behavioral code, there is no worry
enough to just list the vvp_ipoint_t symbols in order. Each symbol X about how to connect their inputs. You don't. But .net items do have
references a functor, and connects the corresponding .net input to the X inputs that need to be connected to the outputs of other
output of that functor, as if the .net is an <N> bit wide functor. The X functors. Nets are also complicated by the fact that they come in
bits of the vector are connected least-significant-bit first. It is X vectors, so the inputs of all the functors in the array need to be
legal to leave a bit unconnected. To do that, simply leave the X connected. Fortunately, there is only one input per .net functor that
position for that bit blank. Bits of .nets are initialized to X can be connected, and that is input 0.
z. Unconnected bits keep the value z throughout the simulation.
The special input symbols "C<0>", "C<1>", "C<x>" and "C<z>" and magic X The force input and selector input are manipulated exactly the same
symbols that set the net to a constant value instead of accepting an X way as with .var force and selector inputs, so there is no need for a
input from a functor. This can happen, for example, when a wire is X syntax to handle them.
declared like so:
wire foo = 1'b1; X Since there is exactly one input per bit in the vector, it is easy
X enough to just list the vvp_ipoint_t symbols in order. Each symbol
X references a functor, and connects the corresponding .net input to the
X output of that functor, as if the .net is an <N> bit wide functor. The
X bits of the vector are connected least-significant-bit first. It is
X legal to leave a bit unconnected. To do that, simply leave the
X position for that bit blank. Bits of .nets are initialized to
X z. Unconnected bits keep the value z throughout the simulation.
This prevents any real functor being created and connected, and X The special input symbols "C<0>", "C<1>", "C<x>" and "C<z>" and magic
instead leaves the input unconnected and initializes the wire with the X symbols that set the net to a constant value instead of accepting an
specified value, instead of the default z. X input from a functor. This can happen, for example, when a wire is
X declared like so:
X wire foo = 1'b1;
X This prevents any real functor being created and connected, and
X instead leaves the input unconnected and initializes the wire with the
X specified value, instead of the default z.
MEMORY STATEMENTS: MEMORY STATEMENTS: