C. Llanos2,4 ,M. Ayala-Rinc - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

C. Llanos2,4 ,M. Ayala-Rinc

Description:

Applying rewriting techniques in hardware design [Arvind et al] ... high level abstraction of functional languages is suitable for hardware design ... – PowerPoint PPT presentation

Number of Views:20
Avg rating:3.0/5.0
Slides: 29
Provided by: Carl341
Category:
Tags: ayala | llanos2 | rinc

less

Transcript and Presenter's Notes

Title: C. Llanos2,4 ,M. Ayala-Rinc


1
C. Llanos2,4 ,M. Ayala-Rincón1,4, R. B.
Nogueira2,4, R. P. Jacobi3,4 and
R. W. Hartenstein5,61 Departamentos de
Matemática, 2 Engenharia Mecânica e 3 Ciência da
Computação 4 Universidade de Brasília 5
Fachbereich Informatik, 6 Kaiserslautern
University of Technology2nd Dagsthul
Seminar on Dynamically Reconfigurable
ArchitecturesDagsthul, Germany, July 20-25, 2003
Modeling Dynamically Reconfigurable Systems via
Rewriting-Logic (modeling and simulation of the
FFT in Optimal Space)
2
Overview(Arvind aproach)
  • Applying rewriting techniques in hardware design
    Arvind et al
  • specification of correct processors
  • Cache protocols over memory systems
  • Specification of digital circuits
  • Specification and verification of network
    protocols

3
Characteristic of Arvinds approach
  • rewriting is neither applied for simulation nor
    for verification
  • Proposal ? Translate to Verilog!

4
Overview (using Haskell)
  • Bejesse et al use Haskell (a functional language)
    for circuit design, specification and
    verification
  • These ideas are implemented in LAVA system
  • This approach shows how the high level
    abstraction of functional languages is suitable
    for hardware design

Lava approach takes advantage of high level
abstraction provided by functional languages
5
Overview (Kapur Approach)
  • Kapur has used his well-known Rewriting Rule
    Laboratory - RRL for verifying arithmetic
    circuits
  • RRL is used to verify automatically properties of
    arithmetic hardware circuits (adders,
    multipliers, SRT division circuits)

6
Why Rewriting?
  • Rewriting is the formal framework of all
    functional languages
  • This fact allows us to work in more abstract
    levels
  • Rewriting assistant environments help in the task
    of formal verification of hardware

7
Rewriting Rules
right side
left side
Premise to be hold
l ? r if C
Rewriting Rule
8
Rewriting
  • Rewriting rules
  • l ? r if C
  • Operational semantics
  • a rule is applied to a term, when its
    left-side matches a sub-term, replacing the
    matched sub-term with the corresponding
    right-side of the rule. All that, whenever the
    premise C of the rule holds.

Semantic l is replaced by r if C is true
9
Specifying Processors(Arvinds proposal)
SYS(mem,Proc)
Data Mem
1
Register File
Int Mem
PC
ALU
PROC(ia,rf,prog)
10
Specifying Processors
  • Basic Processor
  • Single cycle, non pipelined, in-order execution
  • SYS Sys(MEM,PROC)
  • PROC Proc(ia, rf, prog)
  • AX Architecture
  • Instruction set
  • rLoadc(v) rLoadpc
  • rOp(r1,r2) Jz(r1,r2)
  • rLoad(r1) Store(r1,r2)

11
Defining Instruction of the processor by
rewriting rules
Conditional jump
Jz-jump-rule Jz(r1, r2) Proc(ia, rf, prog) ?
Proc(rfr2, rf, prog)
if imia jz(r1, r2) and rfr1 0
Rewriting rules can implement state transitions
in the processor
12
Example Euclids Algorithm for greatest common
divisor (GCD)
GCD Mod Rule Gcd(a, b) ? Gcd(a-b, b) if (a ?
b) ? (b ? 0) GCD Flip Rule Gcd(a, b) ? Gcd (b,
a) if a lt b
  • The term Gcd(6,15) can be reduced by applying
    the Mod and Flip rules

Flip Gcd(15,6) ?
Mod Gcd (9, 6) ?
Mod Gcd(3, 6) ?
Flip Gcd (6, 3) ?
Mod Gcd(3,3) ?
Mod Gcd(3,0)
13
Characteristic of Rewriting
  • Rules are applied non-deterministically
  • Controlling the execution of rules can be
    accomplished by logic

Rewriting-Logic Rewriting Rules Strategies
14
Examples of Rewriting Oriented Environments
  • ELAN
  • Maude

it has great flexibility for defining types and
ease manipulation of strategies
  • Its necessary to do more effort for description
  • it provides model checking useful for hardware
    verification

