The wizard is very simple. I choose AXI Lite and select (for no particular reason) 7 registers. The default is that they are 32 bits wide. When I get done I just save the IP in my own directory. This is also a default:
/home/tom/vivado/ip_repo/s9_leds_1_1 /home/tom/vivado/ip_repo/s9_leds_1_1/hdlThe interesting thing is the pair of verilog files in the "hdl" directory:
-rw-r--r-- 1 tom tom 15672 Dec 3 20:34 s9_leds_v1_0_S00_AXI.v -rw-r--r-- 1 tom tom 2213 Dec 3 20:34 s9_leds_v1_0.v
Poking around in these, I find "slv_reg0" thru "slv_reg6" as names for the seven registers I asked for. Note that when reading these files, the comments refer to "reading the registers", this means the read is coming from the AXI bus (i.e. the PS). Writing is just the opposite, note that on reset all registers are "written" with zeros.
The next step will be learning how to edit these and also to add some verilog files of our own.
However, I tried the experiment of starting a new project and seeing if the "+" button would find s9_leds and it failed, so something needs to be done to add the "ip_repo"
Here is what to do.
A significant puzzle for later will be learning how to discover the addresses to access the registers we have just created.
Note that at the top of the block diagram are tabs for "Address Editor" and "Address Map". These yield the desired information.
My block (nothing but the boilerplate) gets assigned a 64K block at 0x43C0_0000. In other words from 0x43c0_0000 to 0x43c0_ffff (all this for 7 registers). This can be found in both the "Address Editor" and "Address Map" tabs, It also appears in a line below in the "Tcl console" as:Slave segment '/s9_leds_0/S00_AXI/S00_AXI_reg' is being assigned into address space '/processing_system7_0/Data' at <0x43C0_0000 [ 64K ]>.
slv_reg0 <= 32'hdeadabcd;I create the HDL wrapper. I gives a bunch of warnings telling me to upgrade the IP for my gadget.
/u1/home/tom/vivado/s9_junk2/s9_junk2.runs/impl_1/design_1_wrapper.bitI add some code to the Kyu Zynq port I am working on, copy the bitstream so it will get loaded, recompile and boot it up and I see:
AXI reg 0 = deadabcdSuccess! This wasn't a total nightmare like I thought it might have been. Another little experiment followed. I could write to register 0, which overwrote the reset value (as it should) and was then able to read back the value I had written. I tried the same thing for register 1, the only difference being tht the reset value there was zero, and of course that worked also.
It would easily be possible to modify the IP so that registers were read only and writes would be ignored. We could also have write only registers, but I hardly see any point in that.
pg144-axi-gpio.pdf pg082-processing-system7.pdf
Tom's Computer Info / tom@mmto.org