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

40 Commits

Author SHA1 Message Date
Berin Martini
852e507af2 Bug fix: axis burst size wr/rd values
By setting the values as larger then they should be the data was over
writing itself in memory.
2015-01-07 14:13:29 -05:00
Berin Martini
19390ccca8 Bug fix: axis port list variable sizes
There was a miss-match that was giving warnings but as the variables
were not used there were no errors.
2015-01-07 12:53:31 -05:00
Berin Martini
d1db9ce3b3 Parametrize address step size in axis_addr
Had been assuming that the AXI word width was 256 bits and thus the
address would step 32 bytes * burst_length.
2015-01-07 11:43:56 -05:00
Berin Martini
f435570745 Connect axis read to cfg reg
This *should* allow for the axis port to read data the the memory and
transmit the read value to the host via the cfg bus.
2015-01-06 17:13:34 -05:00
Berin Martini
7e6ecfbb22 Auto assign address to HP0
Done in the "Address Editor" tab via the Block Design.
2015-01-06 16:14:53 -05:00
Berin Martini
c31b303289 Add app to read raw /dev/mem for debugging
This allows for direct access by the host to the same memory region as the AXIS
ports are accessing. Should be useful for debugging.
2015-01-05 18:05:31 -05:00
Berin Martini
624e40c03e Connect axis wr port to cfg registers
For debug purposes the axis is connected to the cfg registers so data
patterns can be written to the system memory.
2015-01-04 19:36:02 -05:00
Berin Martini
04f7ccd2a2 Instantiate axis module & attache to HP0
Setup as a simple loopback system.
2015-01-03 05:21:13 -05:00
Berin Martini
e881359f25 Connect HP0 to zedboard top file
Currently not doing anything.
2015-01-02 20:23:57 -05:00
Berin Martini
72bb1b73c6 Add High Performance port to zedboard_axis project
Make this port external to the design and thus accessible to the project
top file.
2015-01-02 17:32:39 -05:00
Berin Martini
d9d8540a6c Add axis and related modules
The axis module instantiates the AXI read and write path modules. It
performs a simple stream over the AXI port interface with no error
checking. It is configured by first addressing the module and then
sending a physical memory address and the number of streaming words to
be written.

The streaming interface is not exactly like the Xilinx stream interface
in that the data is always valid when the valid flag is high, the ready
flag being low does not invalidate the data but is used to signal up
stream to stop sending data. Down stream has a buffer able to absorb to
incoming valid data until such time as up stream stop sending.
2015-01-02 17:32:39 -05:00
Berin Martini
3370f1bd32 Add bash script to run testbenchs
This script copies all Verilog file from the hdl directories into a
'sim' directory. It then uses the Icarus Verilog simulator to run the
desired modules testbench.
2015-01-02 17:32:39 -05:00
Berin Martini
ac07bb9114 Add synchronous FIFO & testbench
A simple FIFO, with synchronous clock for both the pop and push ports.
2015-01-02 17:32:39 -05:00
Berin Martini
8a62d2ba82 Bug fix: axi4lite_cfg port list definition 2015-01-02 17:31:35 -05:00
Berin Martini
8082ee8df7 Tab completion script for zynq-axis repo scripts
Move the "util/zynq-axis-completion.bash" file into your home directory
and save it as a 'dot' file. Then add the code snippet in the header of
the file into your dot bashrc file.
2015-01-02 13:03:51 -05:00
Berin Martini
8c202b969e Merge branch 'hardware-project'
Add a Zedboard hardware project that implements a register loopback that
can be used to test the current driver and library.
2015-01-01 21:47:44 -05:00
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