15
Example of a Reconfigurable Architecture
functional Units
Constant Register
Address register
Address register
16
Example of Reconfigurable Architecture
R2
At some time the configuration can be specified

Op2
R1
C1
011 100
Ar1
Ar2
AND
1
100
Op1
P1
P2
17
Describing Architectures in ELAN
Problem how can this architecture be described
in ELAN
Using and defining types Its possible to
describe fixed parts and reconfigurable ones
const(_at_) ( complexUnit ) Const
port(_at_) ( complexUnit ) Port
reg(_at_) ( complexUnit ) Reg
addr(_at_) ( int ) Addr _at_,_at_,_at_,_at_,_at_
( int Port Port Reg Reg ) fixMAC
_at_,_at_,_at_,_at_,_at_ ( Addr Addr Const OpUnit
OpUnit ) recMAC _at_ _at_ (
fixMAC recMAC ) MAC
18
Describing more Complex Architectures
Processor
_at_,_at_,_at_,_at_,_at_ ( int Port Port
Reg Reg ) fixMAC _at_,_at_,_at_,_at_,_at_
( Addr Addr Const OpUnit OpUnit ) recMAC
_at_ _at_ ( fixMAC recMAC )
MAC lt _at_ _at_ _at_ _at_ _at_ _at_ _at_ _at_ _at_ _at_ gt ( int
rArrayStruct MAC MAC MAC MAC MAC MAC MAC MAC
)Proc
19
How the Execution Process is described in the
ELAN system
lt 0,port(cPort1),port(cPort2),reg(cReg1),reg(cRe
g2) addr1,addr2,const(cConst1),op1,op2 gt lt
0,port(cPort1),port(cPort2),reg(cRegRes1),reg(cR
egRes2) addr1,addr2,const(cConst1),op1,op2 gt

where cRegRes1 () operate(cPort1,cPort2,op1)
where cRegRes2 () operate(cReg1,cConst1,op2)
20
How the Reconfiguration Process is described in
ELAN system
reconfigure(MACsArray( fix0 rec0 )


MACsArray( fix0 getRecMAC(MAConfig0) )
21
Using Strategies in ELAN
strategies for Proc implicit process
input repeat(reconfigurationpropaga
tionexecution) output end end
  • Using strategies for guiding the application of
    the rules
  • Strategies in ELAN allow to separate execution
    and reconfiguration steps
  • This approach allows a closer specification to
    transference register description (RTL
    Description)

22
Reconfiguration for FFT
Number of reconfiguration ln(n) 1
23
FFT in Optimal Space
MAC0
MAC1
MAC2
MAC3
MAC4
MAC5
MAC6
MAC7
Interconnections in reconfiguration step 3
24
An Execution Rule for a pair of MACs
MAC01 lt 0,port(cPort1),port(cPort2),reg(cReg1
),reg(cReg2) addr1,addr2,const(cConst1),op1,op2
1,port(cPort3),port(cPort4),reg(cReg3),reg(cR
eg4) addr3,addr4,const(cConst2),op3,op4 gt
lt 0,port(cPort1),port(cPort2),reg(cRegRes1),reg(
cRegRes2) addr1,addr2,const(cConst1),op1,op2
1,port(cPort3),port(cPort4),reg(cRegRes3),reg(cR
egRes4) addr3,addr4,const(cConst2),op3,op4 gt

where cRegRes1 () operate( cPort1,cPort2,op1 )
where cRegRes2 () operate( cRegRes1,cConst1,op
2 ) where cRegRes3 () operate(
cPort3,cPort4,op3 ) where cRegRes4 ()
operate( cRegRes3,cConst2,op4 )
25
A Reconfiguration Rule for a pair of MACs
reconfiguration lt fix0 rec0
fix1 rec1 gt
lt fix0 addr(0),addr(2),const( lt 1,0000
0,0000 gt ), lt gt,lt gt fix1
addr(1),addr(3),const( lt 1,0000 0,0000 gt
), lt gt,lt gt gt
26
A Pipelined Reconfigurable FFT (eliminating the
reconfiguration overhead)
  • While one Mac array is being reconfigured the
    other array is computing one step of FFT

27
Advantages of ELAN Environment
  • ELAN has the advantage of an embedded inference
    engine
  • a flexible type definition mechanism (data and
    operators)
  • a powerful manipulation of typed expressions
    through rules and meta-rules
  • the availability of logical strategies to
    control their application.

28
Conclusions
  • The high abstraction of Rewriting Environments
    makes design exploration easier
  • Using ELAN is possible to simulate the
    description of the architecture
  • Descriptions in ELAN are close to the physical
    architecture
Write a Comment
User Comments (0)
About PowerShow.com