mirror of
https://github.com/MPSU/APS.git
synced 2026-04-18 10:25:33 +00:00
Eng. Implementation steps
This commit is contained in:
@@ -1,34 +1,31 @@
|
||||
# Этапы реализации проекта в ПЛИС
|
||||
# FPGA Implementation Steps
|
||||
|
||||
Для того, чтобы описанное на **языке описания аппаратуры** устройство было реализовано в ПЛИС, необходимо выполнить несколько этапов:
|
||||
In order to implement a device described in a **hardware description language** on an FPGA, several steps must be completed:
|
||||
|
||||
1. Elaboration
|
||||
2. Synthesis
|
||||
3. Implementation
|
||||
4. Bitstream generation
|
||||
|
||||
В русскоязычной литературе не сложилось устоявшихся терминов для этапов 1 и 3, но **elaboration** можно назвать как "**предобработку**" или "**развертывание**", а **implementation** как "**реализацию**" или "**построение**".
|
||||
Этапы 2 и 4 переводятся дословно: **синтез** и "**генерация двоичного файла конфигурации** (**битстрима**)".
|
||||
The boundary between steps is quite conditional, and depending on the **electronic design automation** (**EDA**) tool used, the tasks performed at different steps may overlap. The description of the steps will be given for the FPGA design flow; however, with some caveats, the same steps are used in ASIC design as well.
|
||||
|
||||
Более того, граница между этапами весьма условна и в зависимости от используемой **системы автоматизированного проектирования** (**САПР**), задачи, выполняемые на различных этапах, могут перетекать из одного в другой. Описание этапов будет даваться для маршрута проектирования под ПЛИС, однако, с некоторыми оговорками, эти же этапы используются и при проектировании ASIC.
|
||||
|
||||
Остановимся на каждом шаге подробнее.
|
||||
Let us examine each step in detail.
|
||||
|
||||
## Elaboration
|
||||
|
||||
На этапе предобработки, САПР разбирает и анализирует HDL-описание вашего устройства, проверяет его на наличие синтаксических ошибок, производит подстановку значений параметров, развёртывает конструкции, использующиеся для повторяющихся или параметризуемых частей кода, устанавливает разрядности сигналов и строит иерархию модулей устройства.
|
||||
During the elaboration step, the EDA tool parses and analyzes the HDL description of your device, checks it for syntax errors, substitutes parameter values, expands constructs used for repetitive or parameterizable parts of the code, resolves signal widths, and builds the module hierarchy of the device.
|
||||
|
||||
Затем, ставит в соответствие отдельным участкам кода соответствующие абстрактные элементы: логические вентили, мультиплексоры, элементы памяти и т.п. Кроме того, производится анализ и оптимизация схемы, например, если какая-то часть логики в конечном итоге не связана ни с одним из выходных сигналов, она будет удалена[[1]](https://support.xilinx.com/s/question/0D52E00006iHshoSAC/what-exactly-is-elaborating-a-design?language=en_US).
|
||||
It then maps individual sections of code to the corresponding abstract elements: logic gates, multiplexers, memory elements, and so on. Additionally, the circuit is analyzed and optimized — for example, if some part of the logic is ultimately not connected to any output signal, it will be removed[[1]](https://support.xilinx.com/s/question/0D52E00006iHshoSAC/what-exactly-is-elaborating-a-design?language=en_US).
|
||||
|
||||
Итогом предобработки является так называемая **топология межсоединений** (в быту называемая словом **нетлист**). **Нетлист** — это представление цифровой схемы в виде **графа**, где каждый элемент схемы является вершиной графа, а **цепи**, соединяющие эти элементы являются его ребрами. Нетлист может храниться как в виде каких-то внутренних файлов САПР-а (так хранится нетлист этапа **предобработки**), так и в виде **HDL**-файла, описывающего экземпляры примитивов и связи между ними. Рассмотрим этап предобработки и термин нетлиста на примере.
|
||||
The result of elaboration is the so-called **netlist**. A **netlist** is a representation of a digital circuit as a **graph**, where each circuit element is a node of the graph, and the **nets** connecting these elements are its edges. A netlist can be stored either as internal EDA tool files (as is the case for the elaboration netlist) or as an **HDL** file describing primitive instances and the connections between them. Let us examine the elaboration step and the concept of a netlist using an example.
|
||||
|
||||
Допустим, мы хотим реализовать схему, представленную на _рисунке 1_.
|
||||
Suppose we want to implement the circuit shown in _Figure 1_.
|
||||
|
||||

|
||||
|
||||
_Рисунок 1. Пример простой цифровой схемы._
|
||||
_Figure 1. Example of a simple digital circuit._
|
||||
|
||||
Её можно описать следующим **SystemVerilog**-кодом:
|
||||
It can be described with the following **SystemVerilog** code:
|
||||
|
||||
```SystemVerilog
|
||||
module sample(
|
||||
@@ -45,47 +42,47 @@ assign res = sel? d : xabc;
|
||||
endmodule
|
||||
```
|
||||
|
||||
Выполним этап предобработки. Для этого в **Vivado** на вкладке `RTL Analysis` выберем `Schematic`.
|
||||
Let us perform the elaboration step. To do this, in **Vivado**, under the `RTL Analysis` tab, select `Schematic`.
|
||||
|
||||
Откроются следующие окна:
|
||||
The following windows will open:
|
||||
|
||||

|
||||
|
||||
_Рисунок 2. Результат этапа предобработки._
|
||||
_Figure 2. Result of the elaboration step._
|
||||
|
||||
В левом окне мы видим наш нетлист. В нижней части обозначены узлы графа (элементы **ab_i**, **res_i**, **xabc_i**, которые представляют собой **И**, **мультиплексор** и **Исключающее ИЛИ** соответственно. Имена этих элементов схожи с именами проводов, присваиванием которым мы создавали данные элементы)
|
||||
In the left window we can see our netlist. The lower section shows the graph nodes (elements **ab_i**, **res_i**, **xabc_i**, which represent **AND**, a **multiplexer**, and **XOR** respectively; the names of these elements correspond to the names of the wires whose assignments created them).
|
||||
|
||||
В верхней части обозначены **ребра графа**, соединяющие элементы схемы. Это входы и выходы нашего модуля, а также созданные нами промежуточные цепи.
|
||||
The upper section shows the **graph edges** connecting the circuit elements. These are the inputs and outputs of our module, as well as the intermediate nets we created.
|
||||
|
||||
Справа вы видите **схематик** — **графическую схему**, построенную на основе данного **графа** (**нетлиста**).
|
||||
On the right, you see the **schematic** — a **graphical diagram** built from this **graph** (**netlist**).
|
||||
|
||||
## Synthesis
|
||||
|
||||
На шаге синтеза, САПР берет сгенерированную ранее цифровую схему и реализует элементы этой схемы через примитивы конкретной ПЛИС — в основном через логические ячейки, содержащие таблицы подстановки, полный 1-битный сумматор и `D-триггер` (см. [как работает ПЛИС](../Introduction/How%20FPGA%20works.md)).
|
||||
During the synthesis step, the EDA tool takes the previously generated digital circuit and implements its elements using the primitives of the specific FPGA — primarily through logic cells containing look-up tables, a full 1-bit adder, and a `D flip-flop` (see [how an FPGA works](../Introduction/How%20FPGA%20works.md)).
|
||||
|
||||
Поскольку в примере схема чисто **комбинационная**, результат её работы можно рассчитать и выразить в виде **таблицы истинности**, а значит для её реализации лучше всего подойдут **Таблицы Подстановки** (**LUT**-ы). Более того, в ПЛИС `xc7a100tcsg324-1` есть пятивходовые LUT-ы, а у нашей схемы именно столько входов. Это означает, работу всей этой схемы можно заменить **всего одной таблицей подстановки** внутри ПЛИС.
|
||||
Since the circuit in the example is purely **combinational**, its behavior can be calculated and expressed as a **truth table**, meaning **Look-Up Tables** (**LUTs**) are the best fit for its implementation. Moreover, the `xc7a100tcsg324-1` FPGA contains five-input LUTs, and our circuit has exactly that many inputs. This means the entire circuit's behavior can be replaced by **a single look-up table** inside the FPGA.
|
||||
|
||||
Итак, продолжим рассматривать наш пример и выполним этап синтеза. Для этого нажмем на кнопку `Run Synthesis`.
|
||||
Let us continue with our example and perform the synthesis step. To do this, click the `Run Synthesis` button.
|
||||
|
||||
После выполнения синтеза у нас появится возможность открыть новую схему, представленную на рисунке I.4-3.
|
||||
After synthesis completes, we will be able to open the new schematic shown in Figure 3.
|
||||
|
||||

|
||||
|
||||
_Рисунок 3. Результат этапа синтеза._
|
||||
_Figure 3. Result of the synthesis step._
|
||||
|
||||
Мы видим, что между входами/выходами схемы и её внутренней логикой появились новые примитивы — **буферы**. Они нужны, чтобы преобразовать уровень напряжения между входами ПЛИС и внутренней логикой (условно говоря, на вход плис могут приходить сигналы с уровнем `3.3 В`, а внутри ПЛИС примитивы работают с сигналами уровня `1.2 В`).
|
||||
We can see that new primitives — **buffers** — have appeared between the circuit's inputs/outputs and its internal logic. These are needed to convert voltage levels between the FPGA pins and its internal logic (loosely speaking, signals arriving at FPGA inputs may have a level of `3.3 V`, while the primitives inside the FPGA operate with signals at `1.2 V`).
|
||||
|
||||
Сама же логика, как мы и предполагали, свернулась в одну пятивходовую таблицу подстановки.
|
||||
The logic itself, as we expected, has been folded into a single five-input look-up table.
|
||||
|
||||
строка `EQN=32'hAAAA3CCC` означает, что таблица подстановки будет инициализирована следующим 32-битным значением: `0xAAAA3CCC`.
|
||||
Поскольку у схемы 5 входов, у нас может быть 2<sup>5</sup>=32 возможных комбинаций входных сигналов и для каждого нужно свое значение результата.
|
||||
The line `EQN=32'hAAAA3CCC` means that the look-up table will be initialized with the following 32-bit value: `0xAAAA3CCC`.
|
||||
Since the circuit has 5 inputs, there are 2<sup>5</sup>=32 possible input signal combinations, and each one requires its own result value.
|
||||
|
||||
Можно ли как-то проверить данное 32-битное значение без просчитывания всех 32 комбинаций сигналов "на бумажке"?
|
||||
Is it possible to verify this 32-bit value without computing all 32 combinations by hand?
|
||||
<details>
|
||||
<summary>
|
||||
Да, можно.
|
||||
Yes, it is.
|
||||
</summary>
|
||||
Сперва надо понять в каком именно порядке будут идти эти комбинации. Мы видим, что сигналы подключены к таблице подстановки в следующем порядке: `d, c, b, a, sel`. Это означает, что сама таблица примет вид:
|
||||
First, we need to understand the exact order in which these combinations appear. We can see that the signals are connected to the look-up table in the following order: `d, c, b, a, sel`. This means the table takes the following form:
|
||||
|
||||
```ascii
|
||||
|sel| a | b | c | d | |res|
|
||||
@@ -99,9 +96,9 @@ _Рисунок 3. Результат этапа синтеза._
|
||||
| 1 | 1 | 1 | 1 | 1 | | 1 |
|
||||
```
|
||||
|
||||
Давайте посмотрим на логику исходной схемы и данную таблицу истинности: когда `sel==1`, на выход идет `d`, это означает, что мы знаем все значения для нижней половины таблицы истинности, в нижней половине таблице истинности самый левый входной сигнал (`sel`) равен только единице, значит результат будет совпадать с сигналом `d`, который непрерывно меняется с `0` на `1` и оканчивается значением `1`. Это означает, что если читать значения результатов снизу-вверх (от старших значений к младшим), то сначала у нас будет 16 цифр, представляющих 8 пар `10`:`101010101010`, что эквивалентно записи `AAAA` в шестнадцатеричной форме.
|
||||
Let us look at the logic of the original circuit and this truth table: when `sel==1`, the output is `d`, which means we already know all values for the lower half of the truth table. In the lower half, the leftmost input signal (`sel`) is always `1`, so the result will match signal `d`, which continuously alternates between `0` and `1` and ends with `1`. This means that reading the result values from bottom to top (from most significant to least significant), we first have 16 digits representing 8 pairs of `10`: `101010101010`, which is equivalent to `AAAA` in hexadecimal.
|
||||
|
||||
Рассчитывать оставшиеся 16 вариантов тоже не обязательно, если посмотреть на схему, то можно заметить, что когда `sel!=1`, ни `sel`, ни `d` больше не участвуют в управлении выходом. Выход будет зависеть от операции XOR, которая дает `1` только когда её входы не равны между собой. Верхний вход XOR (выход И) , будет равен единице только когда входы `a` и `b` равны единице, причем в данный момент, нас интересуют только ситуации, когда `sel!=1`. Принимая во внимание, что в таблице истинности значения входов записываются чередующимися степенями двойки (единицами, парами, четверками, восьмерками) единиц и нулей, мы понимаем, что интересующая нас часть таблицы истинности будет выглядеть следующим образом:
|
||||
Computing the remaining 16 cases is also unnecessary. Looking at the circuit, we can notice that when `sel!=1`, neither `sel` nor `d` play any role in controlling the output. The output depends on the XOR operation, which produces `1` only when its inputs differ. The upper XOR input (the AND output) equals one only when both `a` and `b` are one, and at this point we are only interested in cases where `sel!=1`. Given that the truth table lists input values in alternating powers of two (ones, pairs, fours, eights), we understand that the portion of the truth table we are interested in looks as follows:
|
||||
|
||||
```ascii
|
||||
...
|
||||
@@ -116,31 +113,31 @@ _Рисунок 3. Результат этапа синтеза._
|
||||
...
|
||||
```
|
||||
|
||||
Только в этой части таблицы истинности мы получим `1` на выходе **И**, при этом в старшей части, вход `c` также равен `1`. Это значит, что входы **Исключающего ИЛИ** будут равны и на выходе будет `0`. Значит результат этой таблицы истинности будет равен `0011` или `3` в шестнадцатеричной записи.
|
||||
Only in this part of the truth table do we get `1` at the AND output, and in the upper part of this section, input `c` is also `1`. This means the XOR inputs are equal and the output is `0`. Therefore, the result for this portion of the truth table is `0011`, or `3` in hexadecimal.
|
||||
|
||||
Ниже данной части таблицы истинности располагается та часть, где `sel==1`, выше та часть, где выход **И** будет равен `0`. Это означает, что оставшаяся младшая часть будет повторять значения `c`, которое сменяется парами нулей и единиц: `00-11-00-11..`. Эта оставшаяся последовательность будет записана в шестнадцатеричном виде как `0xCCC`.
|
||||
Below this section of the truth table is the part where `sel==1`, and above it is the part where the AND output equals `0`. This means the remaining lower portion will repeat the values of `c`, which alternates in pairs of zeros and ones: `00-11-00-11..`. This remaining sequence is written in hexadecimal as `0xCCC`.
|
||||
|
||||
Таким образом, мы и получаем искомое выражение `EQN=32'hAAAA3CCC`. Если с этой частью возникли сложности, попробуйте составить данную таблицу истинности (без вычисления самих результатов, а затем просмотрите логику быстрого вычисления результата).
|
||||
Thus, we arrive at the expression `EQN=32'hAAAA3CCC`. If this section was difficult to follow, try constructing the full truth table (without computing the actual results), and then review the logic for the fast result derivation.
|
||||
</details>
|
||||
|
||||
## Implementation
|
||||
|
||||
После получения нетлиста, где в качестве элементов используются ресурсы конкретной ПЛИС, происходит **размещение** этой схемы на элементы заданной ПЛИС: выбираются конкретные логические ячейки. Затем происходит **трассировка** (маршрутизация) связей между ними. Для этих процедур часто используется термин **place & route** (размещение и трассировка). Например, реализация 32-битного сумматора с ускоренным переносом может потребовать 32 LUT-а и 8 примитивов вычисления быстрого переноса (`CARRY4`). Будет неразумно использовать для этого примитивы, разбросанные по всему кристаллу ПЛИС, ведь тогда придётся выполнять сложную трассировку сигнала, да и временные характеристики устройства также пострадают (сигналу, идущему от предыдущего разряда к следующему, придётся проходить больший путь). Вместо этого, САПР будет пытаться разместить схему таким образом, чтобы использовались близлежащие примитивы ПЛИС, для получения оптимальных характеристик.
|
||||
After obtaining the netlist in which the elements are the primitives of the specific FPGA, the circuit is **placed** onto the FPGA's logic elements: specific logic cells are selected. Then **routing** of the connections between them is performed. These procedures are commonly referred to as **place & route**. For example, implementing a 32-bit carry-lookahead adder may require 32 LUTs and 8 fast carry computation primitives (`CARRY4`). It would be inefficient to use primitives scattered across the entire FPGA die, as this would require complex signal routing and would degrade the timing characteristics of the device (signals travelling from one bit to the next would have to traverse longer paths). Instead, the EDA tool attempts to place the circuit such that nearby FPGA primitives are used, in order to achieve optimal characteristics.
|
||||
|
||||
Что именно считается "оптимальным" зависит от двух вещей: настроек САПР и **ограничений** (**constraints**), учитываемых при построении итоговой схемы в ПЛИС. Ограничения сужают область возможных решений по размещению примитивов внутри ПЛИС под определенные характеристики (временны́е и физические). Например, можно сказать, внутри ПЛИС схема должна быть размещена таким образом, чтобы время прохождения по **критическому пути** не превышало `20ns`. Это временно́е ограничение. Также нужно сообщить САПР, к какой ножке ПЛИС необходимо подключить входы и выходы нашей схемы — это физическое ограничение.
|
||||
What exactly is considered "optimal" depends on two things: the EDA tool settings and the **constraints** applied when building the final circuit on the FPGA. Constraints narrow the solution space for primitive placement inside the FPGA to meet specific characteristics (timing and physical). For example, you can specify that the circuit must be placed such that the **critical path** delay does not exceed `20 ns`. This is a timing constraint. You also need to tell the EDA tool which FPGA pin the inputs and outputs of your circuit should be connected to — this is a physical constraint.
|
||||
|
||||
Ограничения описываются не на языке описания аппаратуры, вместо этого используются текстовые файлы специального формата, зависящего от конкретной САПР.
|
||||
Constraints are not described in a hardware description language; instead, plain text files in a special format specific to the EDA tool are used.
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
Пример используемых ограничений для лабораторной по АЛУ под отладочную плату `Nexys A7-100T` (для упрощения восприятия, убраны старшие разряды переключателей и светодиодов, т.к. ограничения для каждого из разряда однотипны).
|
||||
Example constraints used for the ALU lab targeting the <code>Nexys A7-100T</code> development board (higher-order switch and LED bits are omitted for clarity, as the constraints for each bit are identical).
|
||||
</summary>
|
||||
|
||||
Строки, начинающиеся с `#` являются комментариями.
|
||||
Lines beginning with `#` are comments.
|
||||
|
||||
Строки, начинающиеся с `set_property` являются физическими ограничениями, связывающими входы и выходы нашей схемы с конкретными входами и выходами ПЛИС.
|
||||
Lines beginning with `set_property` are physical constraints that bind the inputs and outputs of our circuit to specific FPGA pins.
|
||||
|
||||
Строка `create_clock...` задает временны́е ограничения, описывая целевую тактовую частоту тактового сигнала и его [скважность](https://ru.wikipedia.org/wiki/%D0%A1%D0%BA%D0%B2%D0%B0%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D1%8C).
|
||||
The `create_clock...` line defines timing constraints, specifying the target clock frequency and its [duty cycle](https://ru.wikipedia.org/wiki/%D0%A1%D0%BA%D0%B2%D0%B0%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D1%8C).
|
||||
|
||||
```xdc
|
||||
## This file is a general .xdc for the Nexys A7-100T
|
||||
@@ -177,51 +174,51 @@ set_property -dict { PACKAGE_PIN C12 IOSTANDARD LVCMOS33 } [get_ports { resetn
|
||||
|
||||
</details>
|
||||
|
||||
После выполнения построения, нетлист и сама цифровая схема остаются неизменными, однако использованные для реализации схемы примитивы получают свой "адрес" внутри ПЛИС:
|
||||
After implementation completes, the netlist and the digital circuit itself remain unchanged; however, the primitives used to realize the circuit are assigned their "address" inside the FPGA:
|
||||
|
||||

|
||||
|
||||
_Рисунок 4. "Адрес" конкретного LUT-а в ПЛИС._
|
||||
_Figure 4. The "address" of a specific LUT inside the FPGA._
|
||||
|
||||
Теперь, мы можем посмотреть на "внутренности" нашей ПЛИС `xc7a100tcsg324-1` и то, как через её примитивы будет реализована наша схема. Для этого необходимо открыть построенную схему: `Implementation -> Open implemented design`. Откроется окно, представленное на _рис. 5_.
|
||||
Now we can look at the "internals" of our FPGA `xc7a100tcsg324-1` and see how our circuit is implemented through its primitives. To do this, open the implemented design: `Implementation -> Open implemented design`. The window shown in _Fig. 5_ will open.
|
||||
|
||||

|
||||
|
||||
_Рисунок 5. Окно просмотра реализованного устройства._
|
||||
_Figure 5. The implemented design viewer window._
|
||||
|
||||
Это содержимое ПЛИС. Просто из-за огромного количества содержащихся в ней примитивов, оно показана в таком масштабе, что всё сливается в один цветной ковёр. Большая часть этого окна неактивна (показана в тёмно-синих тонах) и это нормально, ведь мы реализовали крошечную цифровую схему, она и не должна занимать значительное количество ресурсов ПЛИС.
|
||||
This is the contents of the FPGA. Due to the enormous number of primitives it contains, it is displayed at a scale where everything blends into a single colored mosaic. Most of this window is inactive (shown in dark blue tones), and that is expected — we implemented a tiny digital circuit that should not occupy a significant amount of FPGA resources.
|
||||
|
||||
Нас интересует "[бледно-голубая точка](https://ru.wikipedia.org/wiki/Pale_Blue_Dot)", расположенная в нижнем левом углу прямоугольника `X0Y1` (выделено красным). Если отмасштабировать эту зону, мы найдем используемый нами LUT:
|
||||
We are interested in the "[pale blue dot](https://en.wikipedia.org/wiki/Pale_Blue_Dot)" located in the lower-left corner of the rectangle `X0Y1` (highlighted in red). Zooming into that area, we will find the LUT we are using:
|
||||
|
||||

|
||||
|
||||
_Рисунок 6. Расположение выбранного LUT-а внутри ПЛИС._
|
||||
_Figure 6. Location of the selected LUT inside the FPGA._
|
||||
|
||||
Кроме того, если поиграться со свойствами этого примитива, мы сможем найти нашу таблицу истинности, инициализирующую этот примитив.
|
||||
Furthermore, by examining the properties of this primitive, we can find the truth table used to initialize it.
|
||||
|
||||
## Bitstream generation
|
||||
|
||||
После того, как САПР определил конкретные примитивы, их режим работы, и пути сигнала между ними, необходимо создать двоичный файл (**bitstream**), который позволит сконфигурировать ПЛИС необходимым нам образом.
|
||||
Получив этот файл, остается запрограммировать ПЛИС, после чего она воплотит разработанное устройство.
|
||||
After the EDA tool has determined the specific primitives, their operating modes, and the signal paths between them, a binary file (**bitstream**) must be generated. This file will configure the FPGA in the required way.
|
||||
Once this file is obtained, all that remains is to program the FPGA, after which it will implement the designed device.
|
||||
|
||||
## Итоги главы
|
||||
## Chapter Summary
|
||||
|
||||
Таким образом, маршрут перехода от HDL-описания устройства до его реализации в ПЛИС выглядит следующим образом:
|
||||
The flow from an HDL description of a device to its implementation on an FPGA is as follows:
|
||||
|
||||
1. Сперва происходит этап **предобработки** (**elaboration**). В основные задачи этого этапа входит:
|
||||
1. развертывание иерархии модулей: преобразование иерархической структуры проекта в плоскую, что облегчает дальнейшие этапы обработки;
|
||||
2. проверка синтаксиса и семантики HDL-кода;
|
||||
3. разрешение параметров и констант;
|
||||
4. генерация промежуточного представления проекта, которое затем используется на следующих этапах.
|
||||
Полученное промежуточное представление проекта использует абстрактные элементы (логические вентили, мультиплексоры, регистры), которые не привязаны к конкретной ПЛИС.
|
||||
2. Затем выполняется этап **синтеза** (**synthesis**) **нетлиста**, который использует ресурсы конкретной ПЛИС. Все, использовавшиеся на предыдущем этапе структуры (регистры, мультиплексоры и прочие блоки) реализуются через примитивы ПЛИС (LUT-ы, D-триггеры, арифметические блоки и т.п.). Выполняется этап оптимизации логических сетей для минимизации занимаемой площади, уменьшения задержек и энергопотребления.
|
||||
3. После выполняется этап **построения** (**implementation**) конечной цифровой схемы, выполняющий несколько подэтапов:
|
||||
1. **Размещение** (**Placement**): определение конкретных местоположений для всех логических элементов в ПЛИС. Если на предыдущем этапе часть схемы была реализована через LUT, то на этом этапе решается **какой именно** LUT будет использован (имеется в виду не его тип, а какой из множества однотипных элементов будет выбран).
|
||||
2. **Трассировка** (**Routing**): создание соединений между элементами в соответствии с нетлистом.
|
||||
3. **Временной анализ** (Timing Analysis): Проверка временны́х характеристик для подтверждения, что все сигналы распространяются по цепи в допустимые временны́е рамки.
|
||||
Область допустимых решений для этапов "**place & route**" сужается путем наложения **физических** и **временны́х** **ограничений** (**constraints**).
|
||||
4. Последним этапом выполняется **генерация двоичного файла конфигурации** (**bitstream generation**), который во время прошивки сконфигурирует ПЛИС на реализацию построенной схемы.
|
||||
1. First, the **elaboration** step takes place. Its main tasks include:
|
||||
1. flattening the module hierarchy: converting the hierarchical project structure into a flat one, which simplifies subsequent processing steps;
|
||||
2. syntax and semantic checking of the HDL code;
|
||||
3. resolving parameters and constants;
|
||||
4. generating an intermediate project representation used in subsequent steps.
|
||||
The resulting intermediate representation uses abstract elements (logic gates, multiplexers, registers) that are not tied to any specific FPGA.
|
||||
2. Next, the **synthesis** step is performed, producing a **netlist** that uses the resources of the specific FPGA. All structures used in the previous step (registers, multiplexers, and other blocks) are implemented through FPGA primitives (LUTs, D flip-flops, arithmetic blocks, etc.). A logic network optimization step is performed to minimize area, reduce delays, and lower power consumption.
|
||||
3. Then the **implementation** step builds the final digital circuit, consisting of several sub-steps:
|
||||
1. **Placement**: determining the specific locations of all logic elements within the FPGA. If part of the circuit was implemented using LUTs in the previous step, this step decides **which specific** LUT will be used (not its type, but which of the many identical elements will be selected).
|
||||
2. **Routing**: creating connections between elements in accordance with the netlist.
|
||||
3. **Timing Analysis**: verifying timing characteristics to confirm that all signals propagate through the circuit within acceptable timing margins.
|
||||
The solution space for the **place & route** steps is constrained by applying **physical** and **timing** **constraints**.
|
||||
4. The final step is **bitstream generation**, which produces the binary configuration file that will configure the FPGA to implement the built circuit when programmed.
|
||||
|
||||
## Список источников
|
||||
## References
|
||||
|
||||
1. [Форум Xilinx: what exactly is 'elaborating' a design?](https://support.xilinx.com/s/question/0D52E00006iHshoSAC/what-exactly-is-elaborating-a-design?language=en_US)
|
||||
1. [Xilinx Forum: what exactly is 'elaborating' a design?](https://support.xilinx.com/s/question/0D52E00006iHshoSAC/what-exactly-is-elaborating-a-design?language=en_US)
|
||||
|
||||
Reference in New Issue
Block a user