1
0
mirror of https://github.com/bmartini/zynq-axis.git synced 2024-09-05 19:19:27 +08:00

24 Commits

Author SHA1 Message Date
Berin Martini
c9bef3cda3 Add module to decode AXI4 Lite bus
The module copies the protocol responses/handling from a Xilinx example.
As such it works but to my eye does not look very efficient.
2015-01-01 21:42:38 -05:00
Berin Martini
859b5d1e81 Add scripts to synthesize bitstream via CLI
This saves us form having to use the Xilinx Vivado GUI.
2014-12-31 20:20:40 -05:00
Berin Martini
d5a798ad41 Create working top file based on system_wrapper.v
The project now generates a bitstream file but only from the build directory
created by the syn-proj-prep script.
2014-12-31 20:03:44 -05:00
Berin Martini
1fb2be25d9 Generate zedboard_axis project top file
Under "Design Sources" right click the "system_i" board design. From the
menu select "Create HDL Wrapper" to generate the system top file for the
project.
2014-12-31 19:54:02 -05:00
Berin Martini
092c03aecb Connect a AXI interconnect to ps7 GP0
Within the "Block Diagram" areas "Diagram" tab select "Add IP". From the list
that appears select "AXI Interconnect".

Double click on the new AXI Interconnect block to customise it. Reduce
the number of master ports to 1.

In the right hand "Signals" tab drag all "Unconnected Clocks" to the
ps7/FCLK_CLK0 Clock Domain (there should be a few).

Connect the AXI Interconnect resets to the ps7 the FCLK_RESET0_N reset.

Click on the "S00_AXI" pin in the new AXI Interconnect and use "Connection
Mode" to connect it to the ps7 GP0 port.

Right click "M00_AXI" pin in the new AXI Interconnect and select "Make
External" from the drop down menu.

Double click the newly created "M00_AXI" external port to customise. Set
protocol as "AXI4Lite".

In "Address Editor" tab, right click "ps7"->"Data"->"Unmapped
Slaves"->"M00_AXI" and select "Assign Address".
2014-12-31 19:47:51 -05:00
Berin Martini
6a91d922d4 Add external axi_(clk|rst_n) ports
In the "Block Design" "Diagram" tab right click and select "Create Port..."
from the drop down menu. In the "Create Port" dialog box name the port
"axi_clk", set its direction to "Output" and type to "Clock".

Click on the FCLK_CLK0 pin on the ps7 block and use the "Connection Mode" to
connect the FCLK_CLK0" to the new "axi_clk" port.

Create another port named "axi_rst_n", direction "Output" and type "Reset".

Click on the "axi_rst_n" port and use the "Connection Mode" to connect it to
the reset tree being used by the axi_dma module (not to FCLK_RESET0_N".
2014-12-31 17:22:22 -05:00
Berin Martini
45573152f3 Add ARM PS to zedboard_axis project
Open the project in the Vivado GUI. In the left hand "Flow Navigator" area
select the "Create Block Design". When prompted for a name, use "system".

A green bar appears at the top of the "Block Design" areas "Diagram" tab
prompting to "Add IP". Select to add ip and from the list that appear select
"ZYNQ7 Processing System" (2nd from the end). Click on the processing systems
block and rename to "ps7" from the "Block Properties". The green bar will now
be prompting you to run "Block Automation", select this and the ps7 will be
reconfigured with the Zedboard defaults.
2014-12-31 17:10:45 -05:00
Berin Martini
f9e481c921 Add empty Xilinx project 'zedboard_axis' 2014-12-31 17:03:43 -05:00
Berin Martini
4b1fcf116b Add bash script to prepare project build directories
Script will copy source code, 3rd party IP and Xilinx project directory
into a scratch directory which it also creates. Script can be invoked
using the following option.

-c  Copy Verilog source code and 3rd party IP to an already existing
    syn/scratch/ directory. Perform no other functions.

-h  Print this help info.

-l  Symbolically link project files into the scratch dir instead of
    copying them. Any changes to these file during building will thus be
    propagated back into the repo.

-L  Symbolically link project directory into the scratch instead of
    copying it. This takes precedents over the '-l'.
2014-12-31 15:34:29 -05:00
Berin Martini
9149aaba29 Add bash script to prepare an empty Xilinx project
Running the script will create an empty Xilinx project directory.
Optionally takes the project name as an argument. When no project name
is passed it, the script defaults to 'tmp'.
2014-12-31 15:34:29 -05:00
Berin Martini
c943552e52 Add cfg bus read/write function to interface lib
Test new functions in test-cfg application.
2014-12-31 13:30:36 -05:00
Berin Martini
7999afc2e2 Add gitignore file to vim swap file and others 2014-12-31 13:18:54 -05:00
Berin Martini
f553747076 Add exit function to interface library
Include usage of new exit function in the test-cfg application.
2014-12-31 13:16:19 -05:00
Berin Martini
bf25c5fce7 Add test app that uses the interface library 2014-12-31 12:10:54 -05:00
Berin Martini
11ec4ddca7 Stub of an axis interface library
Attempts to mmap the axis AXI4Lite memory region.
2014-12-31 11:49:12 -05:00
Berin Martini
fc6b0b2dc6 Allocate CMA memory on driver probe
This should allow for a program to mmap to the CMA memory and thus allow the
CPU to read & write arrays that the FPGA can DMA to and from.
2014-12-31 11:15:11 -05:00
Berin Martini
e25e752d86 Add nb of iomem in private data struct
This number can then be used to release the I/O memory regions that have
been requested in the probe function. This will thus allow for other
types of mappable memory to be exposed by the driver.
2014-12-31 11:15:11 -05:00
Berin Martini
72a2c01bfe Simplify uio error path by using devres functions
Use devm_kzalloc function to simplify driver error path. This function
is a per driver/device memory management function that will auto free
any memory when driver is released.
2014-12-31 11:15:11 -05:00
Berin Martini
aaee3f17df use dev_get_platdata() wrapper function
As per the kernel commit (08cb2e2148f7633e05ad211cff9234acca60a194).
2014-12-31 11:15:11 -05:00
Berin Martini
84dfb46e36 Turn off checking of_node for irq interrupts
Currently do not have interrupts defined in hardware and thus they are
not defined in the devicetree. Since the code/kernel thinks there should
be interrupts defined in the devicetree node it throws an error when
there is not. There should be a better way to do this but this works for
now.
2014-12-31 11:15:11 -05:00
Berin Martini
81ef8579e2 Update irq code to that in 3.15 uio_pdrv_genirq.c
There wass some SMP concurrency issue and some initializing bugs.
2014-12-31 11:15:11 -05:00
Berin Martini
8f98a55588 Add indent script for linux kernel code formatting
Used to keep the device driver formatted correctly.
2014-12-31 11:15:11 -05:00
Berin Martini
537c0160be Add udev rules file to util directory
This rules file gets copied into the udev system directory so that when
the axis uio driver is loaded a device file is created that users
applications can access.

sudo cp util/80-axis.rules /etc/udev/rules.d/
2014-12-31 11:15:10 -05:00
Berin Martini
7ad84512e8 Import zynq-uflow uio driver with name changers
Use the zynq-uflow driver as the base to develop the new platform.
2014-12-29 13:57:04 -05:00