3.6 Stage


It was said in Section 3.2 that hardware operation is described with a procedure in SFL. The stage is a component element that expresses this procedure. There is only one procedure in software no matter how complicated an operation is. However, it is difficult to express the parallelism of hardware with one procedure. The component element "stage" is provided to allow the description of multiple procedures.

Controlling multiple stages

Complicated control can be described easily by using multiple stages.

(1) Parallel control : A way of increasing parallel processing is for a stage to subcontract a job, as it were, to more than one stage and to wait until the subcontracts are completed. The generation of a subcontract is described by generating a job, and the job is terminated when it is done.

(2) Leave behind control : Another way to increase parallel processing is for a stage to subcontract a job to another stage but proceed with its own processing without keeping itself on hold until it receives a reply. The generation of a subcontract is described by generating a job, and the job is terminated when it is done.

(3) Pipeline control : Still another way of increasing parallel processing is to let a processing operation be handled by multiple stages in sequence. Transfer of processes from one stage to another is described by the transfer of a job.

Job generation means that "a stage generates in another stage a new state of being in operation which is separate from itself being in operation." Job transfer means that "a stage transfers (delivers) its own state of being in operation to another stage." Job end means that "the state of being in operation is terminated (erased)." Job is "the state of being in operation that can be generated, transferred between stages and terminated." Increasing the number of jobs increases the parallelism.

Relationships among stages, tasks and jobs in pipeline control

The above explanation may not be too helpful. To help you understand these concepts better, let's look at the relationship between stages, tasks and jobs by taking pipeline control as an example.

<Fig 3.2> Relationship between stage, task and job



As shown in Figure 3.2, it is necessary to consider both "space" and "time" in dealing with hardware operation. This is why we provided the concepts of stage, job and task. A stage is a component element that executes a procedure. If there are a number of stages, they are specially separated. It may help you to draw analogies between a stage and a person in a workplace, and between a job and a work slip in the workplace. A "series of processes executed over multiple stages" is called a job. At each machine cycle, a job sits in a specific stage. The stage where the job exists is in the state of being in operation.

Delivery of a job from one stage to another is called job transfer. The stage that has transferred the job becomes inoperative by having its "task reset," while the one that has received the transferred job is set in the state of being in operation by having its "task set". Since no job can actually be moved in an LSI, it is replaced with the set/reset of a task.

There are three jobs in Figure 3.2. Even if these jobs do the same thing, they are separate jobs.

Example of describing multiple stages

Let us see how the processing in Figure 3.2 is described in SFL.

As described in Section 3.3, component elements other than external terminals of a module or stage can be defined by

TypeNname InstanceName {, InstanceName};

However, stages usually have complicated structures, and thus their descriptions also tend to be complicated. A stage description is generally divided into two parts: the part declaring the stage's existence and the part defining the stage's content.

The stage's existence is declared together with task and argument definition. In this example, there are three stages: "A", "B" and "C". They are declared as follows:

stage_name A {
task a () ;
}
stage_name B {
task b () ;
}
stage_name C {
task c () ;
}

If each stage has only one task, a task name is not really necessary but give it one anyway. In the above example, we named them "a", "b" and "c", respectively. More than one task can be declared in a stage.

The main part of the stage is then described. A stage that pretends to do something but really does nothing is described as follows:

stage A {
relay B.b() ;
}
stage B {
relay C.c() ;
}
stage C {
finish ;
}

This describes the pipelining operation of Figure 3.2. No state transitions occur in stages "A", "B" and "C". Jobs are only transferred to the next stage. If a state transition is to occur, the stages are described as follows:

stage X {
state_name st1, st2 ;
first_state st1;
state st1 par {
....
}
stage st2 par {
....
}
}

In this description, it is necessary to declare (by state_name) what states can exist before defining what each state is.


Back to the SFL (Structured Function Description Language) page

Back to Homepage