[sv-bc] DataTypes: Data-types,Nets etc.

From: Kevin Cameron <kcameron@altera.com>
Date: Thu Nov 11 2004 - 11:28:56 PST

Here's my take on it -

Data-type:

    An abstract description of data.

    Attributes of a data-type include:

        Built-in:

            Understood by the simulator - bit,bool,logic,real,integer

        Resolved:

            Can be used on wires with multiple drivers - logic (only,
            for now)

        User defined:

            Enums,structs,classes etc. User defined types may also be
            resolvable in future.

Objects:

    Process:

        A block of behavioral code (always,initial), or the evaluation
        code for primitive in the simulator.

    Net:

        A static connection between processes created at elaboration.
        Usually associated with a data-type and a net-type, but that
        isn't actually required since the data-types of the drivers and
        receivers are what's important. Semantic rules may be applied to
        the net e.g. restricting the number of drivers.

    Driver:

        The interface between a process and a net for assigning values
        to the net (reg,assign).

    Receiver:

        The interface between a process and a net for reading values
        from the net (this is usually transparent to the user).

Net-type:

    These determine the semantics or connection rules for drivers on a net.

    default: (see wire declaration)

        Simple connection, multiple drivers allowed for resolved data-types.

    wand/wor:

        Simple connection, multiple drivers allowed for resolved
        data-types, but data-type is a built-in type so that the
        simulator can add a pull-up/down (kernel driver) and use
        different driver resolution.

    tri0/tri1:

        As wand/wor but different resolution.

    wone:

        Restricts net to having a single driver even if data-type is
        resovable.

Declarations:

    wire <foo>:

        declares a net <foo> or a connection to net through port <foo>.
        Processes can read <foo> to get the (resolved) value of the net
        but not write it (except by force). Data-type defaults to logic,
        which is inherited by any attached receivers or drivers (assigns).

    reg <foo>:

        Creates a driver and attaches it to net <foo> or to net
        through port <foo>.
        Process reads are from net, writes go to driver. Data-type for
        the driver defaults to logic which is inherited by any receivers
        also attached to the net.

    trireg <foo>:

        As reg, but driver has tri semantics.

Comments:

    Part of the confusion with net-type/data-type semantics is due to
    the overloaded syntax, e.g. using "reg" to declare two objects (the
    net and the driver) makes it less obvious that the data-type is
    really only required for the driver (and receivers). Similarly,
    "wone" is a semantic restriction that doesn't really need a
    data-type, but it's syntactically convenient (as with "wire") to
    hang a data-type on it so that associated drivers and receivers
    don't need a seperate declaration.

    For Mixed-Signal the data-types of the drivers and receivers on a
    net do not need to match if resolution functions are supplied, such
    functions are expected to be supplied by the user (so their
    associated data-type is resovable but not built-in). The data-type
    associated with a net is ignored in such cases, but the net-type
    rules (e.g. "wone" for a single driver) may still apply.

Kev.

-- 
Altera Corp, 101 Innovation Drv, San Jose, CA 95134. T# (408) 544 7126
Received on Thu Nov 11 11:29:05 2004

This archive was generated by hypermail 2.1.8 : Thu Nov 11 2004 - 11:29:18 PST