SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
Using UML 2.0 for System Level Design of Real Time SoC Platforms for Stream
                                Processing£

                            Yongxin ZHU                                                   Zhenxin SUN
                         School of Computing                                          School of Computing
                  National University of Singapore                               National University of Singapore
                       zhuyx@comp.nus.edu.sg                                      sunzhenx@comp.nus.edu.sg
                  Alexander MAXIAGUINE                                                  Weng-Fai WONG
         Computer Engineering and Networks Laboratory                                 School of Computing
                         ETH Zurich                                              National University of Singapore
                   maxiagui@tik.ee.ethz.ch                                         wongwf@comp.nus.edu.sg


                         Abstract                                        Because of specific application domains, existing
                                                                      stream programming languages such as StreamIT [14],
    While enabling fast implementation and reconfiguration             StreamC [12], and NVIDIA Cg [11] with many differences
of stream applications, programmable stream processors                which result in an incompatibility issue to specifications and
                                                                      design reuse. More importantly, they are programming lan-
expose issues of incompatibility and lack of adoption in ex-
                                                                      guages and do not meet the requirements for high level ab-
isting stream modelling languages. To address them, we                straction, description and modelling.
describe a design approach in which specifications are cap-               The Unified Modelling Language (UML) is gaining pop-
tured in UML 2.0, and automatically translated into Sys-              ularity from real time system designers. UML has been
temC models consisting of simulators and synthesizable                widely accepted in both software design and system ar-
code under proper style constraints. As an application case,          chitecture community since its invention. UML has also
we explain real time stream processor specifications using             been evolving to meet the needs of real time embedded sys-
new UML 2.0 notations. Then we expound how our trans-                 tems [7]. UML 2.0 incorporates more modelling abstraction
lator generates SystemC models and includes additional                notations in the real time software domain and designers can
hardware details. Verifications are made during UML ex-                expect to use these notations in their initial specifications,
                                                                      consisting of class diagrams, state diagrams and structure
ecution as well as assertions in SystemC. The case study
                                                                      diagrams, which are available in products such as Rational
demonstrates the feasibility of fast specifications, modifica-          Rose Real Time and I-Loigx’s Rhapsody [5].
tions and generation of real time stream processor designs.              However, real time UML may not suffice for stream pro-
                                                                      cessor designs because of their special needs. On stream
                                                                      processors, a large amount of on-chip resources are allo-
                                                                      cated to deliver long instruction and large data packets.
1 Introduction                                                        Stream processor architectures also have to adapt to dif-
                                                                      ferent stream applications. Although programmable stream
    Over the last few years, there is a remarkable increase           processors [6] provide the hardware for quick implementa-
in the complexity of media-intensive products such as digi-           tion, it is still not clear for designers if UML 2.0 can be used
tal video recorder, DVD players, MPEG players and video               to specify streaming features clearly and easily. This is one
conference devices. The complexity stems from the heavy               of the aims of this paper.
computational workload and large data volume in the media                Since there is a huge gap between UML-based descrip-
stream. Due to the complexity, designing streaming proces-            tions and their implementations, it is clear that such descrip-
sors has become a complicated task. An approach to tam-               tions need to be refined to a number of more detailed ones
ing the complexity is to raise the level of abstraction to that       in order to get the final implementation level specifications.
of system-level designs. This approach incurs the needs to            SystemC is a design language that allows designs to be ex-
specify abstract models of systems.                                   pressed and verified at sufficiently high levels of abstraction
                                                                      while at the same time enabling the linkage to hardware
  £ Acknowledgement: This research was partially funded under         implementation and verification. Furthermore, SystemC,
A*STAR Project 022/106/0043.                                          when viewed from a programming perspective, is a collec-

                                                                  1
tion of class libraries built on top of C++ and so is natu-        We further consider real time constraints in stream pro-
rally compatible with object oriented design methodologies.     cessing. In classic real time systems, real time constraints
Therefore, creating a flexible and fully automated transla-      are usually applied to system response time. Other than
tion mechanism from the UML-based design language at            classic logic constraints, constraints on stream processing
the top layer to SystemC appears to be a promising strategy.    are often in the form of quality of service, which ensures a
                                                                processing rate of the stream. For example, an MPEG-2/4
                                                                video clip requires a minimum playback rate at 25 frames
2 Our Scope of Work and Related Work                            per second (fps). The number of pixels per frame depends
                                                                on the resolution settings during sampling. Similarly, for
   In the domain of UML for real time systems, a large body     MP3 audio clips, the choices of playback rates usually range
of work has been reported. Some UML extensions from             from 64 Kilo bits per second (Kbps) to 256 Kbps depending
UML 1.x are proposed in [7]. Two instances of UML ex-           on the requirements of playback quality.
tension and translation are [2, 15]. Some studies exploited        The implication of the guarantee of the playback rate is
the possibility to describe a synchronous dataflow model [4]     there are enough data stored in the buffer in front of the
and a model for incremental designs [3] in UML. A previ-        playback device which is a real time client. Let ¼ denote
ous effort [13] focused on hardware generation from UML         the buffer fill level of the playout buffer, ܴص to denote the
models without explicit UML specifications of stream pro-        input stream of this buffer, ¼ represent the initial decoding
cessing. Another recent work [10] mainly studied the model      delay, and denote the consumption rate of the real time
driven architecture approach via SystemC using UML 1.x.         client assuming the initial buffer fill level is ¼. Then the
   In this paper, we explore the suitability of UML 2.0 for     constraint on the playout buffer underflowing is stated as:
system-level designs of stream processors. For this pur-
pose, we establish a design workflow that starts with UML                      ܴص         ´ µ Ø          ¼         Ø       ¼                   (1)
2.0, then SystemC as an intermediate language. Using this
workflow, we specify stream processors and applications in          Similarly to the above limit on the minimum amount of
UML at an abstract level with Rhapsody. From the UML            the stored data, there is constraint on the maximum amount
specifications, a stream processor simulator in SystemC is       to avoid overflow.
generated. Here are the distinct features of our work: (a) to   UML 2.0 Notations Used: To address the needs of abstract
ensure the maximum reusability and compatibility, we sim-       representations of stream processors in UML, we resort to
ply use existing UML 2.0 notations without introducing any      a few new notations introduced in UML 2.0, namely flow,
new ones; (b) in our UML specification, we explicitly de-        composite classes, port, structural diagram and hierarchi-
scribe real time stream application features; (c) due to the    cal statechart.
asynchronous nature in video and audio stream processing,
data packets are processed at various rates by multiple pro-          media_src                        processing                     playout

cessing elements. Our SystemC simulator generated from                  token_out   <<flow>>       token_in
                                                                                                           token_out
                                                                                                                        <<flow>>
                                                                                                                                   token_in


UML designs supports the behavior of asynchronous flows.
This is in contrast to a recent study [4].
   In the rest of the paper, we will discuss the UML model
                                                                                                       stream_storage
of system level stream processing, describe the design
workflow, present the translator which can produce Sys-
temC code from restricted Rhapsody designs, and illustrate
the workflow with a case study. Some concluding remarks             Figure 1. Functional Block Modelling of a
will follow the discussions.                                       Stream Processor

3 Requirements of Real Time Stream Models                           In Fig. 1, a functional block model of a stream proces-
  & UML 2.0 Notations Needed                                    sor is shown. The model illustrates the exchange of infor-
                                                                mation “flow”s at the highest abstract level. Streams are
    We view stream applications as operations on flows.          represented in tokens which flow into and out of process-
Flows of stream packets undergo processing at different         ing elements. The blocks in the functional block model are
stages of calculation. Representations of flow are manda-        “composite classes” which decompose hierarchically into
tory in stream modelling.                                       standard classes. The concept of composite class is similar
Modelling Requirements: Flows require entrances and ex-         to the definition of “Metaclass” proposed by the UML for
its at processing elements. These gateways are also to be       SoC forum. We expect these two notations will be merged
represented in abstraction with distinct attributes.            in the final version of UML 2.0.
    There is also a need to hierarchically specify the compu-       The notation of “port” is new in UML 2.0. It is used
