-
Notifications
You must be signed in to change notification settings - Fork 11
Wiring
Wiring instructions occur inside module definitions. Wires connect pins of the module and pins of the containing instances.
wire <instname>['s] <instpin> [to] <instname>['s] <instpin> [,to <instname> <instpin>...] ;
wire is the mandatory declaration of a wire.
instname identifies the instance of the wire endpoint. It must be one of the following: -name of an instance in this module; -my, indicating that the wire endpoint is in this module's input or output list. -his or her, indicating that the wire endpoint is in the most-recently declared instance.
instpin must match the name of a pin in instname's input or output list. If the instname is my, it may also be one of: -vcc for power wires -gnd for ground wires
to is an optional separator.
A wire may connect an outgoing endpoint to any number of incoming endpoints. The syntax is designed for readability. Here are some examples of wiring:
wire my vcc to lut's IN0, lut's IN1, lut's IN2;
wire his OUT to my IN;
Wire declarations may refer to scalar wires or wire buses (declared as name:width in the appropriate module). A scalar wire may be wired to another scalar wire or a bus, in which case it is wired to every wire of a bus. A bus must be wired to another bus of the same width.
Documentation Table Of Contents Home