新千葉 ガーベージ・コレクション

FPGA マガジンやインターフェースで書けなかったこと等をちょぼちょぼ書いてます。@ryos36

vivado の最適化

まずは使われそうにない下位ビットをはっしょった。ほんとうは先に最適化してはいけない。

+-------------------------------------------------------------+----------+-------+-----------+-------+
|                          Site Type                          |   Used   | Fixed | Available | Util% |
+-------------------------------------------------------------+----------+-------+-----------+-------+
| Slice                                                       |      121 |     0 |     13300 |  0.91 |
|   SLICEL                                                    |       81 |     0 |           |       |
|   SLICEM                                                    |       40 |     0 |           |       |
| LUT as Logic                                                |      285 |     0 |     53200 |  0.54 |
|   using O5 output only                                      |        2 |       |           |       |
|   using O6 output only                                      |      175 |       |           |       |
|   using O5 and O6                                           |      108 |       |           |       |
| LUT as Memory                                               |        0 |     0 |     17400 |  0.00 |
|   LUT as Distributed RAM                                    |        0 |     0 |           |       |
|   LUT as Shift Register                                     |        0 |     0 |           |       |
| LUT Flip Flop Pairs                                         |      388 |     0 |     53200 |  0.73 |
|   fully used LUT-FF pairs                                   |      202 |       |           |       |
|   LUT-FF pairs with unused LUT                              |      105 |       |           |       |
|   LUT-FF pairs with unused Flip Flop                        |       81 |       |           |       |
| Unique Control Sets                                         |       20 |       |           |       |
| Minimum number of registers lost to control set restriction | 57(Lost) |       |           |       |
+-------------------------------------------------------------+----------+-------+-----------+-------+

Yレジの計算をちゃんと 16bit にしたら増えた。

+-------------------------------------------------------------+----------+-------+-----------+-------+
|                          Site Type                          |   Used   | Fixed | Available | Util% |
+-------------------------------------------------------------+----------+-------+-----------+-------+
| Slice                                                       |      124 |     0 |     13300 |  0.93 |
|   SLICEL                                                    |       84 |     0 |           |       |
|   SLICEM                                                    |       40 |     0 |           |       |
| LUT as Logic                                                |      298 |     0 |     53200 |  0.56 |
|   using O5 output only                                      |        2 |       |           |       |
|   using O6 output only                                      |      197 |       |           |       |
|   using O5 and O6                                           |       99 |       |           |       |
| LUT as Memory                                               |        0 |     0 |     17400 |  0.00 |
|   LUT as Distributed RAM                                    |        0 |     0 |           |       |
|   LUT as Shift Register                                     |        0 |     0 |           |       |
| LUT Flip Flop Pairs                                         |      410 |     0 |     53200 |  0.77 |
|   fully used LUT-FF pairs                                   |      209 |       |           |       |
|   LUT-FF pairs with unused LUT                              |      114 |       |           |       |
|   LUT-FF pairs with unused Flip Flop                        |       87 |       |           |       |
| Unique Control Sets                                         |       20 |       |           |       |
| Minimum number of registers lost to control set restriction | 50(Lost) |       |           |       |
+-------------------------------------------------------------+----------+-------+-----------+-------+

重複しているところを variable にしてみたら変わらず。
どうやらもともと最適化が効いている。苦労して最適化する必要なし。

+-------------------------------------------------------------+----------+-------+-----------+-------+
|                          Site Type                          |   Used   | Fixed | Available | Util% |
+-------------------------------------------------------------+----------+-------+-----------+-------+
| Slice                                                       |      124 |     0 |     13300 |  0.93 |
|   SLICEL                                                    |       84 |     0 |           |       |
|   SLICEM                                                    |       40 |     0 |           |       |
| LUT as Logic                                                |      298 |     0 |     53200 |  0.56 |
|   using O5 output only                                      |        2 |       |           |       |
|   using O6 output only                                      |      197 |       |           |       |
|   using O5 and O6                                           |       99 |       |           |       |
| LUT as Memory                                               |        0 |     0 |     17400 |  0.00 |
|   LUT as Distributed RAM                                    |        0 |     0 |           |       |
|   LUT as Shift Register                                     |        0 |     0 |           |       |
| LUT Flip Flop Pairs                                         |      410 |     0 |     53200 |  0.77 |
|   fully used LUT-FF pairs                                   |      209 |       |           |       |
|   LUT-FF pairs with unused LUT                              |      114 |       |           |       |
|   LUT-FF pairs with unused Flip Flop                        |       87 |       |           |       |
| Unique Control Sets                                         |       20 |       |           |       |
| Minimum number of registers lost to control set restriction | 50(Lost) |       |           |       |
+-------------------------------------------------------------+----------+-------+-----------+-------+