1.42k likes | 1.43k Views
Balsa – Description to Layout. A Hands-on Tutorial Session Doug Edwards & Andrew Bardsley. Other Balsa Tutorials. Async 2000 (Eilat) concentrated on language aspects small design examples Xilinx implementation of calculator ACiD summer school, July 2002
E N D
Balsa – Description to Layout A Hands-on Tutorial Session Doug Edwards & Andrew Bardsley
Other Balsa Tutorials • Async 2000 (Eilat) • concentrated on language aspects • small design examples • Xilinx implementation of calculator • ACiD summer school, July 2002 • probably in-depth use of language for design examples • buy the book - ISBN 0-792-37613-7
Aims of Async 2002 Tutorial • To explore parts of the system not demonstrated previously • GUI front-end • balsa-mgr • back-end alternatives • “how do I produce silicon”? • “what are the trade-offs”? • To gain some exposure to the language • but, language learning by osmosis!
Session Schedule • Brief overview of the Balsa system • Language introduction • hands-on examples • To synthesise the original Manchester Small-Scale Experimental Machine • experiment with different back-ends A replica of the original SSEM is on display at the conference dinner
Session Schedule • Coffee Break • Advanced Design • Spamulet0 – write your own ARM-like processor description
Andrew Bardsley Chief Architect/Implementer The Balsa Team Doug Edwards Team Leader Luis Plana Dual Rail Back-end Lilian Janin balsa-mgr/LARD Will Toms 1-of-4 Back-end
Balsa Requirements • Freely available • ftp://ftp.cs.man.ac.uk/pub/amulet/balsa/ • not all back-ends available • OS requirements: • Linux • Sun Solaris 7-8 • MacOS X (+ X11R6 …)
Compass DA Route
xilinx route
top level relies on powerview
Cadence route
Other Balsa Work • Burst-mode resynthesis • Tibi Chelcea & Steve Nowick • Faster LARD simulation • Lilian Janin (x50 speed up) • Datapath compilation optimisation • Andrew Bardsley • Complete Amulet implementation • Peter Riocreux et al.
Proven Balsa Synthesis- DMA Controller for DRACO Balsa Synthesised DMA Controller
What is Balsa? • Language for synthesising large async circuits & systems • CSP/OCCAM background • Tangram-like • based on Tangram compilation function • compiles to a small, parameterisable, set of handshake components • origins: ESPRIT 6143 EXACT project
Handshake circuits – 1 • Components communicate along handshake channels • Channels connect to ports on components • Ports have: • Type • Direction • Sense
Handshake Circuits – 2 • Port type determines the number of data wires • no data wires == control only port! • Port direction is input, output or control only (called sync) • Port sense • Active: initiate transfers (source the req) • Passive: respond to requests (… the ack)
Balsa Language Features • Data types based on sequence of bits • Arrays and records are bit-based • Element extraction is by array slicing • Strict data typing • Structural iteration • Arrayed channels • Parameterised, recursively expanded procedures
Balsa Language Features • Enclosed selection semantics • Allows passive ported circuits • Allows push (micropipeline-style) circuits • Allows unbuffered (latch-free) circuits
Example: Single Place Buffer import [balsa.types.basic] type word is 16 bits procedure buffer (input i : word; output o : word) is variable x : word begin loop i -> x ; -- Input communication o <- x -- Output communication end end
Example: Single Place Buffer import [balsa.types.basic] type word is 16 bits procedure buffer (input i : word; output o : word) is variable x : word begin loop i -> x ; -- Input communication o <- x -- Output communication end end library mechanism type declaration channel declarations procedure definition implies latch repeat forever read input channel into local variable x sequential operation output local variable x to output channel
Buffer Handshake Circuit Single-place buffer repeater activation channel # sequencer ; transferrer i o x T T variable
Buffer Handshake Circuit Single-place buffer Repeater is activated # ; i o x T T
Buffer Handshake Circuit Single-place buffer Sequencer handshakes to left transferrer # ; i o x T T
Buffer Handshake Circuit Single-place buffer Transferrer requests data from environment # ; i o x T T
Buffer Handshake Circuit Single-place buffer Data transferred to variable x # ; i o x T T
Buffer Handshake Circuit Single-place buffer Variablehandshake completes # ; i o x T T
Buffer Handshake Circuit Single-place buffer Transferrerhandshake completes to environment # ; i o x T T
Buffer Handshake Circuit Single-place buffer Transferrerhandshake completes # ; i o x T T
Buffer Handshake Circuit Single-place buffer Sequencer handshakes to right transferrer # ; i o x T T
Buffer Handshake Circuit Single-place buffer Transferrer reads variable # ; i o x T T
Buffer Handshake Circuit Single-place buffer Transferrer outputs to environment # ; i o x T T
Buffer Handshake Circuit Single-place buffer Sequencer initiated handshakes complete # ; i o x T T
Buffer Handshake Circuit Single-place buffer Sequencer completes its activation handshake # ; i o x T T
Buffer Handshake Circuit Single-place buffer Repeater initiates another transfer, repeat # ; i o x T T
a b a a b a r r Example Handshake Component • Handshake definition of repeater (Loop) Loop(a,b) = (a: #[b]) = (a: #[b;b]) = (ar: #[br ; ba ; br ; ba])
Example Handshake Component • Case component (single-rail) 1 hot encoding data “n” bits wide true/complement lines: dual-rail expansion
Compilation Tools • balsa-c • compiles Balsa programs to Breeze • includes other Breeze definition files • Breeze is a handshake -circuit netlist format • acts as a library format for within Balsa • balsa-netlist • produces an appropriate netlist from a compiled Balsa program • technology specific options
Simulation Tools • breeze2lard • produces a LARD simulation file • various LARD utilities • mainly hidden within the Makefile by balsa-md
Utilitity Tools • breeze2ps • creates a PostScript HC graph • breeze-cost • enumerates the handshake circuits used and gives an approximate area cost • balsa-md • automatic Makefile maker • balsa-mgr • GUI interface to balsa-md
Exercise: Single Stage Shift Register Objective: introduction to balsa-mgr • cd ~/Balsa/shift-reg • balsa-mgr & • create new project: Project -> New • add SRA1.balsa to project
Creating a Project create new project
Set Project Name set name
Adding Files Add Files