tation complexity inside processing elements. Since video       in defining complicated incoming and outgoing interfaces.
and audio stream protocols have become very sophisticated,      In Rhapsody’s terminology, the interface for incoming mes-
the complexity of calculation grows so hard that a non-         sages is called a “provided interface”, similarly the interface
hierarchical representation would be not manageable.            for outgoing messages is termed a “required interface”.
To decompose hard computation complexities, “hierar-         stream application parameters in UML 2.0. The UML mod-
chical statecharts” are needed. Nested statecharts are al-       els can be executed as early verifications.
lowed to represent sub-machines as part of the parent chart.        The UML specifications are exported to XMI format files
    The “structural diagram” is usually a detailed description   which are translated by our translator to SystemC simulator
of functional block models. It emphasizes the structure of       models in TLM and RTL styles. The simulator code under
the objects in a system, including types, relationships, at-     proper coding constraints [13] can be compiled by the Syn-
tributes and operations. We will show an example in Fig. 5.      opsys CoCentric SystemC compiler into gate level netlists
    A stream processor needs stream traces to drive its ex-      in Verilog, which are synthesizable into programmable ar-
ecution. The relationship is shown as a dependency from          chitecture implementations. The coding constraints such
processing blocks to the stream storage package in Fig. 1.       as using static memory instead of dynamic memory, struct
In the stream storage package, a trace manager manages           rather than union, and call by value instead of call by refer-
stored trace files and delivers necessary stream attributes to    ence, are imposed by the synthesizable subset of SystemC.
the processing blocks. The description of the stream storage        In the meantime, verifications are carried out at multiple
package is an abstraction of memory management mecha-            levels, i.e., UML specification, TLM style translation, RTL
nisms. The memory can be either physically centralized           style translation and SystemC simulation.
RAM blocks or logically assembled cache lines associated
with each processing element.                                                                                                                       s           e           n
                                                                                                                                                                            <
                                                                                                                                                                            s
                                                                                                                                                                                         s
                                                                                                                                                                                         <
                                                                                                                                                                                         e
                                                                                                                                                                                                      i
                                                                                                                                                                                                      i
                                                                                                                                                                                                      n
                                                                                                                                                                                                                  t
                                                                                                                                                                                                                  n
                                                                                                                                                                                                                  s
                                                                                                                                                                                                                              i
                                                                                                                                                                                                                              p
                                                                                                                                                                                                                              i




    A constraint is a condition or restriction expressed in
                                                                                                                                #           i           f           n       }   d            e            f                       F
                                                                                                                                #       }   d       ;   e           f           i            n            e                       F


                                                                                           Parser                   Template    S           C


                                                                                                                                            S           C
                                                                                                                                                                    M
                                                                                                                                                                    v
                                                                                                                                                                                O
                                                                                                                                                                                o
                                                                                                                                                                                C
                                                                                                                                                                                             D
                                                                                                                                                                                             i
                                                                                                                                                                                             T
                                                                                                                                                                                                          U
                                                                                                                                                                                                          d
                                                                                                                                                                                                          O
                                                                                                                                                                                                                      L


                                                                                                                                                                                                                      R
                                                                                                                                                                                                                                  E
                                                                                                                                                                                                                                  e
                                                                                                                                                                                                                                  (
                                                                                                                                                                    S           C                         T           H           R




text. It is generally a Boolean expression that must be true                                                                                    TLM code
                                                                             XMI
for an associated model element for the model to be con-                     doc         Rhapsody
                                                                                         XM ITool i t
                                                                                                        Ab stract
                                                                                                        Syntax
                                                                                                                                                        s           e           n
                                                                                                                                                                                <
                                                                                                                                                                                s
                                                                                                                                                                                             s
                                                                                                                                                                                             <
                                                                                                                                                                                             e
                                                                                                                                                                                                          i
                                                                                                                                                                                                          i
                                                                                                                                                                                                          n
                                                                                                                                                                                                                      t
                                                                                                                                                                                                                      n
                                                                                                                                                                                                                      s
                                                                                                                                                                                                                                  i
                                                                                                                                                                                                                                  p
                                                                                                                                                                                                                                  i




sidered well-formed. To check the validity of a design in
                                                                                                                                    #           i           f           n       }   d            e            f                       F
                                                                                                                                    #       }   d       ;   e           f           i            n            e                       F

                                                                                                        tree                        S           C


                                                                                                                                                S           C
                                                                                                                                                                        M
                                                                                                                                                                        v
                                                                                                                                                                                    O
                                                                                                                                                                                    o
                                                                                                                                                                                    C
                                                                                                                                                                                                 D
                                                                                                                                                                                                 i
                                                                                                                                                                                                 T
                                                                                                                                                                                                              U
                                                                                                                                                                                                              d
                                                                                                                                                                                                              O
                                                                                                                                                                                                                          L


                                                                                                                                                                                                                          R
                                                                                                                                                                                                                                      E
                                                                                                                                                                                                                                      e
                                                                                                                                                                                                                                      (
                                                                                                                                                                        S           C                         T           H           R




simulation of the model of the design, a constraint is an as-                                                                       B ehavioral code

sertion rather than an executable mechanism. It does not                                                        Synthesizable               #
                                                                                                                                            #       }
                                                                                                                                                        i
                                                                                                                                                        d
                                                                                                                                                                s




                                                                                                                                                                ;
                                                                                                                                                                    f
                                                                                                                                                                    e
                                                                                                                                                                            e




                                                                                                                                                                                n
                                                                                                                                                                                f
                                                                                                                                                                                        en
                                                                                                                                                                                         <
                                                                                                                                                                                         s
                                                                                                                                                                                         }   d
                                                                                                                                                                                             i
                                                                                                                                                                                                     ts
                                                                                                                                                                                                      <
                                                                                                                                                                                                      e
                                                                                                                                                                                                          e
                                                                                                                                                                                                          n
                                                                                                                                                                                                                  i
                                                                                                                                                                                                                  i
                                                                                                                                                                                                                  n
                                                                                                                                                                                                                      f
                                                                                                                                                                                                                      e
                                                                                                                                                                                                                              t
                                                                                                                                                                                                                              n
                                                                                                                                                                                                                              s




exist in the final description for hardware synthesis.
                                                                                                                                            S           C                       M            O            D           U           L
                                                                                                                                                                                v            o            i           d
                                                                                                                                                        S           C                        C            T           O           R
                                                                                                                                                                                S            C                        T           H




                                                                        UML models in Rhapsody
                                                                                                                                                RTL code

             Processor                   Stream P ara.
            Text D esc.                     Extract.




            UML S pec.                      UML Exe c .
                                                                           Figure 3. The Translation Process

                          XMI Data



            TLM S
           Tran
                  tyle
               slation
                                              Beha v or
                                                l
                                                     i
                                             Sty e Code          5 The UML2Code Translator
           RTL S tyle                RTL Style
          Translation                  Cod e


                             SystemC
                                                                    UML 2.0 is closer to SystemC than its predecessor since
                           Simulation
                                                                 some of the new concepts have direct counterparts in Sys-
                             SystemC
                            Comp  iler                           temC. For example, a meta-class corresponds to a mod-
                           Synthesis
                                                                 ule in SystemC. During the code generation, we apply the
                                                                 following mapping rules: (a) all components in the struc-
                                                                 tural diagram, which are meta-classes, are translated into a
   Figure 2. A UML 2.0 Based Design Workflow                      “sc module”; (b) the port type is determined by the nam-
                                                                 ing convention of the port; (c) the statechart in each ac-
                                                                 tive object is translated into a process whose method name
                                                                 is “entry”. In this method, we map each statechart into
4 A UML 2.0 Based Design Workflow                                 an unclocked “sc thread” for TLM style translation. For
                                                                 RTL style translation, the mapping is a clocked process
   We propose and implement a design workflow based               “sc method”, which will be synthesizable; (d) the defini-
on UML 2.0 with SystemC as its intermediate language in          tions of message structures are encapsulated in flow whose
Fig. 2. In this design workflow, our own efforts include          counterpart is sc interface.
the steps of UML specification, transaction level modelling          Besides the above general rules, the translator also adds
(TLM) style translation, register transfer level (RTL) style     platform dependant hardware details such as considerations
translation and SystemC simulation.                              of reset, clock, and variable types. Additional constraints
   The translator is based on the XML Metedata Inter-            such as cache and memory configurations can be added to
change (XMI) format of UML representations made with             make the translator generate more hardware features.
Rhapsody. From XMI representations, the translator gener-           Figure 3 shows the translation workflow of UML2Code.
ates SystemC code in both TLM and RTL style.                     We start with a UML 2.0 model in Rhapsody. The design
   To use the workflow, designers usually work with the           model is accepted by Rhapsody’s XMITookit to generate
UML specifications only as the rest steps of the workflow          corresponding XMI documents as inputs to our translator.
are automated. The major work of the designers is to vi-         XMITookit preserves all the model information, and it is
sually specify the processor architecture parameters and         a textual representation of the UML model. The generator
M PEG2                                             audi o       representations in XML Metadata Interchange (XMI) for-
stream                               PB1           pl ayback
          PE1           PE2
                                                                mat which is not supported by Rose RT.
M P3                                                            UML Specifications: To detail the descriptions of “flow”
stream                                             vi deo
                                     PB2                        driven activities in Fig. 2, we use a structural diagram in
                                                   pl ayback
                                                                Fig. 5 which describes the activities of instances of objects
                                                                whose realistic roles are shown in Fig. 4.
   Figure 4. An Abstract Stream Processing SoC                      In Fig. 5, the ports belonging to object instances form the
                                                                communication channels for streams. The video and audio
                                                                streams are tokenized into token flows. Token IDs are ini-
                                                                tiated from video source or audio source, then pass through
parses the XMI documents and builds the internal represen-
                                                                processing elements to reach the video sink or audio sink.
tation of the model. The syntax tree is further processed to
                                                                Each processing element queries the trace manager for de-
compute and store some relations. The syntax tree holds all
                                                                tailed attributes of tokens. The processing elements take the
the data required to build different levels of code. By using
                                                                proper actions in accordance to the attributes of tokens.
different templates, the same model can be used to generate
code at different levels: TLM, Behavioral and RTL level.            In UML 2.0, there is no need to inherit explicitly the
Behavioral and RTL code can be further synthesized into         interface definitions, as was the case in UML 1.x, for the
gate-level netlists in Verilog/VHDL.                            ports where token IDs go through. The interface definitions
                                                                are built into the ports in UML 2.0.
                                                                    The abstract operations in Fig. 5 represent a typical de-
6 A Case Study                                                  sign in stream processing. Some streams consist of large
                                                                packets of data. Each processing element does not need all
    Video and audio decoders are typical streaming applica-     the data in a packet. It is hence inefficient in hardware to
tions. Examples include the MPEG2 video decoder [9] and         transfer complete packets through the processing elements.
MPEG Audio Layer 3 (MP3) decoder [8]. As a case study,          In our example, only token IDs are passed through process-
we shall map these applications into an abstract SoC archi-     ing elements, and each processing element only fetches nec-
tecture, then implement it using our design workflow.            essary data for its processing from the trace manager. The
Experimental Setup: The process to decode MPEG2 video           hardware costs will be reduced by this means.
streams consists of 4 major steps, namely variable length
decoding (VLD), inverse quantization (IQ), inverse discrete
cosine transition (IDCT) and motion compensation (MC).
We map VLD and IQ to the first processing element in the
SoC, IDCT and MC to the second element.
    To play back MP3 audio streams, we usually need 8
steps, namely (1) synchronous and error checking, (2) Huff-
man decoding, (3) re-quantization, (4) reordering, (5) alias
reduction, (6) Inverse Modified Discrete Cosine Transform,
(7) frequency inversion, and (8) synthesis polyphase filter.
We assign the earlier 4 steps to the first processing element
in the SoC, and the rest 4 steps to the second element.
    Another important design factor, scheduling, is also con-
sidered in our model. In our case study, we implemented the
TDMA scheduling policy as the scheduler. We summarize
the above settings as the abstract architecture in Fig. 4.
    To obtain the requirements of execution cycles at differ-
ent stages, we use one of SimpleScalar’s [1] tools, “sim-            Figure 6. A Stream SoC’s Class Diagram
profile” configured to the default values, to run reference
implementations of MPEG2 decoder and MP3 decoder sep-              In Fig. 6, we use a traditional class diagram to specify
arately without scheduling. For each macroblock, processor      the inheritances and association among the components of
cycles at different execution stages are captured and stored    the SoC and management of stream traces. These entities
into trace files. For each video or audio stream, there are      are classes which inherit or aggregate attributes from other
a set of trace files consisting of records for stream tokens.    classes or interfaces.
Each record contains a token index number and token at-            UML 2.0 supports hierarchical and concurrent state-
tributes such as the execution cycles.                          charts. We use traditional or single-layer statecharts to
    To support real time applications, I-Logix Rhapsody is      specify simply calculation logic flows inside each object.
preferred to Rational Rose Real Time (RT) since the lat-        To describe complicated tasks, we use these new features
est Rhapsody provides more support for UML 2.0 notations        to describe hierarchical states and concurrent calculations.
than Rose RT such as functional block modelling, flow and        For example, a hierarchical state containing concurrent sub-
concurrent state charts. Moreover, Rhapsody can produce         machines in the “trace manager” is shown in Fig. 7.
Figure 5. A Structural Diagram of a Stream Processing SoC


              H ier ar c hic alS at
                                t  e

       r eady For Quer y               r eady For Quer y

             quer y _s end_pe1           quer y _s end_pe2

       r ec v Pe1Quer y >              r ec v Pe2Quer y . .
                                                         .




    Figure 7. A Hierarchical State in an Object




   Figure 8. A Constraint Anchored to an Object



   Similar to assertions, constraints have to be checked con-
stantly during processing of the streams. A constraint ex-
ample is shown in Fig. 8 for illustration. The constraint has
a dependency relationship with the object. A violation of           Figure 9. Communications among Modules
the constraint incurs a pause in the playback client, conse-
quently, users observe breaks in the playback video or audio
clips. The number of constraint violations is recorded as a     port”; incoming ports have names beginning with “inport”;
metric of quality of service.                                   bi-directional ports are identified as “inoutport*” in Fig. 5.
   As shown in the example, designers only need to deal            Regarding the code efficiency, for the settings in the ex-
with structural diagrams, class diagrams and statecharts for    ample, the size of the generated SystemC code is around
specifications in UML. It is straight forward to reuse the       3100 lines. The code generation time for both RTL style
specifications and quickly modify designs in UML 2.0.            and TLM style is less than 10 seconds. It is also interesting
UML Execution: UML models are executable in the Rhap-           to note that the RTL style code may have a smaller size than
                                                                TLM style code, but always a longer execution time.
sody runtime environment. This feature allows designers to
verify their designs at very early stage of design workflow.        To illustrate the mapping results, we take the RTL style
                                                                declaration part of the SystemC of the first processing ele-
   UML 2.0 visualizes the communication with a new fea-
                                                                ment “pe stage1” as the example.
ture message sequence chart(MSC). Fig. 9 is the screen shot
of a MSC generated during the execution of UML models.          SC_MODULE( pe_stage1) {
In this MSC, tokens trigger events which are represented as     //define default ports
messages passed among SoC modules. We can trace the ex-          sc_in_clk CLK;
ecution of video tokens 3, 5 and audio tokens 12, 14. The        sc_in<bool> reset;
example shows another clear benefit of UML 2.0 for system        //define the outgoing ports
level design of stream processing SoC.                           sc_out<bool>
   To achieve a faster execution, we can also disable the         trace_manager_query_send_pe1;
MSC generation during execution. The option is observed          sc_out<int >
                                                                  trace_manager_query_send_pe1_qTokenNum;
to save the execution time by about 30%.                         sc_out<bool>
SystemC Code Generation: To facilitate the translation            pe_stage2_in_token_pe2;
synthesis, we apply an intuitive naming conventions to the       sc_out<int >
port names. The names of outgoing ports start with “out-          pe_stage2_in_token_pe2_tokenNum;
//define incoming ports                                          the spirit of stream applications by emulating the processing
 sc_inout<bool> in_video_pe1;                                    of tokenized streams. A case study shows SystemC imple-
 sc_in<int > in_video_pe1_vTokenNum;                             mentation is also synthesizable with Synopsys tools. As the
 sc_inout<bool> query_reply_pe1;                                 future work, we will extend our work by modelling addi-
 sc_in<int > query_reply_pe1_execTime;                           tional hardware features of stream applications in UML 2.0
//token attributes
public:                                                          to enable generation of full-fledged processor designs using
 int vTokenNum;                                                  our framework.
public:
 int vExecTime; ......
//processing status                                              References
public:
 int bufLevel;
private:                                                          [1] T. Austin, D. Burger, G. Sohi, M. Franklin, S. Breach, and
 int state; ......                                                    K. Skadron. The simplescalar architectural research tool set.
//clock and process definitions                                       In www.cs.wisc.edu/ mscalar/simplescalar.html, 1998.
public: SC_CTOR(pe_stage1) {                                      [2] F. Bruschi. A systemc based design flow starting from uml
//define the clocked thread                                           models. In The 6th European SystemC users Group Meeting,
 SC_METHOD(entry);                                                    2002.
 sensitive_pos<<CLK;                                              [3] P. Green and M. Edwards. The modelling of embedded sys-
} ...                                                                 tems using hasoc. In Proceedings of Design, Automation and
}                                                                     Test in Europe Conference and Exhibition, 2002, pages 752–
  To represent the semantics of assertions, we propose                759, March 2002.
constructs AFTER, ALWAYS, EVENTUALLY and NEVER,                   [4] P. Green and S. Essa. Integrating the synchronous dataflow
which are new to SystemC standards. An intuitive imple-               model with uml. In Proceedings of DATE-2004, pages 736–
mentation of an assertion in SystemC is as follows:                   737. IEEE Press, Feb. 2004.
                                                                  [5] I-LOGIX.        Rhapsody in c++.          In Available on-
//AFTER(t>itsVideo_sink.D)                                            line, http://www.ilogix.com/rhapsody/rhapsody c plus.cfm.
//      ALWAYS(itsVideo_sink.B>0)                                     I-Logix Incorporation, 2004.
if((t>itsVideo_sink.D)&&
  !(itsVideo_sink.B>0)){                                          [6] U. J. Kapasi, S. Rixner, W. Dally, B. Khailany, J. H. Ahn,
  cout<<"Assertion 1 violated!"<<endl;                                P. Mattson, and J. D. Owens. Programmable stream proces-
  cout<<"Tot. # of violation:"                                        sors, ieee computer, August 2003.
     <<vcount<<endl; vcount++;                                    [7] L. Lavagno, G. Martin, and B. Selic. Uml for Real: Design
}                                                                     of Embedded Real-Time Systems. Kluwer Academic Pub-
                                                                      lishers, 2003.
    These descriptions in SystemC are synthesizable with
the Synopsys CoCentric SystemC compiler in a behavior             [8] MPEG. Mpeg audio resources and software. In Available on-
description style. After the compilation process, descrip-            line, http://www.mpeg.org/MPEG/audio.html. Moving Pic-
                                                                      ture Experts Group, 2004.
tions in Verilog at the gate level are generated, which are
acceptable to further FPGA design workflows.                       [9] MPEG. Mpeg video resources and software. In Avail-
                                                                      able online, http://www.mpeg.org/MPEG/video.html. Mov-
    Though the generated design is synthesizable, we would
                                                                      ing Picture Experts Group, 2004.
like to stress that the design generated by far is not a full-
fledged processor; instead, it is an implementation of the ab-    [10] K. Nguyen, Z. Sun, P. Thiagarajan, and W. Wong. Model-
                                                                      driven soc design via executable uml to systemc. In The 25th
stract SoC model in UML 2.0. To generate a more complete
                                                                      IEEE Int’l Real-Time Systems Symp., pages 459–468, 2004.
design, we should specify additional hardware constraints
in the UML model, e.g. bit widths of attribute variables, and    [11] NVIDIA. Nvidia cg toolkit. In http://www.nvidia.com/cg.
                                                                      NVIDIA Corp., 2004.
existing IP cores as architectural choices for processor com-
ponents. These additional specifications can be processed         [12] B. Serebrin, J. D. Owens, C. H. Chen, S. P. Crago, U. J.
                                                                      Kapasi, P. Mattson, J. Namkoong, S. Rixner, and W. J. Dally.
by our translator to generate more details in SystemC mod-
                                                                      A stream processor development platform. In Proc. of ICCD-
els, and consequently further hardware particulars.                   2002. IEEE, Sep. 2002.
                                                                 [13] W. H. Tan, P. S. Thiagarajan, W. F. Wong, Y. Zhu, and
7 Concluding Remarks                                                  S. K. Pilakkat. Synthesizable systemc code from uml
                                                                      models. In UML for Soc Design, DAC 2004 Workshop,
   In this paper, we outlined an approach to modelling                www.comp.nus.edu.sg/ zhuyx/usoc04.pdf, June 2004.
stream processing SoC at a system level. A translation           [14] W. Thies, M. Karczmarek, and S. Amarasinghe. Streamit:
mechanism that produces SystemC code from UML 2.0 de-                 A language for streaming applications. In Proc. of the
signs was also presented. With these completions, speci-              2002 Int’l Conf. on Compiler Construction. Springer-Verlag
fications of real time stream processing SoC platforms in              LNCS, April 2002.
UML 2.0 become intuitive and generating simulator de-            [15] Q. Zhu, A. Matsuda, and M. Shoji. An object-oriented de-
scriptions via SystemC is feasible. The simulator in Sys-             sign process for system-on-chip using uml. In The 15th Int’l
temC we produced from the UML model explicitly reflects                Symp. on System Synthesis, pages 249–254, 2002.

Weitere ähnliche Inhalte

Was ist angesagt?

Challenges in multi core programming by Nishigandha Wankhade
Challenges in multi core programming by Nishigandha WankhadeChallenges in multi core programming by Nishigandha Wankhade
Challenges in multi core programming by Nishigandha WankhadeNishigandha Wankhade
 
Reengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy SoftwareReengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy SoftwareTeodoro Cipresso
 
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEMODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEAnže Vodovnik
 
Protecting from transient failures in cloud deployments
Protecting from transient failures in cloud deploymentsProtecting from transient failures in cloud deployments
Protecting from transient failures in cloud deploymentswww.pixelsolutionbd.com
 
Automatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodelsAutomatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodelsIvano Malavolta
 
Model Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLModel Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLelliando dias
 
PHP modernization approach generating KDM models from PHP legacy code
PHP modernization approach generating KDM models from PHP legacy codePHP modernization approach generating KDM models from PHP legacy code
PHP modernization approach generating KDM models from PHP legacy codejournalBEEI
 
Architecture Description Languages
Architecture Description LanguagesArchitecture Description Languages
Architecture Description LanguagesHenry Muccini
 
SMI_SNUG_paper_v10
SMI_SNUG_paper_v10SMI_SNUG_paper_v10
SMI_SNUG_paper_v10Igor Lesik
 
Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...
Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...
Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...Sourour Kanzari
 
Fec energy savings
Fec energy savingsFec energy savings
Fec energy savingstornado1234
 
1 state of-the-art and trends in scalable video
1 state of-the-art and trends in scalable video1 state of-the-art and trends in scalable video
1 state of-the-art and trends in scalable videoYogananda Patnaik
 
Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...
Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...
Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...Ivica Crnkovic
 

Was ist angesagt? (19)

Challenges in multi core programming by Nishigandha Wankhade
Challenges in multi core programming by Nishigandha WankhadeChallenges in multi core programming by Nishigandha Wankhade
Challenges in multi core programming by Nishigandha Wankhade
 
Reengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy SoftwareReengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy Software
 
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSEMODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
MODEL DRIVEN ARCHITECTURE, CONTROL SYSTEMS AND ECLIPSE
 
Protecting from transient failures in cloud deployments
Protecting from transient failures in cloud deploymentsProtecting from transient failures in cloud deployments
Protecting from transient failures in cloud deployments
 
43
4343
43
 
Automatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodelsAutomatically bridging UML profiles into MOF metamodels
Automatically bridging UML profiles into MOF metamodels
 
MDA with Executable UML
MDA with Executable UMLMDA with Executable UML
MDA with Executable UML
 
C++ N Pv2
C++ N Pv2C++ N Pv2
C++ N Pv2
 
Model Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLModel Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UML
 
PHP modernization approach generating KDM models from PHP legacy code
PHP modernization approach generating KDM models from PHP legacy codePHP modernization approach generating KDM models from PHP legacy code
PHP modernization approach generating KDM models from PHP legacy code
 
Architecture Description Languages
Architecture Description LanguagesArchitecture Description Languages
Architecture Description Languages
 
Course brochure
Course brochureCourse brochure
Course brochure
 
14
1414
14
 
SMI_SNUG_paper_v10
SMI_SNUG_paper_v10SMI_SNUG_paper_v10
SMI_SNUG_paper_v10
 
Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...
Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...
Andrade sep15 fromlowarchitecturalexpertiseuptohighthroughputnonbinaryldpcdec...
 
SYNTAX AND SEMANTICS FOR CINNAMON PROGRAMMING
SYNTAX AND SEMANTICS FOR CINNAMON PROGRAMMINGSYNTAX AND SEMANTICS FOR CINNAMON PROGRAMMING
SYNTAX AND SEMANTICS FOR CINNAMON PROGRAMMING
 
Fec energy savings
Fec energy savingsFec energy savings
Fec energy savings
 
1 state of-the-art and trends in scalable video
1 state of-the-art and trends in scalable video1 state of-the-art and trends in scalable video
1 state of-the-art and trends in scalable video
 
Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...
Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...
Component-Based and Model-Driven Engineering: what is the difference? A CBSE ...
 

Andere mochten auch

xử lý hình thái học và ứng dụng
xử lý hình thái học và ứng dụngxử lý hình thái học và ứng dụng
xử lý hình thái học và ứng dụngPham Ngoc Long
 
Giới thiệu và sử dụng aja xr40
Giới thiệu và sử dụng aja xr40Giới thiệu và sử dụng aja xr40
Giới thiệu và sử dụng aja xr40timtailieucntt
 
Integration of real time software modules for reconfigurable sens
Integration of real time software modules for reconfigurable sensIntegration of real time software modules for reconfigurable sens
Integration of real time software modules for reconfigurable sensPham Ngoc Long
 
The colourful friends
The colourful friendsThe colourful friends
The colourful friendsAlka Rao
 

Andere mochten auch (8)

xử lý hình thái học và ứng dụng
xử lý hình thái học và ứng dụngxử lý hình thái học và ứng dụng
xử lý hình thái học và ứng dụng
 
Kiem tra Javasrctip
Kiem tra JavasrctipKiem tra Javasrctip
Kiem tra Javasrctip
 
Giới thiệu và sử dụng aja xr40
Giới thiệu và sử dụng aja xr40Giới thiệu và sử dụng aja xr40
Giới thiệu và sử dụng aja xr40
 
Integration of real time software modules for reconfigurable sens
Integration of real time software modules for reconfigurable sensIntegration of real time software modules for reconfigurable sens
Integration of real time software modules for reconfigurable sens
 
6. javascript basic
6. javascript basic6. javascript basic
6. javascript basic
 
Kiem tra javascript
Kiem tra javascriptKiem tra javascript
Kiem tra javascript
 
The colourful friends
The colourful friendsThe colourful friends
The colourful friends
 
Linq-to-sql-tutorial
Linq-to-sql-tutorialLinq-to-sql-tutorial
Linq-to-sql-tutorial
 

Ähnlich wie 10.1.1.65.2852

A tlm based platform to specify and verify component-based real-time systems
A tlm based platform to specify and verify component-based real-time systemsA tlm based platform to specify and verify component-based real-time systems
A tlm based platform to specify and verify component-based real-time systemsijseajournal
 
System on Chip Design and Modelling Dr. David J Greaves
System on Chip Design and Modelling   Dr. David J GreavesSystem on Chip Design and Modelling   Dr. David J Greaves
System on Chip Design and Modelling Dr. David J GreavesSatya Harish
 
Bab 12 deployment diagram 2010
Bab 12 deployment diagram 2010Bab 12 deployment diagram 2010
Bab 12 deployment diagram 2010asuransipaninlife
 
The real time publisher subscriber inter-process communication model for dist...
The real time publisher subscriber inter-process communication model for dist...The real time publisher subscriber inter-process communication model for dist...
The real time publisher subscriber inter-process communication model for dist...yancha1973
 
Towards a metamodel for the Rubus Component Model
Towards a metamodel for the Rubus Component ModelTowards a metamodel for the Rubus Component Model
Towards a metamodel for the Rubus Component ModelAlessio Bucaioni
 
"A Highly Decoupled Front-end Framework for High Trafficked Web Applications"...
"A Highly Decoupled Front-end Framework for High Trafficked Web Applications"..."A Highly Decoupled Front-end Framework for High Trafficked Web Applications"...
"A Highly Decoupled Front-end Framework for High Trafficked Web Applications"...Prem Gurbani
 
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...IDES Editor
 
Server Emulator and Virtualizer for Next-Generation Rack Servers
Server Emulator and Virtualizer for Next-Generation Rack ServersServer Emulator and Virtualizer for Next-Generation Rack Servers
Server Emulator and Virtualizer for Next-Generation Rack ServersIRJET Journal
 
Accelerating system verilog uvm based vip to improve methodology for verifica...
Accelerating system verilog uvm based vip to improve methodology for verifica...Accelerating system verilog uvm based vip to improve methodology for verifica...
Accelerating system verilog uvm based vip to improve methodology for verifica...VLSICS Design
 
Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...Ashley Carter
 
The Concurrency Challenge : Notes
The Concurrency Challenge : NotesThe Concurrency Challenge : Notes
The Concurrency Challenge : NotesSubhajit Sahu
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.pptssuser2ef938
 
10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural styles10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural stylesMajong DevJfu
 
Csit77404
Csit77404Csit77404
Csit77404csandit
 
Software performance simulation strategies for high-level embedded system design
Software performance simulation strategies for high-level embedded system designSoftware performance simulation strategies for high-level embedded system design
Software performance simulation strategies for high-level embedded system designMr. Chanuwan
 
Concurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core ProcessorsConcurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core ProcessorsCSCJournals
 
Network Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL ScriptNetwork Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL ScriptIRJET Journal
 
Iisrt arshiya hesarur
Iisrt arshiya hesarurIisrt arshiya hesarur
Iisrt arshiya hesarurIISRT
 

Ähnlich wie 10.1.1.65.2852 (20)

A tlm based platform to specify and verify component-based real-time systems
A tlm based platform to specify and verify component-based real-time systemsA tlm based platform to specify and verify component-based real-time systems
A tlm based platform to specify and verify component-based real-time systems
 
System on Chip Design and Modelling Dr. David J Greaves
System on Chip Design and Modelling   Dr. David J GreavesSystem on Chip Design and Modelling   Dr. David J Greaves
System on Chip Design and Modelling Dr. David J Greaves
 
Bab 12 deployment diagram 2010
Bab 12 deployment diagram 2010Bab 12 deployment diagram 2010
Bab 12 deployment diagram 2010
 
The real time publisher subscriber inter-process communication model for dist...
The real time publisher subscriber inter-process communication model for dist...The real time publisher subscriber inter-process communication model for dist...
The real time publisher subscriber inter-process communication model for dist...
 
Towards a metamodel for the Rubus Component Model
Towards a metamodel for the Rubus Component ModelTowards a metamodel for the Rubus Component Model
Towards a metamodel for the Rubus Component Model
 
"A Highly Decoupled Front-end Framework for High Trafficked Web Applications"...
"A Highly Decoupled Front-end Framework for High Trafficked Web Applications"..."A Highly Decoupled Front-end Framework for High Trafficked Web Applications"...
"A Highly Decoupled Front-end Framework for High Trafficked Web Applications"...
 
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
Automatic Synthesis and Formal Verification of Interfaces Between Incompatibl...
 
Server Emulator and Virtualizer for Next-Generation Rack Servers
Server Emulator and Virtualizer for Next-Generation Rack ServersServer Emulator and Virtualizer for Next-Generation Rack Servers
Server Emulator and Virtualizer for Next-Generation Rack Servers
 
Accelerating system verilog uvm based vip to improve methodology for verifica...
Accelerating system verilog uvm based vip to improve methodology for verifica...Accelerating system verilog uvm based vip to improve methodology for verifica...
Accelerating system verilog uvm based vip to improve methodology for verifica...
 
Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...Automatically partitioning packet processing applications for pipelined archi...
Automatically partitioning packet processing applications for pipelined archi...
 
The Concurrency Challenge : Notes
The Concurrency Challenge : NotesThe Concurrency Challenge : Notes
The Concurrency Challenge : Notes
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.ppt
 
10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural styles10 - Architetture Software - More architectural styles
10 - Architetture Software - More architectural styles
 
Csit77404
Csit77404Csit77404
Csit77404
 
Software performance simulation strategies for high-level embedded system design
Software performance simulation strategies for high-level embedded system designSoftware performance simulation strategies for high-level embedded system design
Software performance simulation strategies for high-level embedded system design
 
60
6060
60
 
Concurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core ProcessorsConcurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core Processors
 
Network Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL ScriptNetwork Analyzer and Report Generation Tool for NS-2 using TCL Script
Network Analyzer and Report Generation Tool for NS-2 using TCL Script
 
Hardware-Software Codesign
Hardware-Software CodesignHardware-Software Codesign
Hardware-Software Codesign
 
Iisrt arshiya hesarur
Iisrt arshiya hesarurIisrt arshiya hesarur
Iisrt arshiya hesarur
 

10.1.1.65.2852

  • 1. Using UML 2.0 for System Level Design of Real Time SoC Platforms for Stream Processing£ Yongxin ZHU Zhenxin SUN School of Computing School of Computing National University of Singapore National University of Singapore zhuyx@comp.nus.edu.sg sunzhenx@comp.nus.edu.sg Alexander MAXIAGUINE Weng-Fai WONG Computer Engineering and Networks Laboratory School of Computing ETH Zurich National University of Singapore maxiagui@tik.ee.ethz.ch wongwf@comp.nus.edu.sg Abstract Because of specific application domains, existing stream programming languages such as StreamIT [14], While enabling fast implementation and reconfiguration StreamC [12], and NVIDIA Cg [11] with many differences of stream applications, programmable stream processors which result in an incompatibility issue to specifications and design reuse. More importantly, they are programming lan- expose issues of incompatibility and lack of adoption in ex- guages and do not meet the requirements for high level ab- isting stream modelling languages. To address them, we straction, description and modelling. describe a design approach in which specifications are cap- The Unified Modelling Language (UML) is gaining pop- tured in UML 2.0, and automatically translated into Sys- ularity from real time system designers. UML has been temC models consisting of simulators and synthesizable widely accepted in both software design and system ar- code under proper style constraints. As an application case, chitecture community since its invention. UML has also we explain real time stream processor specifications using been evolving to meet the needs of real time embedded sys- new UML 2.0 notations. Then we expound how our trans- tems [7]. UML 2.0 incorporates more modelling abstraction lator generates SystemC models and includes additional notations in the real time software domain and designers can hardware details. Verifications are made during UML ex- expect to use these notations in their initial specifications, consisting of class diagrams, state diagrams and structure ecution as well as assertions in SystemC. The case study diagrams, which are available in products such as Rational demonstrates the feasibility of fast specifications, modifica- Rose Real Time and I-Loigx’s Rhapsody [5]. tions and generation of real time stream processor designs. However, real time UML may not suffice for stream pro- cessor designs because of their special needs. On stream processors, a large amount of on-chip resources are allo- cated to deliver long instruction and large data packets. 1 Introduction Stream processor architectures also have to adapt to dif- ferent stream applications. Although programmable stream Over the last few years, there is a remarkable increase processors [6] provide the hardware for quick implementa- in the complexity of media-intensive products such as digi- tion, it is still not clear for designers if UML 2.0 can be used tal video recorder, DVD players, MPEG players and video to specify streaming features clearly and easily. This is one conference devices. The complexity stems from the heavy of the aims of this paper. computational workload and large data volume in the media Since there is a huge gap between UML-based descrip- stream. Due to the complexity, designing streaming proces- tions and their implementations, it is clear that such descrip- sors has become a complicated task. An approach to tam- tions need to be refined to a number of more detailed ones ing the complexity is to raise the level of abstraction to that in order to get the final implementation level specifications. of system-level designs. This approach incurs the needs to SystemC is a design language that allows designs to be ex- specify abstract models of systems. pressed and verified at sufficiently high levels of abstraction while at the same time enabling the linkage to hardware £ Acknowledgement: This research was partially funded under implementation and verification. Furthermore, SystemC, A*STAR Project 022/106/0043. when viewed from a programming perspective, is a collec- 1
  • 2. tion of class libraries built on top of C++ and so is natu- We further consider real time constraints in stream pro- rally compatible with object oriented design methodologies. cessing. In classic real time systems, real time constraints Therefore, creating a flexible and fully automated transla- are usually applied to system response time. Other than tion mechanism from the UML-based design language at classic logic constraints, constraints on stream processing the top layer to SystemC appears to be a promising strategy. are often in the form of quality of service, which ensures a processing rate of the stream. For example, an MPEG-2/4 video clip requires a minimum playback rate at 25 frames 2 Our Scope of Work and Related Work per second (fps). The number of pixels per frame depends on the resolution settings during sampling. Similarly, for In the domain of UML for real time systems, a large body MP3 audio clips, the choices of playback rates usually range of work has been reported. Some UML extensions from from 64 Kilo bits per second (Kbps) to 256 Kbps depending UML 1.x are proposed in [7]. Two instances of UML ex- on the requirements of playback quality. tension and translation are [2, 15]. Some studies exploited The implication of the guarantee of the playback rate is the possibility to describe a synchronous dataflow model [4] there are enough data stored in the buffer in front of the and a model for incremental designs [3] in UML. A previ- playback device which is a real time client. Let ¼ denote ous effort [13] focused on hardware generation from UML the buffer fill level of the playout buffer, ܴص to denote the models without explicit UML specifications of stream pro- input stream of this buffer, ¼ represent the initial decoding cessing. Another recent work [10] mainly studied the model delay, and denote the consumption rate of the real time driven architecture approach via SystemC using UML 1.x. client assuming the initial buffer fill level is ¼. Then the In this paper, we explore the suitability of UML 2.0 for constraint on the playout buffer underflowing is stated as: system-level designs of stream processors. For this pur- pose, we establish a design workflow that starts with UML ܴص ´ µ Ø   ¼ Ø ¼ (1) 2.0, then SystemC as an intermediate language. Using this workflow, we specify stream processors and applications in Similarly to the above limit on the minimum amount of UML at an abstract level with Rhapsody. From the UML the stored data, there is constraint on the maximum amount specifications, a stream processor simulator in SystemC is to avoid overflow. generated. Here are the distinct features of our work: (a) to UML 2.0 Notations Used: To address the needs of abstract ensure the maximum reusability and compatibility, we sim- representations of stream processors in UML, we resort to ply use existing UML 2.0 notations without introducing any a few new notations introduced in UML 2.0, namely flow, new ones; (b) in our UML specification, we explicitly de- composite classes, port, structural diagram and hierarchi- scribe real time stream application features; (c) due to the cal statechart. asynchronous nature in video and audio stream processing, data packets are processed at various rates by multiple pro- media_src processing playout cessing elements. Our SystemC simulator generated from token_out <<flow>> token_in token_out <<flow>> token_in UML designs supports the behavior of asynchronous flows. This is in contrast to a recent study [4]. In the rest of the paper, we will discuss the UML model stream_storage of system level stream processing, describe the design workflow, present the translator which can produce Sys- temC code from restricted Rhapsody designs, and illustrate the workflow with a case study. Some concluding remarks Figure 1. Functional Block Modelling of a will follow the discussions. Stream Processor 3 Requirements of Real Time Stream Models In Fig. 1, a functional block model of a stream proces- & UML 2.0 Notations Needed sor is shown. The model illustrates the exchange of infor- mation “flow”s at the highest abstract level. Streams are We view stream applications as operations on flows. represented in tokens which flow into and out of process- Flows of stream packets undergo processing at different ing elements. The blocks in the functional block model are stages of calculation. Representations of flow are manda- “composite classes” which decompose hierarchically into tory in stream modelling. standard classes. The concept of composite class is similar Modelling Requirements: Flows require entrances and ex- to the definition of “Metaclass” proposed by the UML for its at processing elements. These gateways are also to be SoC forum. We expect these two notations will be merged represented in abstraction with distinct attributes. in the final version of UML 2.0. There is also a need to hierarchically specify the compu- The notation of “port” is new in UML 2.0. It is used tation complexity inside processing elements. Since video in defining complicated incoming and outgoing interfaces. and audio stream protocols have become very sophisticated, In Rhapsody’s terminology, the interface for incoming mes- the complexity of calculation grows so hard that a non- sages is called a “provided interface”, similarly the interface hierarchical representation would be not manageable. for outgoing messages is termed a “required interface”.
  • 3. To decompose hard computation complexities, “hierar- stream application parameters in UML 2.0. The UML mod- chical statecharts” are needed. Nested statecharts are al- els can be executed as early verifications. lowed to represent sub-machines as part of the parent chart. The UML specifications are exported to XMI format files The “structural diagram” is usually a detailed description which are translated by our translator to SystemC simulator of functional block models. It emphasizes the structure of models in TLM and RTL styles. The simulator code under the objects in a system, including types, relationships, at- proper coding constraints [13] can be compiled by the Syn- tributes and operations. We will show an example in Fig. 5. opsys CoCentric SystemC compiler into gate level netlists A stream processor needs stream traces to drive its ex- in Verilog, which are synthesizable into programmable ar- ecution. The relationship is shown as a dependency from chitecture implementations. The coding constraints such processing blocks to the stream storage package in Fig. 1. as using static memory instead of dynamic memory, struct In the stream storage package, a trace manager manages rather than union, and call by value instead of call by refer- stored trace files and delivers necessary stream attributes to ence, are imposed by the synthesizable subset of SystemC. the processing blocks. The description of the stream storage In the meantime, verifications are carried out at multiple package is an abstraction of memory management mecha- levels, i.e., UML specification, TLM style translation, RTL nisms. The memory can be either physically centralized style translation and SystemC simulation. RAM blocks or logically assembled cache lines associated with each processing element. s e n < s s < e i i n t n s i p i A constraint is a condition or restriction expressed in # i f n } d e f F # } d ; e f i n e F Parser Template S C S C M v O o C D i T U d O L R E e ( S C T H R text. It is generally a Boolean expression that must be true TLM code XMI for an associated model element for the model to be con- doc Rhapsody XM ITool i t Ab stract Syntax s e n < s s < e i i n t n s i p i sidered well-formed. To check the validity of a design in # i f n } d e f F # } d ; e f i n e F tree S C S C M v O o C D i T U d O L R E e ( S C T H R simulation of the model of the design, a constraint is an as- B ehavioral code sertion rather than an executable mechanism. It does not Synthesizable # # } i d s ; f e e n f en < s } d i ts < e e n i i n f e t n s exist in the final description for hardware synthesis. S C M O D U L v o i d S C C T O R S C T H UML models in Rhapsody RTL code Processor Stream P ara. Text D esc. Extract. UML S pec. UML Exe c . Figure 3. The Translation Process XMI Data TLM S Tran tyle slation Beha v or l i Sty e Code 5 The UML2Code Translator RTL S tyle RTL Style Translation Cod e SystemC UML 2.0 is closer to SystemC than its predecessor since Simulation some of the new concepts have direct counterparts in Sys- SystemC Comp iler temC. For example, a meta-class corresponds to a mod- Synthesis ule in SystemC. During the code generation, we apply the following mapping rules: (a) all components in the struc- tural diagram, which are meta-classes, are translated into a Figure 2. A UML 2.0 Based Design Workflow “sc module”; (b) the port type is determined by the nam- ing convention of the port; (c) the statechart in each ac- tive object is translated into a process whose method name is “entry”. In this method, we map each statechart into 4 A UML 2.0 Based Design Workflow an unclocked “sc thread” for TLM style translation. For RTL style translation, the mapping is a clocked process We propose and implement a design workflow based “sc method”, which will be synthesizable; (d) the defini- on UML 2.0 with SystemC as its intermediate language in tions of message structures are encapsulated in flow whose Fig. 2. In this design workflow, our own efforts include counterpart is sc interface. the steps of UML specification, transaction level modelling Besides the above general rules, the translator also adds (TLM) style translation, register transfer level (RTL) style platform dependant hardware details such as considerations translation and SystemC simulation. of reset, clock, and variable types. Additional constraints The translator is based on the XML Metedata Inter- such as cache and memory configurations can be added to change (XMI) format of UML representations made with make the translator generate more hardware features. Rhapsody. From XMI representations, the translator gener- Figure 3 shows the translation workflow of UML2Code. ates SystemC code in both TLM and RTL style. We start with a UML 2.0 model in Rhapsody. The design To use the workflow, designers usually work with the model is accepted by Rhapsody’s XMITookit to generate UML specifications only as the rest steps of the workflow corresponding XMI documents as inputs to our translator. are automated. The major work of the designers is to vi- XMITookit preserves all the model information, and it is sually specify the processor architecture parameters and a textual representation of the UML model. The generator
  • 4. M PEG2 audi o representations in XML Metadata Interchange (XMI) for- stream PB1 pl ayback PE1 PE2 mat which is not supported by Rose RT. M P3 UML Specifications: To detail the descriptions of “flow” stream vi deo PB2 driven activities in Fig. 2, we use a structural diagram in pl ayback Fig. 5 which describes the activities of instances of objects whose realistic roles are shown in Fig. 4. Figure 4. An Abstract Stream Processing SoC In Fig. 5, the ports belonging to object instances form the communication channels for streams. The video and audio streams are tokenized into token flows. Token IDs are ini- tiated from video source or audio source, then pass through parses the XMI documents and builds the internal represen- processing elements to reach the video sink or audio sink. tation of the model. The syntax tree is further processed to Each processing element queries the trace manager for de- compute and store some relations. The syntax tree holds all tailed attributes of tokens. The processing elements take the the data required to build different levels of code. By using proper actions in accordance to the attributes of tokens. different templates, the same model can be used to generate code at different levels: TLM, Behavioral and RTL level. In UML 2.0, there is no need to inherit explicitly the Behavioral and RTL code can be further synthesized into interface definitions, as was the case in UML 1.x, for the gate-level netlists in Verilog/VHDL. ports where token IDs go through. The interface definitions are built into the ports in UML 2.0. The abstract operations in Fig. 5 represent a typical de- 6 A Case Study sign in stream processing. Some streams consist of large packets of data. Each processing element does not need all Video and audio decoders are typical streaming applica- the data in a packet. It is hence inefficient in hardware to tions. Examples include the MPEG2 video decoder [9] and transfer complete packets through the processing elements. MPEG Audio Layer 3 (MP3) decoder [8]. As a case study, In our example, only token IDs are passed through process- we shall map these applications into an abstract SoC archi- ing elements, and each processing element only fetches nec- tecture, then implement it using our design workflow. essary data for its processing from the trace manager. The Experimental Setup: The process to decode MPEG2 video hardware costs will be reduced by this means. streams consists of 4 major steps, namely variable length decoding (VLD), inverse quantization (IQ), inverse discrete cosine transition (IDCT) and motion compensation (MC). We map VLD and IQ to the first processing element in the SoC, IDCT and MC to the second element. To play back MP3 audio streams, we usually need 8 steps, namely (1) synchronous and error checking, (2) Huff- man decoding, (3) re-quantization, (4) reordering, (5) alias reduction, (6) Inverse Modified Discrete Cosine Transform, (7) frequency inversion, and (8) synthesis polyphase filter. We assign the earlier 4 steps to the first processing element in the SoC, and the rest 4 steps to the second element. Another important design factor, scheduling, is also con- sidered in our model. In our case study, we implemented the TDMA scheduling policy as the scheduler. We summarize the above settings as the abstract architecture in Fig. 4. To obtain the requirements of execution cycles at differ- ent stages, we use one of SimpleScalar’s [1] tools, “sim- Figure 6. A Stream SoC’s Class Diagram profile” configured to the default values, to run reference implementations of MPEG2 decoder and MP3 decoder sep- In Fig. 6, we use a traditional class diagram to specify arately without scheduling. For each macroblock, processor the inheritances and association among the components of cycles at different execution stages are captured and stored the SoC and management of stream traces. These entities into trace files. For each video or audio stream, there are are classes which inherit or aggregate attributes from other a set of trace files consisting of records for stream tokens. classes or interfaces. Each record contains a token index number and token at- UML 2.0 supports hierarchical and concurrent state- tributes such as the execution cycles. charts. We use traditional or single-layer statecharts to To support real time applications, I-Logix Rhapsody is specify simply calculation logic flows inside each object. preferred to Rational Rose Real Time (RT) since the lat- To describe complicated tasks, we use these new features est Rhapsody provides more support for UML 2.0 notations to describe hierarchical states and concurrent calculations. than Rose RT such as functional block modelling, flow and For example, a hierarchical state containing concurrent sub- concurrent state charts. Moreover, Rhapsody can produce machines in the “trace manager” is shown in Fig. 7.
  • 5. Figure 5. A Structural Diagram of a Stream Processing SoC H ier ar c hic alS at t e r eady For Quer y r eady For Quer y quer y _s end_pe1 quer y _s end_pe2 r ec v Pe1Quer y > r ec v Pe2Quer y . . . Figure 7. A Hierarchical State in an Object Figure 8. A Constraint Anchored to an Object Similar to assertions, constraints have to be checked con- stantly during processing of the streams. A constraint ex- ample is shown in Fig. 8 for illustration. The constraint has a dependency relationship with the object. A violation of Figure 9. Communications among Modules the constraint incurs a pause in the playback client, conse- quently, users observe breaks in the playback video or audio clips. The number of constraint violations is recorded as a port”; incoming ports have names beginning with “inport”; metric of quality of service. bi-directional ports are identified as “inoutport*” in Fig. 5. As shown in the example, designers only need to deal Regarding the code efficiency, for the settings in the ex- with structural diagrams, class diagrams and statecharts for ample, the size of the generated SystemC code is around specifications in UML. It is straight forward to reuse the 3100 lines. The code generation time for both RTL style specifications and quickly modify designs in UML 2.0. and TLM style is less than 10 seconds. It is also interesting UML Execution: UML models are executable in the Rhap- to note that the RTL style code may have a smaller size than TLM style code, but always a longer execution time. sody runtime environment. This feature allows designers to verify their designs at very early stage of design workflow. To illustrate the mapping results, we take the RTL style declaration part of the SystemC of the first processing ele- UML 2.0 visualizes the communication with a new fea- ment “pe stage1” as the example. ture message sequence chart(MSC). Fig. 9 is the screen shot of a MSC generated during the execution of UML models. SC_MODULE( pe_stage1) { In this MSC, tokens trigger events which are represented as //define default ports messages passed among SoC modules. We can trace the ex- sc_in_clk CLK; ecution of video tokens 3, 5 and audio tokens 12, 14. The sc_in<bool> reset; example shows another clear benefit of UML 2.0 for system //define the outgoing ports level design of stream processing SoC. sc_out<bool> To achieve a faster execution, we can also disable the trace_manager_query_send_pe1; MSC generation during execution. The option is observed sc_out<int > trace_manager_query_send_pe1_qTokenNum; to save the execution time by about 30%. sc_out<bool> SystemC Code Generation: To facilitate the translation pe_stage2_in_token_pe2; synthesis, we apply an intuitive naming conventions to the sc_out<int > port names. The names of outgoing ports start with “out- pe_stage2_in_token_pe2_tokenNum;
  • 6. //define incoming ports the spirit of stream applications by emulating the processing sc_inout<bool> in_video_pe1; of tokenized streams. A case study shows SystemC imple- sc_in<int > in_video_pe1_vTokenNum; mentation is also synthesizable with Synopsys tools. As the sc_inout<bool> query_reply_pe1; future work, we will extend our work by modelling addi- sc_in<int > query_reply_pe1_execTime; tional hardware features of stream applications in UML 2.0 //token attributes public: to enable generation of full-fledged processor designs using int vTokenNum; our framework. public: int vExecTime; ...... //processing status References public: int bufLevel; private: [1] T. Austin, D. Burger, G. Sohi, M. Franklin, S. Breach, and int state; ...... K. Skadron. The simplescalar architectural research tool set. //clock and process definitions In www.cs.wisc.edu/ mscalar/simplescalar.html, 1998. public: SC_CTOR(pe_stage1) { [2] F. Bruschi. A systemc based design flow starting from uml //define the clocked thread models. In The 6th European SystemC users Group Meeting, SC_METHOD(entry); 2002. sensitive_pos<<CLK; [3] P. Green and M. Edwards. The modelling of embedded sys- } ... tems using hasoc. In Proceedings of Design, Automation and } Test in Europe Conference and Exhibition, 2002, pages 752– To represent the semantics of assertions, we propose 759, March 2002. constructs AFTER, ALWAYS, EVENTUALLY and NEVER, [4] P. Green and S. Essa. Integrating the synchronous dataflow which are new to SystemC standards. An intuitive imple- model with uml. In Proceedings of DATE-2004, pages 736– mentation of an assertion in SystemC is as follows: 737. IEEE Press, Feb. 2004. [5] I-LOGIX. Rhapsody in c++. In Available on- //AFTER(t>itsVideo_sink.D) line, http://www.ilogix.com/rhapsody/rhapsody c plus.cfm. // ALWAYS(itsVideo_sink.B>0) I-Logix Incorporation, 2004. if((t>itsVideo_sink.D)&& !(itsVideo_sink.B>0)){ [6] U. J. Kapasi, S. Rixner, W. Dally, B. Khailany, J. H. Ahn, cout<<"Assertion 1 violated!"<<endl; P. Mattson, and J. D. Owens. Programmable stream proces- cout<<"Tot. # of violation:" sors, ieee computer, August 2003. <<vcount<<endl; vcount++; [7] L. Lavagno, G. Martin, and B. Selic. Uml for Real: Design } of Embedded Real-Time Systems. Kluwer Academic Pub- lishers, 2003. These descriptions in SystemC are synthesizable with the Synopsys CoCentric SystemC compiler in a behavior [8] MPEG. Mpeg audio resources and software. In Available on- description style. After the compilation process, descrip- line, http://www.mpeg.org/MPEG/audio.html. Moving Pic- ture Experts Group, 2004. tions in Verilog at the gate level are generated, which are acceptable to further FPGA design workflows. [9] MPEG. Mpeg video resources and software. In Avail- able online, http://www.mpeg.org/MPEG/video.html. Mov- Though the generated design is synthesizable, we would ing Picture Experts Group, 2004. like to stress that the design generated by far is not a full- fledged processor; instead, it is an implementation of the ab- [10] K. Nguyen, Z. Sun, P. Thiagarajan, and W. Wong. Model- driven soc design via executable uml to systemc. In The 25th stract SoC model in UML 2.0. To generate a more complete IEEE Int’l Real-Time Systems Symp., pages 459–468, 2004. design, we should specify additional hardware constraints in the UML model, e.g. bit widths of attribute variables, and [11] NVIDIA. Nvidia cg toolkit. In http://www.nvidia.com/cg. NVIDIA Corp., 2004. existing IP cores as architectural choices for processor com- ponents. These additional specifications can be processed [12] B. Serebrin, J. D. Owens, C. H. Chen, S. P. Crago, U. J. Kapasi, P. Mattson, J. Namkoong, S. Rixner, and W. J. Dally. by our translator to generate more details in SystemC mod- A stream processor development platform. In Proc. of ICCD- els, and consequently further hardware particulars. 2002. IEEE, Sep. 2002. [13] W. H. Tan, P. S. Thiagarajan, W. F. Wong, Y. Zhu, and 7 Concluding Remarks S. K. Pilakkat. Synthesizable systemc code from uml models. In UML for Soc Design, DAC 2004 Workshop, In this paper, we outlined an approach to modelling www.comp.nus.edu.sg/ zhuyx/usoc04.pdf, June 2004. stream processing SoC at a system level. A translation [14] W. Thies, M. Karczmarek, and S. Amarasinghe. Streamit: mechanism that produces SystemC code from UML 2.0 de- A language for streaming applications. In Proc. of the signs was also presented. With these completions, speci- 2002 Int’l Conf. on Compiler Construction. Springer-Verlag fications of real time stream processing SoC platforms in LNCS, April 2002. UML 2.0 become intuitive and generating simulator de- [15] Q. Zhu, A. Matsuda, and M. Shoji. An object-oriented de- scriptions via SystemC is feasible. The simulator in Sys- sign process for system-on-chip using uml. In The 15th Int’l temC we produced from the UML model explicitly reflects Symp. on System Synthesis, pages 249–254, 2002.