Skip to content

Commit 4dd875a

Browse files
committed
add documentation for binary file generation
1 parent 24748ce commit 4dd875a

7 files changed

+83
-1
lines changed

docs/source/tutorial/GeneratetheASCIIheaderfilef.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Generate the ASCII header file format
2121
2222
2323
The output files dumped will be :
24-
|br| <TOP>_jlink.h - *file generated from the jlink input*
2524
|br| <TOP>_bit.h - *file generated from the bit file input*
2625
|br|
2726

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
.. index::
3+
single: Generate the Binary file format
4+
5+
Generate the Binary File format
6+
======================================
7+
8+
9+
FPGA Binary file can be generated, which will contain the following components:
10+
11+
1. FPGA Bitstream
12+
2. FPGA MemInit (RAM Block Initialization)
13+
3. FPGA IOMux Configuration
14+
15+
Then, FPGA bin [${TOP}.bin] == bitstream bin + meminit bin + iomux bin
16+
17+
We will need a header in the FPGA bin which indicates the component information (sizes).
18+
19+
The diagrams below show a complete picture of the FPGA bin structure.
20+
21+
FPGA bin header
22+
~~~~~~~~~~~~~~~
23+
24+
.. image:: fpga-bin-structure-header.png
25+
26+
The header contains the fields:
27+
28+
- FPGA BIN VERSION - which will help handle future changes in bin structure if needed. Currently at v0.1.
29+
- BITSTREAM BIN SIZE, CRC - size in bytes, and crc of the bitstream binary content
30+
- MEMINIT BIN SIZE, CRC - size in bytes, and crc of the meminit binary content
31+
- IOMUX BIN SIZE, CRC - size in bytes, and crc of the iomux binary content
32+
- RESERVED WORD - for future usage
33+
34+
FPGA bitstream bin
35+
~~~~~~~~~~~~~~~~~~
36+
37+
.. image:: fpga-bin-structure-bitstream.png
38+
39+
The bitstream bin will have 4B words, exactly as is currently generated in ${TOP}.bit
40+
41+
FPGA meminit bin
42+
~~~~~~~~~~~~~~~~
43+
44+
.. image:: fpga-bin-structure-meminit.png
45+
46+
The meminit bin will have the same structure as is currently generated in the header method.
47+
48+
For each RAM block, we will have:
49+
50+
- RAM block start address 4B
51+
- RAM block size 4B
52+
- size B of initialization values
53+
54+
This set will be repeated for as many RAM blocks intialized in the design.
55+
56+
FPGA iomux bin
57+
~~~~~~~~~~~~~~
58+
59+
.. image:: fpga-bin-structure-iomux.png
60+
61+
The iomux bin will have a set of pad configurations, each pad configuration is:
62+
63+
- 4B Reg Address
64+
- 4B Reg Value
65+
66+
The number of pad configurations would be equal to the number of pads used by the FPGA design.
67+
68+
Syntax:
69+
70+
.. code-block:: shell
71+
72+
ql_symbiflow -compile -src <source complete path> -d <device> -t <top module name> -v <verilog files> -p <pcf file> -P <Package file> -s <SDC file> -dump binary
73+
74+
The output files dumped will be :
75+
76+
<TOP>.bin - *file generated from the bit file input*
77+
78+
.. code-block:: shell
79+
80+
ql_symbiflow -compile -src $PWD -d ql-eos-s3 -t top -v counter_16bit.v -p chandalar.pcf -P PD64 -s counter_16bit.sdc -dump binary
81+
82+
The generated binary file can then be flashed into the board with the programmer, and the bootloader can automatically can load the FPGA design.

docs/source/tutorial/Rundesignflowonasimplecoun.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Setup environment
4141
PerformingthePostLayoutSimul
4242
GeneratetheJlinkfile
4343
GeneratetheASCIIheaderfilef
44+
GeneratetheBinaryFile
4445
PcfDescription
4546

4647
.. |BR| raw:: html
63.5 KB
Loading
77.1 KB
Loading
73 KB
Loading
76.7 KB
Loading

0 commit comments

Comments
 (0)