Xilinx tools generate and expect an additional header to be added to the
bitstream. This header is the only difference between .bit and .bin
files and is not required by the part in any way. OpenOCD only supports
reading .bit files so the easiest path to a using FOSS tools from FASM
down is to generate a .bit header in xc7patch's output. To distinguish
xc7patch-generated files from Xilinx-generated files, the source file
field includes a Generator tag indicating that the bitstream was produced by
xc7patch. Vivado uses the same technique to record the Vivado version
in a Version tag.
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Bitstreams generated by xc7patch can now be directly loaded into parts
via Vivado's Hardware Manager (bitstream must have .bin suffix) or by
flashing into a boot FLASH.
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
ConfigurationPacket assumes that the payload data is owned by someone
else. For frame data, that is generally true. For initialization and
finalization sequences, those payloads need to be created and managed.
Instead, dynamically allocate packets which allows for using subclasses
of ConfigurationPacket that store the payload with the packet.
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
Applies a .frm file (lines of frame address: frame words) to a bitstream
and writes the result as a new bitstream. Note that the new bitstream
will not include the initialization and finalization sequences required
for programming.
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>