12-19-2019 04:32 AM
There is a 6MHz external pulse that i need to feed to a counter and count the number of pulses per second(once system is fully ready the 6MHz is expected to very and i want to detect the variation) and send(number of pulses per second) to PS for further work. The counter is to run in PL and i have a application running on linux in PS that will use this data further.
I am using Xilinx Zynq 7000 - XC7Z020. Using complete development board from iwave SoM with carrier board.
Vivado PL Image:
Please find the counter IP that i have just used.
I know its incomplete but not able to figureout where the output of the counter is to be connected to; so i can read from Linux running in PS.
The linux is loading properly and everthing work fine form the linux front.
I am not able to figure out how to read the output of the counter in Linux which is running in PS. Can some one please help with this?
01-06-2020 08:21 AM
There are axi timers that you can use in the IP catalog. Anyway, for your custom IP. How do you want to use the data? do you want this to be an interrupt? If so, then you can connect this to the interrupt controller on the PS (but make the output port type interrupt). Or, you can just input this over the GPIO also.
01-06-2020 09:40 AM
I plan to implement a counter in the PL and output count value every 250ms to a BRAM or OCM which can be read from the linux running on PS. The problem is i am not sure how to write the output of counter to BRAM or OCM i mean what blocks to use in Vivado to do so. On the other hand which device drivers to use in Linux for reading. In betweel also have lot of questions regarding the process of implementation in terms of building the OS for doing this.
01-06-2020 10:35 AM
The create or import wizard in vivado will create the IP shell with an AXI interface. You should start with this and update the rtl with your custom code to increment the register here.
You can then use a UIO driver to read from you IP