Verification of Parameterised FPGA Circuit Descriptions with Layout ...
Verification of Parameterised FPGA Circuit Descriptions with Layout ... Verification of Parameterised FPGA Circuit Descriptions with Layout ...
CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 96 2.ÎnRna. ∀ qs137 qs138 qs139. 0 ≤ Height (qs138 ;;; R $ qs137 ;;; qs139); ∀ qs137 qs138 qs139. 0 ≤ Width (qs138 ;;; R $ qs137 ;;; qs139); ∀ l t b r. 0 ≤ irow.width na R l t b r =⇒ ∀ l t b r. 0 ≤ irow.width (Suc na) R l t b r The proof should now be completed by auto intro: width ser ge0, however the automatic proof tools do not work in this case. We can however prove the base case and expand the induction case using only the simplifier: > apply (simp, simp) goal (theorem (width ge0 int), 1 subgoal): 1.ÎRna. ∀ qs137 a b aa ba. 0 ≤ Height R qs137 (a, b) (aa, ba); ∀ qs137 a b aa ba. 0 ≤ Width R qs137 (a, b) (aa, ba); ∀ l t b r. 0 ≤ irow.width na R l t b r =⇒ ∀ l t b r. 0 ≤ Width (snd.snd $ (converse.converse $ (apr $ int na)) ;; beside $ ((| Def = λb c. arbitrary, Height = λb c. arbitrary, Width = λ(l, t). split (irow.width na R l t) |), R $ int na + 1) ;; fst . fst $ (apr $ int na)) (l, t) (b, r) We can apply the width ser ge0 rule manually, after removing the universal quantifiers, which splits the goal into three sub-goals: > apply (rule allI )+ > apply (rule width ser ge0)+ goal (theorem (width ge0 int), 3 subgoals): 1.ÎRna l t b r x y xa ya. ∀ qs137 a b aa ba. 0 ≤ Height R qs137 (a, b) (aa, ba); ∀ qs137 a b aa ba. 0 ≤ Width R qs137 (a, b) (aa, ba); ∀ l t b r. 0 ≤ irow.width na R l t b r
CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 97 =⇒ 0 ≤ Width (snd.snd $ (converse.converse $ (apr $ int na))) xa ya 2.ÎRna l t b r x y xa ya. ∀ qs137 a b aa ba. 0 ≤ Height R qs137 (a, b) (aa, ba); ∀ qs137 a b aa ba. 0 ≤ Width R qs137 (a, b) (aa, ba); ∀ l t b r. 0 ≤ irow.width na R l t b r =⇒ 0 ≤ Width (beside $ ((| Def = λb c. arbitrary, Height = λb c. arbitrary, Width = λ(l, t). split (irow.width na R l t) |), R $ int na + 1)) xa ya 3.ÎRna l t b r x y. ∀ qs137 a b aa ba. 0 ≤ Height R qs137 (a, b) (aa, ba); ∀ qs137 a b aa ba. 0 ≤ Width R qs137 (a, b) (aa, ba); ∀ l t b r. 0 ≤ irow.width na R l t b r =⇒ 0 ≤ Width (fst.fst $ (apr $ int na)) x y The proof can then be completed by auto. Similar techniques can be adopted for other proofs, although not all will require induction (the containment theorem for irow does not). Note that we have not required any properties of maxf or sum - these functions are used when describing the layout of iteratively defined blocks and are not needed for recursively defined combinators. We also attempted proofs for manually specified size functions which expanded the definitions of apr and apl etc, referring to explicit vector indexes. These are simpler expressions than the full expressions produced by the inference algorithm, however a slightly unexpected result is that this substantially complicates the proofs. Proof now requires expansion of the definitions of intermediate signals within the series compositions to check that there is a correspondence between the values produced by the usages of the append blocks and those that are manually specified. This should be a simple process but it is not because of the way blocks are defined as logical predicates rather than functions. The usage of block predicates to define values bound by the define description operator requires the elimination of definite descriptions to extract the real value. This is a significant
- Page 55 and 56: CHAPTER 3. GENERATING PARAMETERISED
- Page 57 and 58: CHAPTER 3. GENERATING PARAMETERISED
- Page 59 and 60: CHAPTER 3. GENERATING PARAMETERISED
- Page 61 and 62: CHAPTER 3. GENERATING PARAMETERISED
- Page 63 and 64: CHAPTER 3. GENERATING PARAMETERISED
- Page 65 and 66: CHAPTER 3. GENERATING PARAMETERISED
- Page 67 and 68: CHAPTER 3. GENERATING PARAMETERISED
- Page 69 and 70: CHAPTER 3. GENERATING PARAMETERISED
- Page 71 and 72: CHAPTER 3. GENERATING PARAMETERISED
- Page 73 and 74: CHAPTER 3. GENERATING PARAMETERISED
- Page 75 and 76: Chapter 4 Verifying Circuit Layouts
- Page 77 and 78: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 79 and 80: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 81 and 82: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 83 and 84: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 85 and 86: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 87 and 88: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 89 and 90: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 91 and 92: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 93 and 94: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 95 and 96: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 97 and 98: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 99 and 100: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 101 and 102: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 103 and 104: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 105: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 109 and 110: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 111 and 112: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 113 and 114: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 115 and 116: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 117 and 118: Chapter 5 Specialisation In this ch
- Page 119 and 120: CHAPTER 5. SPECIALISATION 109 opera
- Page 121 and 122: CHAPTER 5. SPECIALISATION 111 // Ha
- Page 123 and 124: CHAPTER 5. SPECIALISATION 113 circu
- Page 125 and 126: CHAPTER 5. SPECIALISATION 115 const
- Page 127 and 128: CHAPTER 5. SPECIALISATION 117 block
- Page 129 and 130: CHAPTER 5. SPECIALISATION 119 Modif
- Page 131 and 132: CHAPTER 5. SPECIALISATION 121 Buffe
- Page 133 and 134: CHAPTER 5. SPECIALISATION 123 a fas
- Page 135 and 136: CHAPTER 5. SPECIALISATION 125 block
- Page 137 and 138: CHAPTER 5. SPECIALISATION 127 y y y
- Page 139 and 140: CHAPTER 5. SPECIALISATION 129 with
- Page 141 and 142: CHAPTER 6. LAYOUT CASE STUDIES 131
- Page 143 and 144: CHAPTER 6. LAYOUT CASE STUDIES 133
- Page 145 and 146: CHAPTER 6. LAYOUT CASE STUDIES 135
- Page 147 and 148: CHAPTER 6. LAYOUT CASE STUDIES 137
- Page 149 and 150: CHAPTER 6. LAYOUT CASE STUDIES 139
- Page 151 and 152: CHAPTER 6. LAYOUT CASE STUDIES 141
- Page 153 and 154: CHAPTER 6. LAYOUT CASE STUDIES 143
- Page 155 and 156: CHAPTER 6. LAYOUT CASE STUDIES 145
CHAPTER 4. VERIFYING CIRCUIT LAYOUTS 97<br />
=⇒ 0 ≤ Width (snd.snd $ (converse.converse $ (apr $ int na))) xa ya<br />
2.ÎRna l t b r x y xa ya.<br />
∀ qs137 a b aa ba. 0 ≤ Height R qs137 (a, b) (aa, ba);<br />
∀ qs137 a b aa ba. 0 ≤ Width R qs137 (a, b) (aa, ba);<br />
∀ l t b r. 0 ≤ irow.width na R l t b r <br />
=⇒ 0 ≤ Width<br />
(beside $<br />
((| Def = λb c. arbitrary, Height = λb c. arbitrary,<br />
Width = λ(l, t). split (irow.width na R l t) |),<br />
R $ int na + 1))<br />
xa ya<br />
3.ÎRna l t b r x y.<br />
∀ qs137 a b aa ba. 0 ≤ Height R qs137 (a, b) (aa, ba);<br />
∀ qs137 a b aa ba. 0 ≤ Width R qs137 (a, b) (aa, ba);<br />
∀ l t b r. 0 ≤ irow.width na R l t b r <br />
=⇒ 0 ≤ Width (fst.fst $ (apr $ int na)) x y<br />
The pro<strong>of</strong> can then be completed by auto. Similar techniques can be adopted for other pro<strong>of</strong>s,<br />
although not all will require induction (the containment theorem for irow does not). Note<br />
that we have not required any properties <strong>of</strong> maxf or sum - these functions are used when<br />
describing the layout <strong>of</strong> iteratively defined blocks and are not needed for recursively defined<br />
combinators.<br />
We also attempted pro<strong>of</strong>s for manually specified size functions which expanded the definitions<br />
<strong>of</strong> apr and apl etc, referring to explicit vector indexes. These are simpler expressions than the<br />
full expressions produced by the inference algorithm, however a slightly unexpected result is<br />
that this substantially complicates the pro<strong>of</strong>s. Pro<strong>of</strong> now requires expansion <strong>of</strong> the definitions<br />
<strong>of</strong> intermediate signals <strong>with</strong>in the series compositions to check that there is a correspondence<br />
between the values produced by the usages <strong>of</strong> the append blocks and those that are manually<br />
specified. This should be a simple process but it is not because <strong>of</strong> the way blocks are defined<br />
as logical predicates rather than functions.<br />
The usage <strong>of</strong> block predicates to define values bound by the define description operator<br />
requires the elimination <strong>of</strong> definite descriptions to extract the real value. This is a significant