550 likes | 651 Views
Part II. MINIMALIST: DESIGN EXAMPLES + HANDS-ON TUTORIAL. Steven M. Nowick Columbia University (nowick@cs.columbia.edu) July 16-17, 2002. MINIMALIST: Download Site. Accessible on the Web from: http://www.cs.columbia.edu/async Currently, two versions: SPARC-solaris, Linux Includes:
E N D
Part II.MINIMALIST: DESIGN EXAMPLES +HANDS-ON TUTORIAL Steven M. Nowick Columbia University (nowick@cs.columbia.edu) July 16-17, 2002
MINIMALIST: Download Site Accessible on the Web from: http://www.cs.columbia.edu/async Currently, two versions: SPARC-solaris, Linux Includes: complete tutorial (text + PDF slides) benchmark examples other documentation
EXAMPLE #1: Martin Q-Element AR BR AA BA From Caltech:Alain Martin, “Programming in VLSI: from Communicationg Processes to Delay-Insensitive Circuits”. Chapter in “Developments in Concurrency and Communication”, (ed. C.A.R. Hoare), Addison Wesley, UT Year of Programming Series, pp. 1-64 (1990).
EXAMPLE #1: Martin Q-Element AR BR AA BA Handshaking Protocol: AR+ AA+ AR- AA- BR+ BA+ BR- BA-
Example #1: Martin Q-Element Handshaking Protocol: Burst-Mode Specification: AR+ input BR+ output BA+ BR- BA- AA+ AR- AA-
0 1 2 3 Example #1: Martin Q-Element Handshaking Protocol: Burst-Mode Specification: AR+ input AR+/BR+ BR+ input burst/ output burst output BA+ BA+/BR- AR-/AA- BR- BA-/AA+ BA- AA+ AR- AA-
Example #1: Martin Q-Element Running MINIMALIST:the Simple Approach Step #0. Getting Started ...(a) make a ‘minimalist’ subdirectory in your home directory: > mkdir minimalist(b) go to it: > cd minimalist (c) create a new subdirectory: > mkdir tutorial1(d) go to it: > cd tutorial1 (e) copy BM spec into ‘tutorial1’ subdirectory: > cp /softs/minimalist/examples/martin-q-element/ martin-q-element.bms .
Example #1: Martin Q-Element Running MINIMALIST:the Simple Approach Step #0. Getting Started (cont.) ... (f) to start up the MINIMALIST ‘shell’, type: > MinShellMINIMALIST will respond with a new prompt: minimalist> You are now using “MinShell”. This environment allows you to do synthesis runs, display specs + circuits, get online help, and even run many standard Unix commands (cp, mv, ls, pwd, …). (In general, you will want to activate “MinShell” at the start of a MINIMALIST synthesis session.)
0 1 2 3 Example #1: Martin Q-Element Running MINIMALIST:the Simple Approach Step #1. Show BM Specification(a) Look at “BMS” text file: >more martin-q-element.bms AR+/BR+ BA+/BR- name martin_q_elementInput AR 0 Input BA 0 Output BR 0 Output AA 0 0 1 AR+ | BR+ 1 2 BA+ | BR- 2 3 BA- | AA+3 0 AR- | AA- AR-/AA- BA-/AA+
0 1 2 3 Example #1: Martin Q-Element Running MINIMALIST:the Simple Approach Step #1. Show BM Specification (cont.)(b) Graphic Display: >plot_qt martin-q-element.bms AR+/BR+ BA+/BR- AR-/AA- BA-/AA+
Example #1: Martin Q-Element Running MINIMALIST:the Simple Approach Step #2. Synthesize BM Implementation: > minimalist-basic martin-q-element.bms Step #3. Display It: (a) Text: 2-Level Equations + Results Summary >[see displayed text output] (b) Plot AND/OR Circuit: [follow displayed instructions:] > plot_qt martin_q_element-L.sol (c) Plot NAND/NAND Circuit: [follow displayed instructions:] > plot_nand martin_q_element-L.sol
Example #1: Martin Q-Element AR Martin Implementation: (“QDI”) BR C AA BA AR Burst-Mode Implementation: (Fund. Mode) BA BR BA AR AA BA C-elementnow replaced by: -NOR2 -NAND2 AR Y0
EXAMPLE #2A: Tangram Mixer TANGRAM Mixer = “Call Element” AR CR AA CA BR BA From Philips Research Lab: “TANGRAM” System, K. van Berkel, “VLSI Programming of Asynchronous Circuit for Low Power”. Chapter in “Asynchronous Digital Design”, (eds. G. Birtwistle and A. Davis), Springer-Verlag, Workshop in Computing Series, pp. 152-210 (1995).
0 AR CR AA CA BR BA EXAMPLE #2A: Tangram Mixer TANGRAM Mixer:Deriving a BM Specification ... Protocol: at most one requester (A or B) is active at any time! BR+/... AR+/...
0 1 2 AR CR AA CA BR BA EXAMPLE #2A: Tangram Mixer TANGRAM Mixer:Deriving a BM Specification ... Protocol: ‘A’ request - BR+/... AR+/CR+ #1 #2 #4 #3 COMPLETE THE BURST-MODE SPEC … THEN CREATE A .BMS FILE …! ==> next slide
Example #2A: Tangram Mixer [… waiting while you create your BM spec; when done, go to next slide.]
6 5 4 3 0 2 1 EXAMPLE #2A: Tangram Mixer Deriving a Burst-Mode Specification...: #1 AR #2 BR+/CR+ CR #4 AR+/CR+ AA #3 CA BR BA CA+/BA+ CA+/AA+ Events #1-4...:first, rising transitionsthen, falling transitions-use same protocol for both A and B requests -assume at most one of A/B channels active at any time! (see choice in state #0) AR-/CR- BR-/CR- CA-/AA- CA-/BA-
Example #2A: Tangram Mixer Running MINIMALIST:the Simple Approach Step #0. Getting Started ...(a) go back into “examples” directory: > cd ..(b) create a new subdirectory: > mkdir tutorial2A(c) go to it: > cd tutorial2A (d) edit/create file for your BM spec: > emacs (or vi) my-tangram-mixer.bms When done: compare your own BMS spec with … /softs/minimalist/examples/tangram-mixer/tangram-mixer.bms
Example #2A: Tangram Mixer Step #1. Show BM Specification:Graphic Display: >plot_qt my-tangram-mixer.bms Step #2. Synthesize BM Implementation: >minimalist-basic my-tangram-mixer.bms Step #3. Display It: (a) 2-Level Equations + Results Summary: > [see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
Example #2A: Tangram Mixer Now, do another synthesis run, and compare:using an “area-oriented” script, with fedback outputs Step #2. Synthesize BM Implementation: >minimalist-area my-tangram-mixer.bms Step #3. Display It: (a) 2-Level Equations + Results Summary: > [see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
C C Example #2A: Tangram Mixer CA AA MINIMALIST Implementation: (Fund. Mode) AR CR BR BA CA TangramImplementation: (“QDI”) CA AA AR CR BR BA CA
0 1 3 2 4 6 5 EXAMPLE #2B: Concurrent Mixer Basic Protocol: events #1-4... Now… create a more concurrent BM Specification! ... BR+/CR+ AR+/CR+ #1 AR #2 CR #4 AA #3 CA BR CA+/AA+ CA+/BA+ BA BR-/CR- AR-/CR- CA-/BA- CA-/AA-
0 1 2 3 6 5 4 EXAMPLE #2B: Concurrent Mixer Basic Protocol: Concurrent Protocol: BR+/ CR+ AR+/ CR+ […waiting while you create a more concurrent Burst-Mode specification for a mixer; when done, go to next slide.] CA+/ AA+ CA+/BA+ AR-/ CR- BR-/CR- CA-/ BA- CA-/ AA-
0 6 5 1 2 4 3 3 4 2 1 0 EXAMPLE #2B: Concurrent Mixer Basic Protocol: BM Spec Concurrent Protocol: BM Spec BR+/ CR+ AR+/ CR+ BR+/ CR+ AR+/ CR+ CA+/ BA+ CA+/ AA+ CA+/BA+ CR- CA+/ AA+ CR- BR-/ CR- AR-/ CR- AR- CA-/ AA- BR- CA-/ BA- CA-/ BA- CA-/ AA-
Example #2B: Concurrent Mixer Step #0. Getting Started ...(a) go back into “examples” directory: > cd ..(b) create a new subdirectory: > mkdir tutorial2B(c) go to it: > cd tutorial2B (d) edit/create file for your own BM spec: > emacs (or vi) my-concur-mixer.bms (e) when done, compare your BM spec to the one in... : >/softs/minimalist/examples/concur-mixer/ concur-mixer.bms Step #1. Show BM Specification (a) Graphic Display: >plot_qt concur-mixer.bms
Example #2B: Concurrent Mixer Step #2. Synthesize BM Implementation: >minimalist-basic concur-mixer.bms Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
Example #2B: Concurrent Mixer Now, do another synthesis run…:using an “area-oriented” script (and compare results)…. Step #2. Synthesize BM Implementation: >minimalist-area concur-mixer.bms Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
EXAMPLE #2C: “While” Module Problem: Design a Burst-Mode “While” (i.e., Loop) Controller Now, you will design an entire BM Specification from start-to-finish … ! Simple Block Diagram (with channels): Balsa/Tangram Equivalent: ACTIVATE ACT #1 #2 #3 CHECKloop condition DT DO EXECUTE loop body Basic Operation: 1.Activate “while” component 2. Check loop variable - if 0, exit (go to #1) - if 1, continue to #3 3. Execute loop body Repeat #2/#3 until loop var false data channel
EXAMPLE #2C: “While”Module Detailed Block Diagram: DETAILED OPERATION: 1. Wait until module activated(ACT_req+) 2. Request loop variable(DT_req+) a.if loop variable = 0(DT_d0+) - complete handshake on DT - complete handshake on ACT - return to #1 (wait for next activation) b.if loop variable = 1(DT_d1+) - complete handshake on DT - execute loop body (i.e., do full handshake on DO) - go to #2 (start next loop test) passive channel ACTIVATE (ACT) ACT_req ACT_ack DT_req DO_req DT_d0 DO_ack DT_d1 EXECUTEloop body (DO) CHECK loop Condition (DT) dual-rail data (0 or 1) active channel active channel
EXAMPLE #2C: “While”Module DETAILED OPERATION: 1. Wait until module activated(ACT_req+) 2. Request loop variable(DT_req+) a.if loop variable = 0(DT_d0+) - complete handshake on DT - complete handshake on ACT - return to #1 (wait for next activation) b.if loop variable = 1(DT_d1+) - complete handshake on DT - execute loop body (i.e., do full handshake on DO) - go to #2 (start next loop test) OPTIMIZATIONS (optional): A. You may overlap these 2 handshakes (i.e. make them concurrent) B. You may overlap these 2 handshakes (i.e. make them concurrent), as long as: - DT is reset (and not changing) during the active phase of DO
5 4 3 0 2 1 Example #3: “HP-IR” (HP Labs) Inputs: intitreq itevent2ticks ctrincack Outputs: iteventreq ctrincreq From HP Labs/Stanford “Stetson” Project:SEE figs. 10, 11, pp. 17-18:A.Marshall, B.Coates, P.Siegel,“Designing an Asynchronous Communications Chip”, IEEE Design&Test of Computers, vol. 11:2, pp. 8-21 (1994) intitreq-/ iteventreq- intitreq+/ iteventreq+ intitreq+/ iteventreq+ itevent2ticks+/ ctrincreq+ iteventreq+ intitreq+/ iteventreq+ itevent2ticks- ctrincack+/ ctrincreq- itevent2ticks- intitreq-/ ctrincreq- ctrincack-/ iteventreq+ Initial values: in state #0, all inputs & outputs are 0
Example #3: HP-IR Running MINIMALIST:the Simple Approach Step #0. Getting Started ...(a) go back into “examples” directory: > cd ..(b) create a new subdirectory: > mkdir tutorial3(c) go to it: > cd tutorial3 (d) copy the BM spec: > cp /softs/minimalist/examples/hp-ir/hp-ir.bms . Step #1. Show BM Specification (a) Graphic Display: >plot_qt hp-ir.bms
Example #3: HP-IR Running MINIMALIST:the Simple Approach • Several Useful Scripts: • Produce 1 -- or 4 -- Circuit Implementations For Each Script • - fedback vs. non-fedback outputs • - single-output vs. ‘output-disjoint’ (shared products) • - different cost functions, ... • (a) BASIC (critical race-free):“minimalist-crf”,“minimalist-crf-suite” > no optimal state assignment (b) SPEED: “minimalist-speed”, “minimalist-speed-suite” • (c) AREA:“minimalist-area”, “minimalist-area-suite”
Example #3: HP-IR Running MINIMALIST:the Simple Approach Step #2. Synthesize BM Implementation:[try each!] >minimalist-crf hp-ir.bms >minimalist-crf-suite hp-ir.bms >minimalist-speed hp-ir.bms >minimalist-speed-suite hp-ir.bms >minimalist-area hp-ir.bms >minimalist-area-suite hp-ir.bms Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
Example #3: HP-IR Running MINIMALIST:the Simple Approach Step #4. Convert to Verilog Output:[optional] >pla2verilog.tcl <PLA file name> GETTING HELP: …extensive on-line help available at all times; type: >help for a list of options.
Example #3: HP-IR Running MINIMALIST:the Simple Approach “Generalized C-Element”Implementations: Produces“SET”/“RESET”functions for each output + next-state 2 Common Implementation Styles: - gC-element:“SET”=pull-down, “RESET”=pull-up - gC output: has inverter +“keeper” (to hold state) - C-element (2-input): implement “SET” and “RESET” as logic networks (2-level), feed eacb into C-element - “RESET”: invert, before feeding into C-element (d) GC SCRIPTS: “minimalist-gc”, “minimalist-gc-suite”
Example #3: HP-IR Running MINIMALIST:the Simple Approach Step #2. Synthesize BM Implementation:[try each!] >minimalist-gc hp-ir.bms >minimalist-gc-suite hp-ir.bms Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions] NOTE: (b) and (c) currently only display separate SET and RESET functions (not GC elements!)
Example #4: RF-Control Running MINIMALIST:Using the MINIMALIST “Shell” From HP Labs/Stanford “Stetson” ProjectA.Marshall, B.Coates, P.Siegel,“Designing an Asynchronous Communications Chip”, IEEE Design&Test of Computers, vol. 11:2, pp. 8-21 (1994)
Example #4: RF-Control Running MINIMALIST:Using the MINIMALIST “Shell” Step #0. Getting Started ...(a) go back into “examples” directory: > cd ..(b) create a new subdirectory: > mkdir tutorial4(c) go to it: > cd tutorial4 (d) copy the BM spec: > cp /softs/minimalist/examples/rf-control/rf-control.bms .
Example #4: RF-Control Step #1. Show BM Specification(a) Look at “BMS” text file: >more rf-control.bms 0 1 RFFrameReq+ | IntSDReq+ ControlResetAck- 1 2 SOFEventOK+ | IntSDReq- 2 3 SOFEventOK- | IntSDReq+3 4 EOFEventOK+ | HIFCommitReq+ IntSDReq- 4 5 EOFEventOK- HIFCommitAck+ | HIFCommitReq+ SCEoTSReq+5 6 HIFCommitAck- SCEoTSAck+ | SCEoTSReq- 6 7 SCEoTSAck- | RFFrameAck+7 8 RFFrameReq- | RFFrameAck- 8 1 RFFrameReq+ | IntSDReq+ 3 9 CtrEoTSAck+ | IntSDReq- 9 10 CtrEoTSAck- | SCEoTSReq+ 10 11 SCEoTSAck+ | SCEoTSReq- 11 3 SCEoTSAck- | IntSDReq+ name RF_controlInput RFFrameReq 0 Input SOFEventOK 0Input EOFEventOK 0Input CtrEoTSAck 0 Input SCEotSAck 0Input HIFCommitAck 0 Output ControlResetAck 0 Output RFFrameAck 0Output IntSDReq 0Output SCEoTSReq 0Output HIFCommitReq 0 [… continued on right column ==> ]
Example #4: RF-Control Running MINIMALIST:Using the MINIMALIST “Shell” Step #2. Synthesize BM Implementation: > MinShell > read-spec rf-control.bms > help … …. > min-states #basic state minimization >help assign-states > assign-states#basic (crit race-free) state assignment > helpmin-logic> min-logic #basic logic minimization
Example #4: RF-Control Running MINIMALIST:Using the MINIMALIST “Shell” Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
Example #4: RF-Control Running MINIMALIST:Using the MINIMALIST “Shell” Step #2. A Different Run!: > read-spec rf-control.bms > help … …. > min-states #state minimization >help assign-states > assign-states -O -P -S -s #optimal state assignment (-O) #target output logic only (-S) #single-output logic (-s) #target critical I/O paths (-P) > helpmin-logic> min-logic -P -s #better logic minimization: #single-output logic (-s) #target critical I/O paths (-P)
Example #4: RF-Control Running MINIMALIST:Using the MINIMALIST “Shell” Step #2. Yet Another Run!: > read-spec rf-control.bms > help ... > min-states -F#state minimization,w/fedback#outputs as state vars (-F) >help assign-states > assign-states-F-L -O #optimal state assignment (-O)#w/fedback outputs (-F) #shared products (no -d or -s) # (i.e. “multi-output minimztn”) #target total literal count (-L) > helpmin-logic> min-logic -F-L #w/fedback outputs (-F) #shared products (no -d or -s) #(i.e. “multi-output minimztn”) #target total literal count (-L)
Example #4: RF-Control Running MINIMALIST:Using the MINIMALIST “Shell” Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
Example #5: Handling Large Examples (“P1 Controller”) From HP Labs/Stanford “Stetson”ProjectA.Marshall, B.Coates, P.Siegel,“Designing an Asynchronous Communications Chip”, IEEE Design&Test of Computers, vol. 11:2, pp. 8-21 (1994) Step #0. Getting Started ...(a) go back into “examples” directory: > cd ..(b) create a new subdirectory: > mkdir tutorial5(c) go to it: > cd tutorial5 (d) copy the BM spec: > cp /softs/minimalist/examples/stetson/p1.bms .
Example #5: Handling Large Examples (“P1 Controller”) Step #1. Show BM Specification(a) Look at “BMS” text file: >more p1.bms Summary: a large async controller 13 inputs 14 outputs 33 (burst-mode) states Step #1. Show BM Specification (cont.)(b) Graphic Display: >plot_qt p1.bms
Example #5: Handling Large Examples (“P1 Controller”) Our Synthesis Strategy: for faster runtime, avoid using “optimal” state assignment (… instead, just use simple “non-optimal” critical race-free assignment) Initial Synthesis Run: Using SCRIPTS Step #2. Synthesize BM Implementation: >minimalist-crf p1.bms Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions]
Example #5: Handling Large Examples (“P1 Controller”) An Alternative Run: Using the MINIMALIST “Shell” Step #2. Synthesize BM Implementation: > read-spec p1.bms > help … …. > min-states -F#state minimization: with fedback outputs >help assign-states > assign-states -F -C #non-optimal state assignment (-C);#assumes fedback outputs (-F) > helpmin-logic> min-logic -F -L -s #logic minimization: for literal optzn (-L); #single-output logic (-s) [for better runtime]; #assumes fedback outputs (-F)
Example #5: Handling Large Examples (“P1 Controller”) An Alternative Run: Using the MINIMALIST “Shell” Step #3. Display It: (a) 2-Level Equations + Results Summary: >[see displayed output] (b) Plot AND/OR Circuit: > [follow instructions](c) Plot NAND/NAND Circuit: >[follow instructions] … Compare the 2 different implementations: see Step #3(a) for statistics