1 / 21

Ephemeral Project

Ephemeral Project. Project Tasks Ephemeral Unix/Linux C++ implementation MPP implementation Other. ?. Project Tasks. Compiler 1 Lexer/Parser Machine independent Semantic Analysis Linux implementation MPP Instruction Set Simulator MPP sem. analysis MPP code generation.

mtammy
Download Presentation

Ephemeral Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ephemeral Project • Project Tasks • Ephemeral • Unix/Linux C++ implementation • MPP implementation • Other ?

  2. Project Tasks • Compiler 1 • Lexer/Parser • Machine independent Semantic Analysis • Linux implementation • MPP Instruction Set • Simulator • MPP sem. analysis • MPP code generation

  3. Ephemeral language • Features: • Values: • integers (bit[..]) • Booleans are 1-bit integers • Char’s are 8-bit integers • Code • Port references • No block nesting • Abstraction and types: • Place – Ephemeral location has formal parameters • Code – holds code • Action – like a function • Port – transport between places • Bit[] – integers • Multi-line nested comments • Imperatives: • Send message • Place creation/designation • Low-level Control • Send code in messages • branching= send conditionally selected code • Expressions: • Arithmetic • Usual C operator set including conditional ?: • Binary (not hex) literals • Decimal literals • Code • Action name or formal • conditional • Port reference • Place name.port or formal • conditional

  4. Compiler design • Flex lexer • Bison parser • custom semantics checks • Intermediate representation • Generate C++ code for Linux implementation • Generate Message code for MPP

  5. Machine independent semantic analysis • Check that all referenced names are defined • Check that actual parameters types match formal • Check duplication of port references (ports and places are single-use)

  6. Intermediate representation • Syntax tree • Action table • Code table • Message table • Place table • Message table • Syntax tree augmented with types &c.

  7. Unix/Linux C++ implementation features • Compilation by translation to C++ • Unlimited places & place “creation” • C++: classname var; • Ephemeral: • placename var(); • placename var(time); • Built-in places for I/O • Complex expressions • Unlimited messages &c.

  8. Unix/Linux C++ implementation • Gen C++ code • Ready place queue • Waiting place collection • function pointers • Error checking for MPP

  9. C++ code generation • struct pn:public place { • Struct { code theworkf, int x, port p} Go; • }; • function work(pn &here){ • pn & nextnext = *new pn; • Here.Go.p->Go+=1;// special • Here.Go.p->Go .theworkf = here.Go.theworkf; • Here.Go.p->Go.x = here.Go.x+1; • Here.Go.p->Go.p = &nextnext; • }; • Place pn { • Go:( w theworkf, bit[1] x, pn.Go p); • Go; • }; • Action work(pn) { • pn nextnext; • p:( theworkf, x+1, nextnext.Go ); • }; • Code w { work; }; • // abstraction only

  10. MPP implementation • Instruction set design • simulator • Space-time • Compilation considerations • locality

  11. MPP implementation features • True Compilation • no place “creation” • Place “allocation” in relative space-time • C++: int * var = (int*)0x88446; • Use “(*var)” in code. • Ephemeral: • placename var( time_offset, location_offset ); • I/O ? • limited expressions • limited messages per place

  12. Vibrating string simulation Use fixed finite elements Relatively simple coding. Ideal application Application topology exactly matches pipeline topology MPP application

  13. MPP Instruction set design • Simplified architecture • 2 space-time dimensions • X,Y diagonal in space-time • 2 inputs and 2 outputs per “place”

  14. MPP space-time topology • “Word” picture:

  15. MPP Instruction set design • Message format: • “active” bit • 128 bit message data • Up to 8 fields • Field descriptor block • Defines up to 8 fields • Analyzed and generated automatically by proc.

  16. MPP Instruction set design • (35 bit) Instruction • Permutation(16) • Operation • Opcode(5) • arg1(4) • arg2(4) • arg3(4) • Active message bits(2)

  17. MPP Opcodes • (5 bit) Opcode • Usual C int operator support and conditional swap for • “?:” conditional operator • | ^ & < <= == >= > != + - * / % >> << - ~ !

  18. MPP Instruction set design • Permutation(16 bits) • Re-arrange any four contiguous segments of the messages • Example: • 5,1,7,0 produces this -> • permutation 0,1 5, 7 5, 1, 7, 0

  19. MPP simulator • Simulate an “array” of processors. • These processors have no “state”. The system state is entirely in the messages. • main data structure: • Array of messages • Simple simulation loops with possible optimization for locality

  20. MPP instruction code generation • Fields: 35,8,8 • Active message: left • Permutation: 0,0,0,0 • Opcode: + • Args, 1,2,1 • Place pn { • Left:( w workcode, • Bit[ 8 ] x, • Bit[ 8 ] one, • ); • Left; • }; • Action work(pn) { • pn next(0,1); • Next.left:( workcode, x+one, one ); • }; • Code w { work; };

  21. MPP Instruction generation

More Related