Automatic Data Path Extraction in Large-Scale Register-Transfer - - PowerPoint PPT Presentation

automatic data path extraction in large scale register
SMART_READER_LITE
LIVE PREVIEW

Automatic Data Path Extraction in Large-Scale Register-Transfer - - PowerPoint PPT Presentation

Automatic Data Path Extraction in Large-Scale Register-Transfer Level Designs Wei Song, Jim Garside and Doug Edwards School of Computer Science, the University of Manchester Manchester M13 9PL United Kingdom 02/06/2014 Advanced Processor


slide-1
SLIDE 1

02/06/2014

Automatic Data Path Extraction in Large-Scale Register-Transfer Level Designs

Wei Song, Jim Garside and Doug Edwards

School of Computer Science, the University of Manchester Manchester M13 9PL United Kingdom

Advanced Processor Technologies Group The School of Computer Science

slide-2
SLIDE 2

Motivation

  • Data path extraction is important

– Hardware verification – Synthesis for asynchronous circuits – System partition

  • Methodology

– State-space analysis

  • actuate but slow and not scalable

– Pattern matching

  • Fast, scalable but inaccurate
  • Accuracy depends on accurate type recognition

02/06/2014

Advanced Processor Technologies Group School of Computer Science

2

slide-3
SLIDE 3

Tool Flow

02/06/2014

Advanced Processor Technologies Group School of Computer Science

3

A new graphic abstraction to reveal relations between Verilog signals. Remove control relations.

Verilog RTL Verilog RTL Verilog RTL Parser Abstract Syntax Tree Signal-level DFG Remove Control Arcs Graphic Trimming Data Path Only Signal-level DFG Data Path Extraction

Remove control related signals. Still directly mapped with the AST. Possible for code extraction. Bison+Flex, support synthesizable Verilog 2001.

slide-4
SLIDE 4

Signal-Level Data Flow Graph (DFG)

02/06/2014

Advanced Processor Technologies Group School of Computer Science

4

module GCD (Clock,Reset,Load,A,B,Done,Y); input Clock,Reset,Load; input [7:0] A,B;

  • utput Done;
  • utput [7:0] Y;

reg A_lessthan_B, Done; reg [7:0] A_New, A_Hold, B_Hold, Y; always @(posedge Clock) if(Reset) begin A_Hold = 0; B_Hold = 0; end else if(Load) begin A_Hold = A; B_Hold = B; end else if(A_lessthan_B) begin A_Hold = B_Hold; B_Hold = A_New; end else A_Hold = A_New; always @(A_Hold or B_Hold) if(A_Hold >= B_Hold) begin A_lessthan_B = 0; A_New = A_Hold - B_Hold; end else begin A_lessthan_B = 1; A_New = A_Hold; end always @(A_Hold or B_Hold) if(B_Hold == 0) begin Done = 1; Y = A_Hold; end else begin Done = 0; Y = 0; end endmodule

A Greatest Common Divider (GCD) Calculator

I I I I I FF FF O O

Load_P Load A_P A B_P B Clock_P Clock Reset_P Reset A_Hold B_Hold A_lessthan_B A_New Y Done Done_P Y_P I FF O i_port

  • _port

wire register clock control data MODULE module

slide-5
SLIDE 5

Definition of a Signal-Level DFG

02/06/2014

Advanced Processor Technologies Group School of Computer Science

5

I I I I I FF FF O O

Load_P Load A_P A B_P B Clock_P Clock Reset_P Reset A_Hold B_Hold A_lessthan_B A_New Y Done Done_P Y_P I FF O i_port

  • _port

wire register clock control data MODULE module

 A signal-level DFG is a directed multi-graph denoted by a six-tuple: ( , , , , , ) a finite set of nodes representing Verilog components (signal and m

V V A A

DFG V AT F T F V   

  • dule)

a finite set of arcs connecting nodes a set of node types { , , , , } : map types to nodes a set of arc types { ,

V V V A

A V V T reg wire in out module F V T T control d  , , } : map types to arcs

A A

ata clock reset F A T

slide-6
SLIDE 6

Node insertion

02/06/2014

Advanced Processor Technologies Group School of Computer Science

6

input Clock,Reset,Load; input [7:0] A,B;

  • utput Done;
  • utput [7:0] Y;

reg A_lessthan_B, Done; reg [7:0] A_New, A_Hold, B_Hold, Y; always @(posedge Clock) if(Reset) begin A_Hold = 0; B_Hold = 0; end else if(Load) begin A_Hold = A; B_Hold = B; end else if(A_lessthan_B) begin A_Hold = B_Hold; B_Hold = A_New; end else A_Hold = A_New; always @(A_Hold or B_Hold) if(B_Hold == 0) begin Done = 1; Y = A_Hold; end else begin Done = 0; Y = 0; end

