|
||
This chapter describes the basic objects and organizational aspects of ProtoCollum.
ProtoCollum is an object oriented tool. The graphical items seen on Edit and Test Sheets, such as PEs, Messages, and Rules, are program objects that have state and methods that can be invoked. Figure 2.1 shows how a graphical class is wrapped around the base class of each object so that a user can interact with the objects via the ProtoCollum graphical user interface (GUI).
The important implication of this object organization is that the ProtoCollum tool can be run as a shell or batch program without the graphical classes. (See the demo/uproc/ area of the download for an example.) Thus, if a protocol architecture in ProtoCollum was being used as a Checker for a lower-level RTL model, one could run hundreds of batch jobs overnight, and then in the morning, come in and debug any mismatched jobs in the GUI version of ProtoCollum.
For information on how to write code using ProtoCollum objects, see the advanced topic Writing Tcl Code.
A Binder object is the top level object that contains the protocol architecture description consisting of PE, Message, Rule, and other objects. A Binder also contains any number of Test Sheets, which are directly related to the architecture description.
When a Binder object is saved to a file, it uses an XML format, and is organized such that the graphical properties of objects are kept seperate from architectural properties. This allows the same .mps file to be used by the shell and the GUI version of ProtoCollum.
A Binder object has a one to one correspondence to a .mps file.
The key to understanding the Edit Sheet is to know that the fundamental principle upon which it is based is the simple state machine.
Figure 2.2 shows a simple state machine which can be used to model a message passing system. An incoming message, possibly containing parameters, causes the system to use the current state and combinational logic to determine if the state should be updated and if one or more output messages should be sent.
In Figure 2.3, the state machine is labeled and organized into smaller discrete pieces to form a Rule:
A Guard event is written as a true/false expression (in terms of message reception or state). When all Guard events are determined to be true, then the Action events of the Rule will occur. This is known as "triggering" or "firing" the Rule.
In order to create a protocol model, you identify the Processing Entities (PE) in the system and define Rules which describe each distinct behavior that happens when a Message is received and each behavior that causes a Message to be sent.
This type of rule based description is well suited to the demands of protocol specification; the rules can be very general initially and, due to their encapsulated nature, it is easy to refine and modify them over time.
Figure 2.4 shows how a Rule model (really a state machine model) matches up with the graphical items on the Edit Sheet. So each Rule is really a small state machine which looks at incoming Messages and current State, to determine whether Messages should be sent or State updated.
The events Begin, Mid, and End exist in order to facilitate grouping of the Guard and Action events. They also provide symmetry and cleanness of implementation for the graphical editor, but are not part of the execution model.
Another four objects are used to model message connection; Message, Gate, Segment, and Pin. (The Pin object is discussed later.) Note that an Edit Sheet only shows the relationships or connectedness of Messages and Rules, there is no implication of ordering or time in the diagrams. Figure 2.5 and the discussion below summarizes each object used on the Edit Sheet.
For more information on Edit sheets, see Using Edit Sheets.
A Test Sheet is where the behavior of a protocol design is exercised. On a Test Sheet you can outline a chain of events for each Processing Entity (PE) in the protocol architecture by controlling the connection of messages. By creating various sequences of events, the PE can be tested for correct behavior. The collection of PE, message, and event objects on a Test Sheet are organized as pieces of a scenario object. There is one scenario object per Test sheet.
As messages are sent from one Processing Entity to another, the protocol model defined on the Edit sheets is executed. The arrival of a message and its parameter values may cause a state change in the PE, or it may cause other messages to be sent. These actions are added to the display while the messages are interactively connected.
Since the Test Sheet or scenario object is a representation of how messages were actually sent and received in a particular instance, there is a time ordering implied in the diagram. Time flows from top to bottom in the diagram. So messages sent/received at the top of the diagram happened earlier than messages sent/received at the bottom of the diagram.
Figure 2.6 shows an example of a simple test scenario. In this scenario, an initial message arrives at PE 0 (instantiated as petest_0). This arrival of this message causes rule_0 to trigger. One action of rule_0 is send another message to PE 1 (instantiated as petest_1). The arrival of that message causes rule_2 to trigger.
The various objects found in a test scenario are as follows:
For more information on Test sheets, see Using Test Sheets.
|
Copyright © 2003-2005 by Bellum Software
last updated on 29 May 2005 |