Multiple Clock Domains (MCD) Arvind with Nirav Dave Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.

Slides:



Advertisements
Similar presentations
Combinational Logic.
Advertisements

Elastic Pipelines and Basics of Multi-rule Systems Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February.
An EHR based methodology for Concurrency management Arvind (with Asif Khan) Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.
March, 2007http://csg.csail.mit.edu/arvind802.11a-1 Architectural Exploration: Area-Performance tradeoff in a Transmitter Arvind Computer Science.
March 2007http://csg.csail.mit.edu/arvindSemantics-1 Scheduling Primitives for Bluespec Arvind Computer Science & Artificial Intelligence Lab Massachusetts.
Folding and Pipelining complex combinational circuits Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February.
Analog-to-Digital Converter (ADC) And
Combinational Circuits in Bluespec
June 5, Architectural Exploration: a Transmitter Arvind, Nirav Dave, Steve Gerding, Mike Pellauer Computer Science & Artificial Intelligence.
Stmt FSM Richard S. Uhler Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology (based on a lecture prepared by Arvind)
Asynchronous Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology October 13, 2009http://csg.csail.mit.edu/koreaL12-1.
Modeling Processors Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February 22, 2011L07-1
December 10, 2009 L29-1 The Semantics of Bluespec Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute.
Computer Architecture: A Constructive Approach Sequential Circuits Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology.
Pipelining combinational circuits Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology February 20, 2013http://csg.csail.mit.edu/6.375L05-1.
March 4, 2009L13-1http://csg.csail.mit.edu/6.375 Multiple Clock Domains Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of.
September 3, 2009L02-1http://csg.csail.mit.edu/korea Introduction to Bluespec: A new methodology for designing Hardware Arvind Computer Science & Artificial.
Introduction to Bluespec: A new methodology for designing Hardware Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology.
Constructive Computer Architecture Combinational circuits-2 Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology.
Folded Combinational Circuits as an example of Sequential Circuits Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology.
Multiple Clock Domains (MCD) Arvind with Nirav Dave Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology March 15, 2010.
Multiple Clock Domains (MCD) Continued … Arvind with Nirav Dave Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology November.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
March, 2007Intro-1http://csg.csail.mit.edu/arvind Design methods to facilitate rapid growth of SoCs Arvind Computer Science & Artificial Intelligence Lab.
Constructive Computer Architecture: Guards Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology September 24, 2014.
Constructive Computer Architecture Tutorial 2 Advanced BSV Sizhuo Zhang TA Oct 9, 2015T02-1http://csg.csail.mit.edu/6.175.
September 22, 2009http://csg.csail.mit.edu/koreaL07-1 Asynchronous Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab.
Elastic Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February 28, 2011L08-1http://csg.csail.mit.edu/6.375.
PHY 201 (Blum)1 Shift registers and Floating Point Numbers Chapter 11 in Tokheim.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
September 8, 2009http://csg.csail.mit.edu/koreaL03-1 Combinational Circuits in Bluespec Arvind Computer Science & Artificial Intelligence Lab Massachusetts.
Folding complex combinational circuits to save area Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February.
Introduction to Bluespec: A new methodology for designing Hardware Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology.
Constructive Computer Architecture Sequential Circuits - 2 Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology.
February 20, 2009http://csg.csail.mit.edu/6.375L08-1 Asynchronous Pipelines: Concurrency Issues Arvind Computer Science & Artificial Intelligence Lab Massachusetts.
March 1, 2006http://csg.csail.mit.edu/6.375/L09-1 Bluespec-3: Architecture exploration using static elaboration Arvind Computer Science & Artificial Intelligence.
Introduction to Bluespec: A new methodology for designing Hardware Arvind Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology.
Combinational Circuits in Bluespec Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology February 9, 2011L03-1
Computer Architecture: A Constructive Approach Bluespec execution model and concurrent rule scheduling Teacher: Yoav Etsion Taken (with permission) from.
October 20, 2009L14-1http://csg.csail.mit.edu/korea Concurrency and Modularity Issues in Processor pipelines Arvind Computer Science & Artificial Intelligence.
Modeling Processors Arvind Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology March 1, 2010
Functions and Types in Bluespec
Folded Combinational Circuits as an example of Sequential Circuits
Folded “Combinational” circuits
Scheduling Constraints on Interface methods
Sequential Circuits - 2 Constructive Computer Architecture Arvind
Sequential Circuits Constructive Computer Architecture Arvind
Sequential Circuits: Constructive Computer Architecture
Combinational ALU Constructive Computer Architecture Arvind
Combinational Circuits in Bluespec
Stmt FSM Arvind (with the help of Nirav Dave)
Combinational Circuits in Bluespec
Pipelining combinational circuits
Multirule Systems and Concurrent Execution of Rules
Constructive Computer Architecture: Guards
Pipelining combinational circuits
Combinational Circuits and Simple Synchronous Pipelines
Combinational Circuits and Simple Synchronous Pipelines
Modules with Guarded Interfaces
Pipelining combinational circuits
Sequential Circuits - 2 Constructive Computer Architecture Arvind
Stmt FSM Arvind (with the help of Nirav Dave)
Combinational Circuits in Bluespec
Multiple Clock Domains
Constructive Computer Architecture: Guards
Simple Synchronous Pipelines
Introduction to Bluespec: A new methodology for designing Hardware
Modeling Processors Arvind
Architectural Exploration:
Simple Synchronous Pipelines
Presentation transcript:

