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 5. SPECIALISATION 116 b a cout cin Figure 5.6: Full adder cell These layout theorems can be proved for each self-specialising block and then these proofs combined to verify the size correctness of an entire circuit. This once again neatly decomposes a potentially large verification task into many small and easy parts. For example, for the xor2 gate in Figure 5.4 the width correctness theorem can be stated and proved easily: ∀ a b c. Width xor2spec a b c ≤ Width xor2gen a b c ⇒ ∀ a b c. if(a, 1, 0) ≤ 1 ⇒ 1 ≤ 1 ∧ 0 ≤ 1 ⇒ True 5.3 Optimal Distributed Specialisation Reviewing the effectiveness of our self-specialising blocks on a real circuit we discover that it is necessary to address some shortcomings with the basic approach. 5.3.1 Specialising a Ripple Adder We will demonstrate distributed specialisation in Quartz using a simple ripple adder circuit. This is composed of full adder cells as shown in Figure 5.6 and described in Quartz as shown in Figure 5.7. The full adder is implemented using two xor gates and a multiplexer, which is described separately using two 2-input and gates, an or and an inverter. This description is not designed for any particular target architecture however, and what matters is the effect on this circuit of specialising it. As can be seen in Figure 5.7 the full-adder block accepts only hardware wires for inputs cin ans
CHAPTER 5. SPECIALISATION 117 block fadd ((‘a a, wire b), wire cin) ∼ (wire cout, wire ans) { wire xored ab. (a,b) ; xor2 ; xored ab at (0, height((a, cin) ; mux2 xored ab ;cout)). (cin, xored ab) ;xor2 ; ans at (width((a,b) ; xor2 ; xored ab), height((a, cin) ; mux2 xored ab ;cout)). (a, cin) ; mux2 xored ab ;cout at (0,0). } Figure 5.7: Quartz description for a full adder Resource Standard A=111 A=100 A=001 xor gates 6 3 3 3 and gates 6 3 3 3 inverters 2 6 4 4 or gates 3 3 3 3 Total gates 17 15 13 13 Saving - 12% 29% 29% Total transistors 106 72 68 68 Saving - 32% 35% 35% Table 5.1: Using distributed specialisation to specialise a ripple adder and b but input a is more flexible and, since it is connected to overloaded self-specialising blocks, can be of either wire or bool type. This allows the a input to be specialised by supplying a static value. The full adder blocks can be combined together using the col combinator to create a ripple adder. We can then use the Quartz compiler to synthesise a netlist for this design with either two dynamic inputs or one dynamic and one statically specialised input. Table 5.1 compares 3-bit versions of the standard ripple adder and three specialised versions. The first point to observe from these results is that the distributed specialisation has produced a significant saving in on-chip resources, though more so in terms of transistors by converting complex functions into simpler ones than by eliminating logic entirely. However, it is also obvious that this result is not optimal - for example, adding “100” should be implementable as a single full-adder with all other blocks reduced to wiring, an arrangement that only requires 6 gates using this fadd block. The reason our distributed specialisation system produces such poor results is the Quartz typing system and can be seen in the code describing distributed specialisation of the and2 block, or the or2 block shown in Figure 5.8. These two blocks either connect their output to
- 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 and 106: CHAPTER 4. VERIFYING CIRCUIT LAYOUT
- Page 107 and 108: 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: CHAPTER 5. SPECIALISATION 115 const
- 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
- Page 157 and 158: CHAPTER 6. LAYOUT CASE STUDIES 147
- Page 159 and 160: CHAPTER 6. LAYOUT CASE STUDIES 149
- Page 161 and 162: CHAPTER 6. LAYOUT CASE STUDIES 151
- Page 163 and 164: CHAPTER 6. LAYOUT CASE STUDIES 153
- Page 165 and 166: CHAPTER 6. LAYOUT CASE STUDIES 155
- Page 167 and 168: CHAPTER 6. LAYOUT CASE STUDIES 157
- Page 169 and 170: CHAPTER 6. LAYOUT CASE STUDIES 159
- Page 171 and 172: CHAPTER 6. LAYOUT CASE STUDIES 161
- Page 173 and 174: CHAPTER 6. LAYOUT CASE STUDIES 163
- Page 175 and 176: CHAPTER 7. CONCLUSION AND FUTURE WO
CHAPTER 5. SPECIALISATION 116<br />
b<br />
a<br />
cout<br />
cin<br />
Figure 5.6: Full adder cell<br />
These layout theorems can be proved for each self-specialising block and then these pro<strong>of</strong>s<br />
combined to verify the size correctness <strong>of</strong> an entire circuit. This once again neatly decomposes<br />
a potentially large verification task into many small and easy parts. For example, for the<br />
xor2 gate in Figure 5.4 the width correctness theorem can be stated and proved easily:<br />
∀ a b c. Width xor2spec a b c ≤ Width xor2gen a b c<br />
⇒ ∀ a b c. if(a, 1, 0) ≤ 1<br />
⇒ 1 ≤ 1 ∧ 0 ≤ 1 ⇒ True<br />
5.3 Optimal Distributed Specialisation<br />
Reviewing the effectiveness <strong>of</strong> our self-specialising blocks on a real circuit we discover that it<br />
is necessary to address some shortcomings <strong>with</strong> the basic approach.<br />
5.3.1 Specialising a Ripple Adder<br />
We will demonstrate distributed specialisation in Quartz using a simple ripple adder circuit.<br />
This is composed <strong>of</strong> full adder cells as shown in Figure 5.6 and described in Quartz as shown<br />
in Figure 5.7. The full adder is implemented using two xor gates and a multiplexer, which is<br />
described separately using two 2-input and gates, an or and an inverter. This description is<br />
not designed for any particular target architecture however, and what matters is the effect<br />
on this circuit <strong>of</strong> specialising it.<br />
As can be seen in Figure 5.7 the full-adder block accepts only hardware wires for inputs cin<br />
ans