Docstoc

xadl-structural-modeling

Document Sample
xadl-structural-modeling Powered By Docstoc
					Structural Modeling in
             xADL 2.0

           Eric M. Dashofy
      edashofy@ics.uci.edu
Examples:
    Interfaces


          Clock         Component



                           Connector
                 Bus1

    Interfaces
Structural Entities of
Concern

          Clock     Configuration


                    Links
           Bus1



           LCD
          Driver
A Word About Notation
 Raw XML can look pretty nasty…
 <?xml version="1.0" encoding="UTF-8" ?>
 <instance:xArch
xsi:schemaLocation="http://www.ics.uci.edu/pub/arch/xArch/instance.xsd
http://www.isr.uci.edu/projects/xarchuci/core/instance.xsd
http://www.ics.uci.edu/pub/arch/xArch/types.xsd
http://www.isr.uci.edu/projects/xarchuci/ext/types.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:types="http://www.ics.uci.edu/pub/arch/xArch/types.xsd"
xmlns:instance="http://www.ics.uci.edu/pub/arch/xArch/instance.xsd">
 <types:archStructure xsi:type="types:ArchStructure">
 <types:component xsi:type="types:Component" types:id="Comp1">
  <types:description xsi:type="instance:Description">Component Number
1</types:description>
  </types:component>
  </types:archStructure>
  </instance:xArch>
Compact non-XML notation
xArch{
  archStructure{
    component{
       (attr) id = “Comp1”
       description = “Component Number 1”
    }
  }
}
 Let’s model the architecture
First, every xADL 2.0 document is bounded by
<xArch> and </xArch> tags.
 xArch{
   … … …
 }
 Let’s model the architecture
Structural (design-time) descriptions are
in an <archStructure>…</archStructure> block.
 xArch{
   archStructure{
     … …    …
   }
 }
 Let’s model the architecture
Now we can model a basic component.
                                      Clock
 xArch{
   archStructure{
     component{
        (attr) id = “clock”
        description = “Clock”
     }
   }
 }
 Let’s model the architecture
Let’s add a pair of interfaces.
 xArch{                                            Clock
   archStructure{
     component{
        (attr) id = “clock”
        description = “Clock”
        interface{
          (attr) id = “clock.top”
          description = “Clock Top Interface”
          (attr) direction = “inout”
        }
        interface{
          (attr) id = “clock.bottom”
          description = “Clock Bottom Interface”
          (attr) direction = “inout”
        }
     }
   }
 }
 Let’s model the architecture
Now let’s model the connector                  Bus1
 xArch{
   archStructure{
     //Clock component description goes here
     connector{
       (attr) id = “bus1”
       description = “Bus1”
     }
   }
 }
 Let’s model the architecture
And add interfaces again                           Bus1
 xArch{
   archStructure{
     //Clock component description goes here
     connector{
         (attr) id = “bus1”
         description = “Bus1”
         interface{
           (attr) id = “bus1.top”
           description = “Bus1 Top Interface”
           (attr) direction = “inout”
       }
         interface{
           (attr) id = “bus1.bottom”
           description = “Bus1 Bottom Interface”
           (attr) direction = “inout”
         }
     }
   }
 }
 Let’s model the architecture
Let’s model the other component.
                                                         LCD
 xArch{
   archStructure{                                       Driver
     … … …
     component{
        (attr) id = “lcddriver”
        description = “LCD Driver”
        interface{
          (attr) id = “lcddriver.top”
          description = “LCD Driver Top Interface”
          (attr) direction = “inout”
        }
        interface{
          (attr) id = “lcddriver.bottom”
          description = “LCD Driver Bottom Interface”
          (attr) direction = “inout”
        }
     }
   }
 }
 Let’s model the architecture
Let’s model the top link.                   Clock
 xArch{
   archStructure{
     … … …
     link{
       (attr) id = “Clock_to_Bus1”          Bus1
       description = “Clock to Bus1 Link”
     }
   }
 }
 Let’s model the architecture
Let’s model the top link.                   Clock
 xArch{
   archStructure{
     … … …
     link{
       (attr) id = “Clock_to_Bus1”          Bus1
       description = “Clock to Bus1 Link”
       anchorOnInterface{
         (attr) type = “simple”
         (attr) href = “#clock.bottom”
       }
     }
   }
 }
 Let’s model the architecture
Let’s model the top link.                   Clock
 xArch{
   archStructure{
     … … …
     link{
       (attr) id = “Clock_to_Bus1”          Bus1
       description = “Clock to Bus1 Link”
       anchorOnInterface{
         (attr) type = “simple”
         (attr) href = “#clock.bottom”
       }
       anchorOnInterface{
         (attr) type = “simple”
         (attr) href = “#bus1.top”
       }
     }
   }
 }
 Let’s model the architecture
                                             Bus1
Let’s model the bottom link.
 xArch{
   archStructure{
     … … …
     link{                                    LCD
       (attr) id = “bus1_to_lcddriver”       Driver
       description = “Bus1 to LCD Driver Link”
       anchorOnInterface{
         (attr) type = “simple”
         (attr) href = “#bus1.bottom”
       }
       anchorOnInterface{
         (attr) type = “simple”
         (attr) href = “#lcddriver.top”
       }
     }
   }
 }
 Let’s model the architecture
A quick notational note...
 The Xlink structure is so common:
       anchorOnInterface{
         (attr) type = “simple”
         (attr) href = “#bus1.bottom”
       }
 That we abbreviate it like this:
 (xlink) anchorOnInterface = “#bus1.bottom”
 Let’s model the types
Let’s model the type of the clock component.
 xArch{
   //ArchStructure stuff goes here…
     archTypes{
     }
 }
 Let’s model the types
First we have to model the types of our interfaces.
 xArch{
   //ArchStructure stuff goes here…
     archTypes{
       interfaceType{
         (attr) id = “eventinterface_type”
         description = “An event-passing interface”
       }
     }
 }
 Let’s model the types
Now let’s model the type of the clock component.
 xArch{
   …
   archTypes{
     componentType{
       (attr) id = “clock_type”
       description = “Clock Type”
       //What’s missing here?
     }
   }
 }
 Let’s model the types
Now let’s model the type of the clock component.
 xArch{
   …
   archTypes{
     componentType{
        (attr) id = “clock_type”
        description = “Clock Type”
        signature{
          (attr)id = “clock_type.topsig”
          description = “Clock Type Top Signature”
          (xlink) type = “#eventinterface_type”
        }
        signature{
          (attr)id = “clock_type.bottomsig”
          description = “Clock Type Bottom Signature”
          (xlink) type = “#eventinterface_type”
        }
     }
   }
 }
 Now let’s hook them up…
Let’s modify our Clock component to have type ptrs.
 xArch{
   archStructure{
     component{
       (attr) id = “clock”
       description = “Clock”
       interface{
         (attr) id = “clock.top”
         description = “Clock Top Interface”
         (attr) direction = “inout”
         (xlink) type = “#eventinterface_type”
       }
       interface{
         (attr) id = “clock.bottom”
         description = “Clock Bottom Interface”
         (attr) direction = “inout”
         (xlink) type = “#eventinterface_type”
       }
       (xlink) type = “#clock_type”
     }
   }
 }
Summing up…
 We covered structure & types
  modeling in xADL 2.0
 It’s easier to edit xADL 2.0 using its
  tools than by hand
 For more info:
       http://www.isr.uci.edu/projects/xarchuci/
       http://www.isr.uci.edu/projects/xarchuci/guide.html

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:16
posted:8/7/2012
language:
pages:23