Multiple Clock Domains (MCD) Arvind with Nirav Dave Computer Science & Artificial Intelligence Lab Massachusetts Institute of Technology

Plan Why Multiple Clock Domains a as an example How to represent multiple clocks in Bluespec MCD syntax Synchronizers Putting it all together November 10, 2009L20-2

Review: a Transmitter ControllerScramblerEncoderInterleaverMapper IFFT Cyclic Extend headers data 24 Uncoded bits Operates on 1-4 packets at a time Converts 1-4 packets into a single packet A lot of compute; n cycles/packet November 10, L20-3 n depends on the IFFT implementation; for the superfolded version n  51

Analyzing Rates ControllerScramblerEncoder InterleaverMapper IFFT Cyclic Extend headers data Relative rates: f/52 f f/13 Can we run these parts at different speeds (i.e. clock frequencies) and have them interact safely? November 10, L20-4

Power-Area tradeoff The power equation: P = ½ CV 2 f V and f are not independent; one can lower the f by lowering V – linear in some limited range Typically we run the whole circuit at one voltage but can run different parts at different frequencies We can often increase the area, i.e., exploit more parallelism, and lower the frequency (power) for the same performance November 10, 2009L20-5

IFFT for a The supefolded IFFT implementation uses the least area and the frequency is still low need to produce a symbol every 4seconds, i.e., at a frequency of 250KHz so the superfolded pipeline must run at 52x250KHz  13MHz November 10, 2009L20-6

Multiple Clock Domains may save power ControllerScramblerEncoder InterleaverMapper IFFT Cyclic Extend headers data Relative rates: f/52 f f/13 One would actually want to explore many relative frequency partitionings to determine the real area/power tradeoff November 10, L20-7

Plan Why Multiple Clock Domains a as an example How to represent multiple clocks in Bluespec MCD syntax Synchronizers Putting it all together November 10, 2009L20-8

Associating circuit parts with a particular clock Two choices to split the design: Partition State Rules must operate in multiple domains Partition Rules State Elements must have methods in different clock domains November 10, L20-9 It is very difficult to maintain rule atomicity with multi-clock rules. Therefore we would not examine “Partitioned State” approach further

Partitioning Rules Only touched by one domain Methods in red and green domains A method in each domain November 10, L20-10

Handling Module Hierarchy Methods added to expose needed functionality November 10, L20-11

We need a primitive MCD synchronizer: for example enq one on clock and deq/first/pop on another full/empty signals are conservative approximations may not be full when full signal is true We’ll discuss implementations later November 10, 2009L FIFO

Back to the Transmitters ControllerScramblerEncoder InterleaverMapper IFFT Cyclic Extend headers data November 10, L20-13

