ObjectOriented Modeling for System Level Design Abdallah Tabbara
Object-Oriented Modeling for System Level Design Abdallah Tabbara Bassam Tabbara A. Richard Newton UC Berkeley
Project Goals l Model all aspects – Behavior – Communication – Structure of a design block starting at the system level l Support specification, verification, and synthesis
Description l Use an Object-Oriented methodology for modeling designs at the system level – Object Modeling Technique (OMT) (Rumbaugh ’ 91) l Graphical design entry – object model – dynamic model – functional model Visual debugging environment l Specification can be verified, and synthesized l
Technology l Objects – Instantiation – Encapsulation – Methods for Communication l Object-Oriented Input Specification – OOP, simple, compact, intuitive – implementation independent – no “side-effects” Þ Java: define subset and policy
Modeling Issues l Hierarchy l Communication – Inputs – Outputs – Timing l Blocks – Combinational – Sequential
Object as the Building Block l Basic unit of the hierarchy l Methods – Interface – Communication l Private Variables – State – Instances of other Objects
Design Entry: An Illustrative Example Handshake protocol between two processes l Object Model – Object Producer – Object Consumer – Object Hand. Shake l
Design Specification: An Illustrative Example (1) l Dynamic Model – describes the control aspects of a system l Functional Model – describes data value transformations
Design Specification: An Illustrative Example (2)
Modeling in Java (1) class Producer extends Block { private boolean Ready; // Constructor public Producer(boolean i) { Ready = i; } // Methods public void Compute. Ready(boolean Ack) { Ready = !Ack; return(!Ack); } public boolean Ready. Status() { return Ready; } } class Consumer extends Block { private boolean Ack; // Constructor public Consumer(boolean i) { Ack = i; } // Methods public void Compute. Ack(boolean Ready) { Ack = Ready; return(Ready); } public boolean Ack. Status() { return(Ack); } }
Modeling in Java (2) class Hand. Shake extends Block { // State private int data. A, data. B; // Internal Objects private Producer P; private Consumer C; // Constructor public Hand. Shake() { P = new Producer(true); C = new Consumer(false); } // Methods public int Output(int data_in) { if (P. Ready. Status()) { data. A = data; } if (C. Ack. Status()) { data. B = data. A; } // Latch P. Compute. Ready(C. Ack. Status()); C. Compute. Ack(P. Ready. Status()); return data. B; } }
Intermediate Design Representation l Class File Intermediate Format (CFIF) – Extracted from the Java Virtual Machine class file format. – Each class file contains one Java type: either a class, or an interface. – CFIF output for the Producer in our example follows: access_flags: this_class: Producer super_class: Block interfaces_count: 0 fields_count: 1 fields[0]. access_flags: ACC_PRIVATE fields[0]. name_index: Ready fields[0]. descriptor_index: Z fields[0]. attributes_count: 0 methods_count: 3 methods[2]. access_flags: ACC_PUBLIC methods[2]. name_index: Ready. Status methods[2]. descriptor_index: ()Z methods[2]. attributes_count: 1 methods[2]. attributes[0]. name_index: Code methods[2]. attributes[0]. max_stack: 1 methods[2]. attributes[0]. max_locals: 1 methods[2]. attributes[0]. code_length: 5 methods[2]. attributes[0]. code[0]: aload_0 methods[2]. attributes[0]. code[1]: getfield -> A Ready Z methods[2]. attributes[0]. code[4]: ireturn . . .
Advantages of This Approach l Increased Productivity – HDL Lines per week l Intuitive Specification l Ease of Design Space Exploration l Block Level Methodology – better design reuse l Validation at the High Level l Potential for Formal Verification
Future Work l Incorporate Design – Validation (simulation) – Verification (formal) l Synthesis from CFIF – Hardware – Software FOR MORE INFO. . . Abdallah Tabbara: atabbara@eecs. berkeley. edu Bassam Tabbara: tbassam@eecs. berkeley. edu
- Slides: 14