Trenz Electronic Products > Trenz Electronic FPGA Modules

S7Mini program flash

(1/2) > >>

ralblas:
I want to load the flash of S7Mini using a tcl script. For loading directly into fpga it's no problem, using the bit file generated by write_bitstream.
Using the Vivado gui I can see that I have to select a flash device, I assume that n25q64-3.3v-spi-x1_x2_x4 is the one to choose?
Can I use the same bit file to load into flash, or must that be generated in another way?

Agnesbartlett:

--- Quote from: ralblas on September 13, 2023, 10:37:28 AM ---I want to load the flash of S7Mini using a tcl script. For loading directly into fpga it's no problem, using the bit file generated by write_bitstream.
Using the Vivado gui I can see that I have to select a flash device, I assume that n25q64-3.3v-spi-x1_x2_x4 is the one to choose?
Can I use the same bit file to load into flash, or must that be generated in another way?

--- End quote ---

Hello,

To load a bitstream into the flash memory of an S7Mini FPGA using a Tcl script in Vivado, you typically follow these steps:

Generate the Bitstream File:

Use Vivado's GUI or Tcl commands to generate the bitstream file (.bit) as you normally would. You mentioned that you can generate a bit file using write_bitstream. This bitstream file is the configuration data that you will eventually load into the flash memory.
Select the Appropriate Flash Device:

In Vivado, select the appropriate flash device for your S7Mini board. You mentioned the n25q64-3.3v-spi-x1_x2_x4 flash device, which seems suitable if it matches the flash chip on your board. Verify this information with your board's documentation.
Initialize the Flash Configuration:

You'll need to initialize the flash memory with the bitstream file. This is typically done using the "Initialize Memory" feature in Vivado. You can use Tcl commands for this purpose.

open_hw
connect_hw_server
current_hw_target [get_hw_targets *]
refresh_hw_device [get_hw_devices]
set_property PROGRAM.FILE [your_bitstream_file.bit] [get_hw_devices [get_property PROGRAM.HW_CFGMEM [get_hw_devices]]]
program_hw_cfgmem -force
Replace [your_bitstream_file.bit] with the path to your generated bitstream file.

Program the Flash:

Use the program_hw_cfgmem Tcl command to program the flash memory with the bitstream.
Verify the Configuration:

After programming the flash, you should verify that the configuration was successful.
Here's a condensed version of the Tcl script:

open_hw
connect_hw_server
current_hw_target [get_hw_targets *]
refresh_hw_device [get_hw_devices]
set_property PROGRAM.FILE [your_bitstream_file.bit] [get_hw_devices [get_property PROGRAM.HW_CFGMEM [get_hw_devices]]]
program_hw_cfgmem -force

Make sure to replace [your_bitstream_file.bit] with the actual path to your bitstream file.

Agnesbartlett:

--- Quote from: Agnesbartlett on September 13, 2023, 02:28:09 PM ---Hello,

To load a bitstream into the flash memory of an S7Mini FPGA using a Tcl script in Vivado, you typically follow these steps:

Generate the Bitstream File:

Use Vivado's GUI or Tcl commands to generate the bitstream file (.bit) as you normally would. You mentioned that you can generate a bit file using write_bitstream. This bitstream file is the configuration data that you will eventually load into the flash memory.
Select the Appropriate Flash Device:

In Vivado, select the appropriate flash device for your S7Mini board. You mentioned the n25q64-3.3v-spi-x1_x2_x4 flash device, which seems suitable if it matches the flash chip on your board. Verify this information with your board's documentation.
Initialize the Flash Configuration:

You'll need to initialize the flash memory with the bitstream file. This is typically done using the "Initialize Memory" feature in Vivado. You can use Tcl commands for this purpose.

open_hw
connect_hw_server
current_hw_target [get_hw_targets *]
refresh_hw_device [get_hw_devices]
set_property PROGRAM.FILE [your_bitstream_file.bit] [get_hw_devices [get_property PROGRAM.HW_CFGMEM [get_hw_devices]]]
program_hw_cfgmem -force
Replace [your_bitstream_file.bit] with the path to your generated bitstream file. mcdvoice

Program the Flash:

Use the program_hw_cfgmem Tcl command to program the flash memory with the bitstream.
Verify the Configuration:

After programming the flash, you should verify that the configuration was successful.
Here's a condensed version of the Tcl script:

open_hw
connect_hw_server
current_hw_target [get_hw_targets *]
refresh_hw_device [get_hw_devices]
set_property PROGRAM.FILE [your_bitstream_file.bit] [get_hw_devices [get_property PROGRAM.HW_CFGMEM [get_hw_devices]]]
program_hw_cfgmem -force

Make sure to replace [your_bitstream_file.bit] with the actual path to your bitstream file.

--- End quote ---


May be this information helps you.



ralblas:
Thanks, that helps, but there are a few things to mention (apart from missing "open_hw_target" in your script).
Programming the flash is only possible with a file with extension .bin.
But write_bitstream only can generate a file with extension .bit.
Just renaming helps, but it's kind of strange; it suggests that another step is needed to convert the .bit file into a .bin file?
Anyway, I did load the renamed file into the flash which did work, after a boot_hw_device it indeed loads the program from flash to fpga.
And it does load the progam from flash after power-up!

Thanks,
Rob.


JH:
Hi,
you must generate mcs file which includes your bitstream.
br
John

Navigation

[0] Message Index

[#] Next page

Go to full version