460 likes | 624 Views
Compiling Communicating Processes into Delay-Insensitive VLSI Circuits. Alain J. Martin Department of Computer Science California Institute of Technology. Production Rule. Production rules: if C then A if condition C is true then Perform action A Example: if A and B then C
E N D
Compiling Communicating Processes into Delay-Insensitive VLSI Circuits Alain J. Martin Department of Computer Science California Institute of Technology
Production Rule Production rules: if C then A if condition C is true then Perform action A Example: if A and B then C Production rule:
Production Rule • CMOS transistors can be modeled by a set of PRs. • Example: inverter: Pull-up network a b Pull-down network
Production Rule • General Model • Pull-up network: a PR that makes z=true • Pull-down network: a PR that makes z=false Pull-up network Z Pull-down network
Production Rule • One-input operators: • Wire • Fork • inverter a b b c a a b
Production Rule Two-input operators: • And • OR a b c a b c
Production Rule • Nand • Nor a b c a b c
Production Rule • XOR • EQ • C-element a b c
Production Rule • Switch • SR-latch a c SW b q q’ r s SR
Production Rule • Multi-input operators: • Multiplexer a c mux b s
Arbiter:ME • No request: x=0 y=0 ==> u=0 v=0 0 1 0 0 1 0
Arbiter:ME • Request on x: x=1 y=0 ==> u=1 v=0 • Similar to request on y. 1 0 1 0 1 0
Arbiter:ME • Request on both x and y: x=1 y=1 ==> either u=1 or v=1 • xu and yv will be both zero at some time • Depend on the race one of them will be 1. • For example xu=0 propagates fast than yv • then yv will be locked at 1 • and u=1 and v=0. 1 xu --> --> yv 1
CHP: Compilation Method • CHP specification • Process decomposition • Handshaking expansion • Reshuffling • Production rule expansion • Circuit Implementation
CHP: CHP specification *[ FETCH : i, pc := imem[pc], pc+1 [ off(i) -->offset, pc := imem[pc], pc+1; [] not off(i) -->skip ]; EXEC : [ alu(i) -->(reg[i.z], f) := aluf(reg[i.x], reg[i.y], i.op, f) [] ld(i) -->reg[i.z] := dmem[reg[i.x]+reg[i.y]] [] st(i) -->dmem[reg[i.x] + reg[i.y]] := reg[i.z] [] ldx(i) -->reg[i.z] := dmem[offset + reg[i.y]] [] stx(i) -->dmem[offset + reg[i.y]] := reg[i.z] [] lda(i) -->reg[i.z] := offset + reg[i.y] [] stpc(i) -->reg[i.z] := pc [] jmp(i) -->pc := reg[i.y] [] brch(i) -->[ cond(f, i.cc) -->pc := pc + offset [] not cond(f, i.cc) -->skip ] ] ]
CHP: CHP specification • CPU: *[[Fetch; Exec]] • i:instruction being executed. • All instructions contain an op field. • The parameter fields depend on the types of instructions • instruction for alu = record • op : alu.15..alu.12 • x : alu.11..alu.8 • y : alu.7..alu.4 • z : alu.3..alu.0 • end • Example. Add, and, …, load and store.
CHP: CHP specification • f: flags generated by the execution of an alu • instruction • cc: condition code field of branch instructions. • Memory: 1. imem: instruction memory • 2. dmem: data memory • offset: two-word instructions • reg[0] always contains the value zero. • (z,f) := aluf(x,y,op,f) • evaluate an alu instrution with the opcode op, • parameters x,y • current flag f.
CHP: Process decomposition X Y P P1 P2 Chan(X,Y) • P=BS;S;AS P1=BS;X;AS P2=*[[Y-->S;Y]] • or (Y/S) call operator • S can be a selection, repetition or assignment command.
CHP: Process decomposition X Y P P1 P2 Chan(X,Y) • P=BS;S;AS P1=BS;X;AS P2=*[[Y-->S;Y]] • or (Y/S) call operator • S is a selection
CHP: Process decomposition X Y P P1 P2 Chan(X,Y) • P=A;S;B P1=A;X;B P2=*[[Y-->S;Y]] • or (Y/S) call operator • S is a repetition
CHP: Process decomposition X Y P P1 P2 Chan(X,Y) • P=BS;S;AS P1=BS;X;AS P2=*[[Y-->S;Y]] • or (Y/S) call operator • S is an assignment (B is an arbitrary boolean function)
CHP: Process decomposition • Process decomposition can reduce a process • with an arbitrary control structure to a set of • subprocesses of only two different types: • Sequences of communication actions • Repetition of the types shown in • the previous 3 slides.
CHP: Process decomposition • Example : Simple Logic Unit X Y SLU Z OP
CHP: Process decomposition • Decomposed SLU
CHP: Handshaking Expansion • Handshaking Expansion: x0 yi X Y P1 P2 P1 P2 xi yo • P1:Active P2: passive
CHP: Handshaking Expansion • Handshaking Expansion: 2-phase x0 yi X Y P1 P2 P1 P2 xi yo
CHP: Handshaking Expansion • Handshaking Expansion: 4-phase x0 yi X Y P1 P2 P1 P2 xi yo • P1:Active P2: passive
CHP: Handshaking Expansion • Handshaking Expansion: • SLU ao OP?op ai
CHP: Handshaking Expansion • Handshaking Expansion: • SLU bo (C||D);... bi
CHP: Reshuffling • are only used to reset to zero • they can be inserted anywhere • as long as cyclic order is maintained. • WARNING: Reshuffling can introduce deadlock. does not introduce deadlock when: 1. S contains no communication action, or 2. X is an internal channel created by process decomposition
CHP: Lazy-active protocol • Active protocol X: • Passive protocol Y: • Lazy active protocol X:
CHP: Reshulffling • Active protocol: • Reshuffing • Lazy active
Simple Logic Unit:Block diagram OPreg OP A?(and,or) Control F G C D E x y Xreg And/Or Unit X Y z Zreg Z Yreg
Simple Logic Unit:Block diagram Ao and or Co Ci Do Di Control Eo Ei Fo Fi Go Gi
Simple Logic Unit: • Extracting the control signals: data transfer
Simple Logic Unit: • Extracting the control signals: data operations
CHP: Production rule expansion • Production rule expansion: • A. a handshaking expansion ==> a set of PRs • B. consist of 3 Steps: • state assignment, • guard strengthening • symmetrization
CHP: Production rule expansion • state assignment: keep the execution sequence ro ri li lo L/R state assignment
CHP: Production rule expansion • Symmetrization: Combinational vs state holding ro ri li lo L/R