Adam Tayloy Plays MicroZed Series 59: Zynq and PicoBlaze Chapter 4

In the previously released MicroZed series of blogs, we built a Zynq-based system that connects two PicoBlaze processor cores to the PS portion of Zynq by using dual-port RAMS and BRAM (block RAM) controllers. Now we will Learn how to implement a program that updates the PicoBlaze processor stored in dual-port RAM.

First, under the control of the execution program, how do we implement a free storage PicoBlaze program including software applications and then download them to the CPU for execution.

When we define the Zynq system, a key point is to use the two EMIO ports of the Zynq SoC's PS section to control the reset input signal of the PicoBlaze core. (We need to provide a reset input for each PicoBlaze to implement independent reset of the two cores.) When we update the program memory of the processor, the two reset pins allow us to reset each PicoBlaze processor module independently. . When the processor's program memory space is in an indeterminate or mixed state, the processor cannot continue to execute the program.

The basic algorithm for updating the PicoBlaze code in an instantiated processor is as follows:
1. Reset the pin for the processor to be updated
2. Update the block RAM space of the processor by writing from the Zynq PS to the BRAM controller
3. Once the BRAM write is completed, cancel the processor reset, allow the processor to restart and execute the new program code.

Although the above steps are simple, first we must generate the new PicoBlaze program in the correct format, and it can also be included in the program code of the ARM Cortex-A9 MPCore processor in the Zynq SoC PS section. The easiest way to solve this problem is to write the new program as an array into the C code of the ARM processor. In order to implement this function, we have to deal with the hex format file generated by the PicoBlaze assembler. We can handle it manually but it is awkward for large programs, so I wrote a simple TCL script to convert the hex format file. For C header files, this header file can be added to your build environment. (This script and all the programs I have uploaded to Github will be noted at the end of this blog)

Adam Tayloy Plays MicroZed Series 59: Zynq and PicoBlaze Chapter 4

With the correct format file in place and included in the ARM Cortex-A9 MPCore program, we can easily read the contents of the array and write it to the appropriate BRAM. Because we are using 32-bit addresses, every four bytes are independently addressable, and every four bytes are a separate address space. For example, the first 32-bit address is 0, the second address is 4, and the third address is 8, so that it continues.

We can use the following function to write the content to BRAM:
XBram_WriteReg(PICO_0_BASE, ram_addr, test2[read_out]);

We can use the for loop to traverse the entire array, as shown in the following image:

Based on the system examples we created earlier, using these structures, we can simply and quickly write a simple program that allows us to update the program storage space of any PicoBlaze kernel. The function of this blog's program implementation is handled by each PicoBlaze. The controller controls their respective LEDs to flash at a fast or slow frequency.

Adam Tayloy Plays MicroZed Series 59: Zynq and PicoBlaze Chapter 4

Of course, this does not mean that we can download new image files to the PicoBlaze processor during processor execution. If we want to implement such a function, we must write a slightly different program and TCL script. We will be in the next blog. Introduced in the middle.

I have about 60 blogs. I think if there is a Git Hub storage space, it would be a very good idea, so I have created one, the address is "https://github.com/ATaylorCEngFIET/MicroZed-Chronicles", I The code of the previous blog will be uploaded, but now only the source code of this blog is in this storage space.

IGET

The disposable ecig arms race continues, with ever larger devices continuing to hit the market. The newest disposable juggernaut is the IGET XXL, with a nic strength of 5 percent, this device holds over five times more nic salts than a standard disposable bar and approximately nine times more than a Juul Pod. What this means is written boldly on the packaging for all to see: 1800 puffs, a number that will vary depending on how long your average inhale is.

Disposable E-Cigarette ,Disposable Light Vape,Disposable Device Pen,Vape Pod Smoke

Shenzhen Ousida Technology Co., Ltd , https://www.osdvape.com

This entry was posted in on