Shell like program to run on the, bare-metal, Zynq while experimenting. The idea is that it will provide an easy path to upload data, start computations on the FPGA and inspect results.
- Create arrays.
- Show contents of arrays.
- Load data into an array over the serial connection to the shell running on the Zynq. Each line of text transmitted will be interpreted by the shell as a given type. I like to use screen as terminal that has the capability to paste in larger amounts of data.
- Read/Write to arbitrary memory locations while interpreting what is read/written as a C-type (int, unsigned int, float).
- Load and store data from/to files on SD card.
- Program the FPGA using the devcfg driver with a bitstream loaded into an array.
- Test that programming the FPGA with a bitstream from memory works.
- Figure out more exactly where and when to flush caches and what ranges (useful when the next entity to read that value is the FPGA).
I currently build ZynqShell by creating a "hello world" application in Vivado SDK and replace the helloworld.c file there with the zynqshell.c file (ln -s to the file in the repo clone).
Note that this is probably different for other boards, so consult the datasheets.
- Create a bif file, example below.
- Source your VIVADO configuration.
- Then run 'bootgen -image my.bif -w -process_bitstream bin'
my.bif
bitToBin:
{
design_1_wrapper.bit
}
The tag "bitToBin" seems that it can be set to just about anything without any difference. Within the brackets specify the name of your bit file (in this example design_1_wrapper.bit).
Example: "CTRL+a :" means "CTRL" and "a" together, followed by an ":". This particular command brings up a prompt where additional commands can be given:
- "quit" exists from screen
- "readreg regname filename" reads a file into a named "regname" storage location in screen.
- "paste regname" pastes the contents of the named "regname" storage location into the screen session.
The readreg and paste commands can be used to send the contents into a ZynqShell array when using the ZynqShell loadArray command.
- "help" displays screen help.