I I I I I FF FF O O

Load_P Load A_P A B_P B Clock_P Clock Reset_P Reset A_Hold B_Hold A_lessthan_B A_New Y Done Done_P Y_P

Latch will be detected by case analysis.

slide-7
SLIDE 7

Type Estimation of Arcs

02/06/2014

Advanced Processor Technologies Group School of Computer Science

7

always @(posedge Clock) if(Reset) begin A_Hold = 0; B_Hold = 0; end else if(Load) begin A_Hold = A; B_Hold = B; end else if(A_lessthan_B) begin A_Hold = B_Hold; B_Hold = A_New; end else A_Hold = A_New;

A_Hold Reset Load A_lessthan_B Clock A B_Hold A_New

If(Reset) A_Hold = 0 If(A_lessthan_B) A_Hold = A_New (posedge Clock)

Relation Tree

FF

Load A Clock Reset A_Hold A_lessthan_B A_New

Arc connection in DFG

control recognition: if(sig) case(sig) C = sig?A:B D = mem[addr]

slide-8
SLIDE 8

Remove Control Arcs

02/06/2014

Advanced Processor Technologies Group School of Computer Science

8

I I I I I FF FF O O

Load_P Load A_P A B_P B Clock_P Clock Reset_P Reset A_Hold B_Hold A_lessthan_B A_New Y Done Done_P Y_P

I I I I I FF FF O O

Load_P Load A_P A B_P B Clock_P Clock Reset_P Reset A_Hold B_Hold A_lessthan_B A_New Y Done Done_P Y_P

slide-9
SLIDE 9

Recursively Remove Dangling Components

02/06/2014

Advanced Processor Technologies Group School of Computer Science

9

I I I I I FF FF O O

Load_P Load A_P A B_P B Clock_P Clock Reset_P Reset A_Hold B_Hold A_lessthan_B A_New Y Done Done_P Y_P

I I FF FF O

A_P A B_P B A_Hold B_Hold A_New Y Y_P

dangling wire FF dangling FF O dangling

  • utput

I dangling input

module

dangling module

Nodes to be recursively removed

slide-10
SLIDE 10

Hierarchical Designs (SHA-3 Encoder)

02/06/2014

Advanced Processor Technologies Group School of Computer Science

10

I FF O

in_P in i

  • ut_P

MODULE

rconst rc

MODULE

round round_in round_out

FF

  • ut

FF

  • ne

round round const counter

in

  • ut

extracted data path data path in the manual automatic generated DFG

slide-11
SLIDE 11

Large-Scale Test Cases

02/06/2014

Advanced Processor Technologies Group School of Computer Science

11 Designs gns Signal al-le leve vel l DFG Data path DFG Time e (s) (s) I/O Module Signal I/O Module Signal OR1200 52 37 2074 40 33 1142 1 RSD 7 24 1063 3 23 659 <1 NOVA 19 140 7043 9 103 4279 10 OR1200: A 5-stage OpenRISC processor. RSD: An industrial standard Reed-Solomon decoder. NOVA: An FPGA proven H.264/AVC baseline decoder. Intel CoreTM2 Due 3.00 GHz with 2GB memory

slide-12
SLIDE 12

Possible Usages

  • Signal-level DFG

– Code extraction – Controller detection* – Interface recognition (Memory, bus, handshake)

  • Data path extraction

– Data-flow analysis by switching back-annotation – System partition

* Wei Song and Jim Garside. Automatic controller detection for large scale RTL designs. In

  • Proc. of EUROMICRO Conference on Digital System Design (DSD), Santander, Spain, pp.

884–851, September 2013

02/06/2014

Advanced Processor Technologies Group School of Computer Science

12

slide-13
SLIDE 13

Conclusion

  • Signal-level DFG

– A graphic representation of signal relations in RTL. – A typed and hierarchical multi-graph.

  • Data path extraction

– Trim all control related arcs and nodes. – Automatic control/data recognition. – Able to process large-scale designs.

02/06/2014

Advanced Processor Technologies Group School of Computer Science

13

slide-14
SLIDE 14

Implementation and Test Environment

  • Verilog parser

– Bison, Flex and Vpreprocessor (Verilog Perl tool)[1] – C++ STL based abstract syntax tree

  • Signal-level DFG

– Boost Graphic Library (data structure) – Open Graph Drawing Framework (automatic layout)[2] – PugiXML (file format) – Qt (diagram drawer)

  • User interface

– Asynchronous Verilog Synthesiser[3] – Command line UI: embedded Tcl with self-defined commands

[1] http://www.veripool.org/verilog-perl [2] http://www.ogdf.net [3] https://github.com/wsong83/Asynchronous-Verilog-Synthesiser

02/06/2014

Advanced Processor Technologies Group School of Computer Science

14