Domains in the Transmitter let controller <- mkController(); let scrambler <- mkScrambler_48(); let conv_encoder <- mkConvEncoder_24_48(); let interleaver <- mkInterleaver(); let mapper <- mkMapper_48_64(); let ifft <- mkIFFT_Pipe(); let cyc_extender <- mkCyclicExtender(); rule controller2scrambler(True); stitch(controller.getData,scrambler.fromControl); endrule … many such stitch rules … November 10, L20-14 function Action stitch(ActionValue#(a) x, function Action f(a v)); action let v <- x; f(v); endaction endfunction These colors are just to remind us about domains

Coloring the rules? rule controller2scrambler(True); stitch(controller.getData, scrambler.fromControl); endrule rule scrambler2convEnc(True); stitch(scrambler.getData, conv_encoder.putData); endrule rule mapper2ifft(True); stitch(mapper.toIFFT, ifft.fromMapper); endrule All methods in the same domain Using different domains… November 10, L20-15

Domain Crossing rule mapper2ifft(True); stitch(mapper.toIFFT, ifft.fromMapper); endrule inline stitch Different methods in an action are on different clocks – we need to change the clock domains rule mapper2ifft(True); let x <- mapper.toIFFT(); ifft.fromMapper(x) endrule November 10, L20-16

Introduce a domain crossing module let m2ifftFF <- mkSyncFIFO(size,clkGreen, clkRed); November 10, 2009L Many such synchronizers In real syntax, one clock value is passed implicitly

Fixing the Domain Crossing rule mapper2ifft(True); let x <- mapper.toIFFT(); ifft.fromMapper(x) endrule rule mapper2fifo(True); stitch(mapper.toIFFT, m2ifftFF.enq); endrule rule fifo2ifft(True); stitch(pop(m2ifftFF), ifft.fromMapper); endrule split November 10, L20-18 let m2ifftFF <- mkSyncFIFO(size,clkGreen,clkRed); synchronizer syntax is not quite correct

Similarly for IFFT to CyclicExt let ifft2ceFF <- mkSyncFIFO(size,clkRed,clkBlue); rule ifft2ff(True); stitch(ifft.toCyclicExtender, ifft2ceFF.enq); endrule rule ff2cyclicExtender(True); stitch(pop(ifft2ceFF), cyc_extender.fromIFFT); endrule November 10, L20-19 Now each rule is associated with exactly one clock domain!

Plan Why Multiple Clock Domains a as an example How to represent multiple clocks in Bluespec MCD syntax Synchronizers Putting it all together November 10, 2009L

MCD Syntax in BSV: point of view Automate the simplest things Make it easy to do simple things Make it safe to do the more complicated things November 10, L20-21

Clock Domains: The Simplest case Only one domain Need never be mentioned in BSV source Synthesized modules have an input port called CLK This is passed to all interior instantiated modules November 10, L20-22

The Clock type Clock is an ordinary first-class type May be passed as parameter, returned as result of function, etc. Can make arrays of them, etc. Can test whether two clocks are equal Clock c1, c2; Clock c = (b ? c1 : c2); // b must be known at compile time November 10, L20-23

Instantiating modules with non-default clocks Example: instantiating a register with explicit clock Modules can also take clocks as ordinary arguments, to be fed to interior module instantiations Clock c = … ; Reg# (Bool) b <- mkReg (True, clocked_by c); November 10, L20-24

The clockOf() function May be applied to any BSV expression, and returns a value of type Clock If the expression is a constant, the result is the special value noClock noClock values can be used on in any domain The result is always well-defined Expressions for which it would not be well- defined are illegal November 10, L20-25

The clockOf() function Example c, c1 and c2 are all equal Can be used interchangeably for all purposes Reg# (UInt# (17)) x <- mkReg (0, clocked_by c); let y = x + 2; Clock c1 = clockOf (x); Clock c2 = clockOf (y); November 10, L20-26

A special clock Each module has a special “default” clock The default clock will be passed to any interior module instantiations (unless otherwise specified) It can be exposed in any module as follows: Clock c <- exposeCurrentClock; November 10, L20-27

We actually want “gated” clocks Often, big circuits do not do useful work until some boolean condition holds We can save power by combining the boolean condition with the clock (i.e. clock gating) November 10, 2009L Big Circuit clk input g g f f gating signal to be continued