Difference between revisions of "BeagleBoard/GSoC/SynchronousDataCollectionPRU"
m (update author information for GSoC 2018) |
(add description) |
||
Line 29: | Line 29: | ||
===Description=== | ===Description=== | ||
+ | As written in the idea list, the goal of this project is to give [https://github.com/abhishek-kakkar/BeagleLogic/wiki BeagleLogic] the ability to sample Synchronous data. | ||
− | ==== | + | ====Synchronous Measurement and Asynchronous Measurement==== |
− | The | + | Basically signals are transmitted in two ways: Synchronous transmission and Asynchronous transmission. The current implementation of BeagleLogic samples the input signals in a Asynchronous way. And that could cause a data loss if the sampling rate is not set correctly (referring to Sampling theorem should the sampling rate at least the double frequency of the signal). When one wants to measure a signal of higher speed (>100 MHz, e.g. DDR, PCI), it is not possible to prevent data loss without using Synchronous sampling. In Synchronous sampling mode BeagleLogic would enable the engineer to view actual the signal the devices would receive, which is very useful for software debugging. |
− | + | ====PRU and EGPIO==== | |
+ | [http://beagleboard.org/pru PRU] is the additional component of AM335x, which is intended for offloading real time tasks from the main processor. The main feature of PRU is, that it performs instructions in determined cycles. | ||
− | + | BeagleLogic [http://theembeddedkitchen.net/beaglelogic-building-a-logic-analyzer-with-the-prus-part-1/449 utilizes] the PRUs on the BeagleBone processor AM3358 to perform high speed measurement, one for sampling data (PRU1), the other for pushing data to DDR RAM (PRU0). As written in the [https://github.com/beagleboard/am335x_pru_package/blob/master/am335xPruReferenceGuide.pdf AM335x PRU-ICSS Reference Guide], PRU has a special type of GPIO, named Enhanced GPIO, whose GPI can work in three mode: Direct Connection Mode and 16-Bit Parallel Capture Mode as well as 28-Bit Shift Mode. The project will allow user to change the GPIO working mode between Direct Connection Mode (for Asynchronous measurement) and 16-Bit Parallel Capture Mode (for Synchronous measurement). | |
− | |||
− | |||
− | PRUs | ||
− | + | [[File:EGPIO Parallel.png|thumbnail|EGPIO Block Diagram]] | |
− | |||
− | + | ====Implementation==== | |
− | |||
− | * | + | Currently BeagleLogic [https://github.com/abhishek-kakkar/BeagleLogic/blob/3cea157d312a685547a2ca9aa66cefacd1fd2cee/kernel/beaglelogic.c#L1262 loads] firmware to PRUs via [https://www.kernel.org/doc/Documentation/remoteproc.txt Remote Processor Framework]. As already mentioned, BeagleLogic [https://github.com/abhishek-kakkar/BeagleLogic/blob/3cea157d312a685547a2ca9aa66cefacd1fd2cee/firmware/beaglelogic-pru1-core.asm#L60 uses] Direct Connection Mode to perform internal clock triggered sampling. The project should |
− | + | ||
+ | * update the firmware code of this two PRUs (PASM) | ||
+ | * add a new sysfs attribute in the BeagleLogic kernel module to allowing changing sampling mode (C) | ||
+ | * update test app (C) | ||
+ | * update web backend (Node.js and Go) | ||
+ | * update web app (HTML and javascript) | ||
===Timeline=== | ===Timeline=== | ||
− | |||
− | + | ===Experience and approach=== | |
− | |||
− | + | In 5-15 sentences, convince us you will be able to successfully complete your project in the timeline you have described. | |
− | |||
− | + | Graduated as bachelor in 2016 for Measurement, Control Technique and Instrumentation at Harbin Institute of Technology, China, I decided to continue my master in Germany. After language courses and tests, I got admitted into TU Darmstadt for Electrical and Computer Engineering (Elektrotechnik und Informationstechnik), which begins at 01. Apr 2018. | |
− | |||
− | + | I have fundamental knowledge about measurement and instrumentation, including measurement error, sampling theorem, structure of an electrical instrument and so on. | |
− | |||
+ | I have experience with ARM (Cortex-M4, Cortex-M0+) and FPGA (Cyclone IV). I can implement DMA or make use of other peripherals from Cortex-M0+ independently. | ||
− | + | I also have experience in [https://github.com/hjhee/HOJ ACM-ICPC] (Gold, 2015, Asia Regional Shanghai Invitational), in which I've improved my ability to code in C. I've written an [https://github.com/hjhee/tiebaSpider crawler] in Go. I also have experience with Node.js and is familiar with [https://github.com/hjhee/gas_fEnd Angular]. | |
− | |||
− | + | I'm good at reading technical document, debugging software and solving hardware problems. | |
− | |||
− | |||
− | + | ===Contingency=== | |
− | |||
− | + | What will you do if you get stuck on your project and your mentor isn’t around? | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Benefit=== | ===Benefit=== | ||
− | |||
− | + | If successfully completed, what will its impact be on the BeagleBoard.org community? Include quotes from BeagleBoard.org community members who can be found on http://beagleboard.org/discuss and http://bbb.io/gsocchat. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ===Suggestions=== | |
− | + | Additionally I think the project should also consider utilizing the EDMA controller for data transmission. Because as another GSoC project ([https://elinux.org/BeagleBoard/GSoC/BeagleBone_PRU_DMA BeagleBone PRU DMA]) suggested, this allows PRU0 to perform some logic. For example the user can specify some trigger conditions like: "a falling edge on pin B when pin A is high", or "after 5 rising edges on pin C when pin D is high and pin E is low" and so on. These conditions is originally [http://theembeddedkitchen.net/beaglelogic-building-a-logic-analyzer-with-the-prus-part-1/449 suggested] by the author of BeagleLogic. PRU0 can be used in this situation as a state machine, and only request an Interrupt when the conditions are met. |
Revision as of 04:21, 4 March 2018
BeagleBone synchronous data collection
IRC Nick: hjhee
Student: Jianhang He
Mentors: Hunyue Yau , Kumar Abhishek
Code: https://github.com/hjhee/GSoC_SynchronousDataCollectionPRU
Wiki: http://elinux.org/BeagleBoard/GSoC/SynchronousDataCollectionPRU
Status
This project is currently just a proposal.
Proposal
About me
IRC: hjhee
Github: https://github.com/hjhee
School: Technische Universität Darmstadt
Country: Germany
Primary language: Chinese
Typical work hours: 17-22 (CET)
About my project
Project name: BeagleBone-based Synchronous Data Collection
Description
As written in the idea list, the goal of this project is to give BeagleLogic the ability to sample Synchronous data.
Synchronous Measurement and Asynchronous Measurement
Basically signals are transmitted in two ways: Synchronous transmission and Asynchronous transmission. The current implementation of BeagleLogic samples the input signals in a Asynchronous way. And that could cause a data loss if the sampling rate is not set correctly (referring to Sampling theorem should the sampling rate at least the double frequency of the signal). When one wants to measure a signal of higher speed (>100 MHz, e.g. DDR, PCI), it is not possible to prevent data loss without using Synchronous sampling. In Synchronous sampling mode BeagleLogic would enable the engineer to view actual the signal the devices would receive, which is very useful for software debugging.
PRU and EGPIO
PRU is the additional component of AM335x, which is intended for offloading real time tasks from the main processor. The main feature of PRU is, that it performs instructions in determined cycles.
BeagleLogic utilizes the PRUs on the BeagleBone processor AM3358 to perform high speed measurement, one for sampling data (PRU1), the other for pushing data to DDR RAM (PRU0). As written in the AM335x PRU-ICSS Reference Guide, PRU has a special type of GPIO, named Enhanced GPIO, whose GPI can work in three mode: Direct Connection Mode and 16-Bit Parallel Capture Mode as well as 28-Bit Shift Mode. The project will allow user to change the GPIO working mode between Direct Connection Mode (for Asynchronous measurement) and 16-Bit Parallel Capture Mode (for Synchronous measurement).
Implementation
Currently BeagleLogic loads firmware to PRUs via Remote Processor Framework. As already mentioned, BeagleLogic uses Direct Connection Mode to perform internal clock triggered sampling. The project should
- update the firmware code of this two PRUs (PASM)
- add a new sysfs attribute in the BeagleLogic kernel module to allowing changing sampling mode (C)
- update test app (C)
- update web backend (Node.js and Go)
- update web app (HTML and javascript)
Timeline
Experience and approach
In 5-15 sentences, convince us you will be able to successfully complete your project in the timeline you have described.
Graduated as bachelor in 2016 for Measurement, Control Technique and Instrumentation at Harbin Institute of Technology, China, I decided to continue my master in Germany. After language courses and tests, I got admitted into TU Darmstadt for Electrical and Computer Engineering (Elektrotechnik und Informationstechnik), which begins at 01. Apr 2018.
I have fundamental knowledge about measurement and instrumentation, including measurement error, sampling theorem, structure of an electrical instrument and so on.
I have experience with ARM (Cortex-M4, Cortex-M0+) and FPGA (Cyclone IV). I can implement DMA or make use of other peripherals from Cortex-M0+ independently.
I also have experience in ACM-ICPC (Gold, 2015, Asia Regional Shanghai Invitational), in which I've improved my ability to code in C. I've written an crawler in Go. I also have experience with Node.js and is familiar with Angular.
I'm good at reading technical document, debugging software and solving hardware problems.
Contingency
What will you do if you get stuck on your project and your mentor isn’t around?
Benefit
If successfully completed, what will its impact be on the BeagleBoard.org community? Include quotes from BeagleBoard.org community members who can be found on http://beagleboard.org/discuss and http://bbb.io/gsocchat.
Suggestions
Additionally I think the project should also consider utilizing the EDMA controller for data transmission. Because as another GSoC project (BeagleBone PRU DMA) suggested, this allows PRU0 to perform some logic. For example the user can specify some trigger conditions like: "a falling edge on pin B when pin A is high", or "after 5 rising edges on pin C when pin D is high and pin E is low" and so on. These conditions is originally suggested by the author of BeagleLogic. PRU0 can be used in this situation as a state machine, and only request an Interrupt when the conditions are met.