International Journal of Reconfigurable Computing / 2018 / Article / Lst 2

Research Article

Modelling and Assertion-Based Verification of Run-Time Reconfigurable Designs Using Functional Programming Abstractions

Listing 2

Description of top and its test bench with CaSH.
1 -- Structural description of top module.
2 -- Functionality of the reconfigurable region
3 -- is specified with function ’f’.
4 top (f, i3) = o3
5where
6 -- m1 and m2 are functions representing
7 -- the module instances
8 i1 = m1 ( i3, o1 )
9 (i2, o3 ) = m2 o2
10 -- recRegion is a function representing the
11 -- reconfigurable region
12(o1, o2 ) = recRegion (f, ( i1, i2 ))
13 -- A vector specifying all RMs
14 rclist = (rc1:> rc2:> rc3:> Nil)
15 -- Stimuli for testing the functionality of top
16 stimuli0=(rclist!!0,val0) --(rclist!!0) = rc1
17 stimuli1=(rclist!!0,val1) --(rclist!!0) = rc1
18 stimuli2=(rclist!!1,val2) --(rclist!!1) = rc2
19 stimuliVec = [stimuli0, stimuli1, stimuli2]