Difference between revisions of "GSoC 2018 Proposal: Update PRU Python loader--Bill Morrisson"

From eLinux.org
Jump to: navigation, search
(About your project)
((2 weeks))
 
(39 intermediate revisions by the same user not shown)
Line 20: Line 20:
 
This project will be done in 3 deliverables.<br>
 
This project will be done in 3 deliverables.<br>
  
1 Implement remoteproc function calls in PyPRUSS.<br>
+
1 Add remoteproc support in PyPRUSS.<br>
2 Implement RPMsg functions.<br>
+
2 Add DMA support in PyPRUSS.<br>
 
3 Update PyPRUSS to newer images<br>  
 
3 Update PyPRUSS to newer images<br>  
  
 
{| class="Timeline"
 
|-
 
!Week !! Plan
 
|-
 
| Community <br>bonding<br>period|| Refine the weekly plan with suggestions from the mentor and community.<br>
 
Familiarise myself with the processor that is to be used for the project.<br>
 
Identify the potential bottlenecks in the project and allocate more time for those tasks.
 
 
|-
 
| 1 ||  Install flite,start developing an efficient voice recognition system
 
|-
 
| 2 ||  Implementing the voice recognition system on pocketbeagle
 
|-
 
 
| 3 || Implement basic "spell the word" game in python
 
|-
 
| 4||  Implement level 2 game and documenting the finished code for Phase-1 evaluation
 
|-
 
| 5 || Improve the code based on feedback after phase-1 evaluation.<br>
 
Implement level 2 game.
 
|-
 
| 6 || Develop  level 2 game
 
|-
 
| 7 || Build Chatbot with feedback feature
 
|-
 
| 8 || Develop the Chatbot into a Teaching aid and document the finished work for phase-2 evaluation
 
|-
 
| 9 || Improve the Chatbot features based on feedback after phase-2 evaluation
 
|-
 
| 10 || Make a demo adding a keyboard,OLED display and an audio IN/OUT
 
|-
 
| 11 || BUG fixing and documentation
 
|-
 
| 12 || BUG fixing and documentation for final evaluation(phase-3)
 
|}
 
  
  
Line 67: Line 31:
 
''Github'': https://github.com/spiritus72<br>
 
''Github'': https://github.com/spiritus72<br>
 
''School'': Bishop's University, Sherbrooke, Quebec<br>
 
''School'': Bishop's University, Sherbrooke, Quebec<br>
''Country'': Canada<br>
+
''Country'': Cameroon/Canada<br>
 
''Primary language'' (We have mentors who speak multiple languages): English<br>
 
''Primary language'' (We have mentors who speak multiple languages): English<br>
 
''Typical work hours'' (We have mentors in various time zones): 8:00 AM to 05:00 PM UTC<br>
 
''Typical work hours'' (We have mentors in various time zones): 8:00 AM to 05:00 PM UTC<br>
Line 79: Line 43:
 
===Description===
 
===Description===
  
This project is to update PyPRUSS such that it can loaded with remoteproc support to enable developers to program PRUs using a Python wrapper when Python is be the better choice for the implementation on the said PRUs at hand. PyPRUSS has been using the UIO interface(with the modprobe() function specifically) to be able to load the firmware but it comes with its own problems due to the fact that it's very old and not does not assume newer BeagleBone images. It was primarily focused on the earlier Angstrom firmware for the BeagleBone Black.<br>
+
This project is to update PyPRUSS such that it can loaded with remoteproc support to enable developers program PRUs using a Python wrapper when Python is be the better choice for the implementation on the said PRUs at hand.<br>
The current proposal for the project aims at enabling PyPRUSS to use remoteproc to  
+
PyPRUSS has been using the UIO interface with the modprobe() function specifically to be able to load the firmware but it comes with its own problems due to the fact that it's very old and not does not assume newer BeagleBone images. It was primarily focused on the earlier Angstrom firmware for the BeagleBone Black.<br>
 +
The current proposal for the project aims to enable the PRUs to be loaded with firmware using a Python API, move examples, show RPMsg functions and to add support for newer BeagleBone images to PyPRUSS.<br>
 +
Remoteproc support will be implemented in PyPRUSS such that the various controls of the PRUs will be done with Python by trying to follow the same way the sysfs interface is exposed to the Userspace to start/stop the PRUs cores as well as specify the firmware to load. Then RPMsg functions will be shown by "catching" the buffers that will be provided by the remoteproc module during PRU firmware loading. This will be a major advantage for all developers who have a larger project already done in Python and are wanting to have a specific part done through PyPRUSS.
 +
 
 +
==Time-line==
  
 +
=====(4 weeks)  Community Bonding=====
 +
Initiating communication with mentors, better familiarization with the BeagleBone and the PyPRUSS source code, isolating remoteproc functions that will be used for PRU controls and ensure code compiles within the source tree.
  
 +
=====(2 weeks)=====
 +
Enable PyPRUSS is updated with remoteproc support. Test and ensure that it works well and can be used through the python wrapper.
  
aims to enable the PRUs to be loaded with firmware using a Python API, move examples and show RPMsg functions and to add support for newer BeagleBone images to PyPRUSS.
+
=====(2 weeks)=====
 +
Start adding DMA support.
  
 +
===== (5 days) 1st evaluation=====
 +
Review of what has been done, continued testing of the User and Implementors API functions.
  
 +
=====(3 weeks)=====
 +
Add support for RPMsg functions and selected BeagleBone images.
  
 +
=====(5 days) 2nd evaluation=====
 +
Test and review of the RPMsg functions.
  
 +
=====(3 weeks)=====
 +
Improvements and fixes on the previous implementations done, move examples/ to remoteproc. Code cleanup, documentation and final test coverage.
  
 +
=====(9 days) Final Evaluation=====
  
This project motto is to implement an updated "Speak&Spell"using PocketBeagle for modern day preschoolers with improved games/Puzzles and better hardware interfaces like I2C gpio expander.Previously used VF display can be replaced with an OLED touchscreen display and an improved keypad can
+
===Experience===
be used.<br>
 
Current Proposal for the project aims at building an Open Source reproducible Linux Application that can be implemented by downloading the code anywhere for its real time implementation so that it can be promoted for usage in commercial purposes.
 
Since the current Speak&Spell's basic features are not sufficent for present day preschoolers,the updated puzzles will cater their present needs in improving their verbal skills.Puzzles will be implemented in python in 2 levels.For text to voice generation,a program called 'Flite' will be used.Flite is specially built for embedded systems and has an added advantage of changing to multiple accents and languages.For adding the speech recognition feature (instead of typing the words on keyboard),Pocketsphinx libraries will be used which are light and compatible for Pocketbeagle.
 
  
===Experience and approach===
+
During the Embedded Linux conference 2017 in Prague, I attended a lot of workshops from the Yocto project where I learned how to program on the BeagleBoard. After the conference I played a little bit with the DragonBoard doing some exercises on it.  Being a quick learner, I will be comfortable enough to implement this project on a BeagleBone Black. I am new to the PyPRUSS library so I have been doing research in the background on how to implement the different functionalities on BeagleBone and I can assure I will be able to accomplish at least 2/3 deliverables for this summer if things get tough/rough. I am experienced in Python as I have built various web projects, systems and automation tools with it. I have worked with C on some message parsing mechanism projects. Updating to newer images will not be an issue, the challenging part will be to make sure that loading through Python will not cause any future errors.
I have done projects on Raspberry Pi before and therefore will be comfortable enough to implement this project on a Pocketbeagle.I am quite new to Speech recognition,so I have been doing required background work to implement these functionalities on Pocketbeagle and therefore can assure you
 
that I will be able to complete the Phase-1 in planned time.I had only done some basic projects on python before and therefore planning to spend most of Phase-2 to build the games.Most of the time in phase-3 will be spent on documenting the whole project as it is very essential for it to be reproducible later .
 
  
 
===Contingency===
 
===Contingency===
 
What will you do if you get stuck on your project and your mentor isn’t around?<br>
 
What will you do if you get stuck on your project and your mentor isn’t around?<br>
I will ensure that probability of this happening is less by planning things in advance.I will also check with the community whether they have a backup mentor provision.I will communicate the coding issues with the community or students working on similar projects to see if someone can help.
+
I will ensure that probability of this happening is less by planning things in advance.I will also check with the community whether they have a backup mentor provision.I will communicate the coding issues with the community or students working on similar projects to see if someone can help. I will contact the organisation administrator to talk about the issue and make sure the work is not delayed in the mean time by documenting the finished work.
Else I will contact the organisation administrator to talk about the issue and make sure the work is not delayed in the mean time by  
+
I have a large network of developers of different expertise in different channels, if the community is not able to attend to the issues I have in time I will contact others I know with the experience to help me out of the situation I might have at hand.
documenting the finished work.
 
  
 
===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.<br>  
 
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.<br>  
"Speak&Spell" was more than just a popular kids toy,it should be better described as a blueprint for the devices we use today.Until its invention, real time speech synthesis was defined to be impossible.Implementing and Updating its functionality for the present day kids is a perfect way to celebrate its importance in the development of Signal processing technology.
+
This will benefit the community at large by solving a solution to a problem that was posed by user "pru_python" here: https://www.corecompute.com/beagle/beagle_20180207.html and also every other developer that were having issues using PRUs through a project that uses Python.
  
 
===Suggestions===
 
===Suggestions===
 
Is there anything else we should have asked you?<br>
 
Is there anything else we should have asked you?<br>
I am currently pursuing my Bachelor's degree in Electronics and Communcation Engineering and I am good in C and Python programming.I have no other commitments this summer and can dedicate my entire time for the project.
+
I was recently admitted into a Masters of Science(MS) program in Computer Science, I am good in Python and C programming.I have no other commitments this summer and can dedicate my entire time for the project. Also even though the Google Summer of Code says 20hrs/week for working on the project I will be able to work 40hrs+ due to my interest in this project and to be able to finish with the project before the GSoC timeline ends.

Latest revision as of 17:03, 26 March 2018


Bill M. GSoC Proposal

{{#ev:youtube|Jl3sUq2WwcY||right|BeagleLogic}}


Student: Bill Morrisson Talla
Mentors: Jason Kridner Kumar Abhishek
Code: https://github.com/beagleboard/linux https://github.com/beagleboard/pypruss
Wiki: https://elinux.org/GSoC_2018_Proposal:_Update_PRU_Python_loader--Bill_Morrisson

Status

This project is currently just a proposal.

Proposal

This project will be done in 3 deliverables.

1 Add remoteproc support in PyPRUSS.
2 Add DMA support in PyPRUSS.
3 Update PyPRUSS to newer images



About you

IRC: spiritus
Github: https://github.com/spiritus72
School: Bishop's University, Sherbrooke, Quebec
Country: Cameroon/Canada
Primary language (We have mentors who speak multiple languages): English
Typical work hours (We have mentors in various time zones): 8:00 AM to 05:00 PM UTC
Previous GSoC/Open Source participation: I helped with a little test here but nothing big: https://github.com/oppia/oppia/commits/master?author=spiritus72 Nevertheless I have no major experience but I'm excited to join the open source community.

About your project

Project name: Update PRU Python loader
Task Completion: A "Hello World" application has been created,cross-compiled using GCC-ARM tool chain and executed using QEMU. A Pull request has been generated for the same.Please find the link here.

Description

This project is to update PyPRUSS such that it can loaded with remoteproc support to enable developers program PRUs using a Python wrapper when Python is be the better choice for the implementation on the said PRUs at hand.
PyPRUSS has been using the UIO interface with the modprobe() function specifically to be able to load the firmware but it comes with its own problems due to the fact that it's very old and not does not assume newer BeagleBone images. It was primarily focused on the earlier Angstrom firmware for the BeagleBone Black.
The current proposal for the project aims to enable the PRUs to be loaded with firmware using a Python API, move examples, show RPMsg functions and to add support for newer BeagleBone images to PyPRUSS.
Remoteproc support will be implemented in PyPRUSS such that the various controls of the PRUs will be done with Python by trying to follow the same way the sysfs interface is exposed to the Userspace to start/stop the PRUs cores as well as specify the firmware to load. Then RPMsg functions will be shown by "catching" the buffers that will be provided by the remoteproc module during PRU firmware loading. This will be a major advantage for all developers who have a larger project already done in Python and are wanting to have a specific part done through PyPRUSS.

Time-line

(4 weeks) Community Bonding

Initiating communication with mentors, better familiarization with the BeagleBone and the PyPRUSS source code, isolating remoteproc functions that will be used for PRU controls and ensure code compiles within the source tree.

(2 weeks)

Enable PyPRUSS is updated with remoteproc support. Test and ensure that it works well and can be used through the python wrapper.

(2 weeks)

Start adding DMA support.

(5 days) 1st evaluation

Review of what has been done, continued testing of the User and Implementors API functions.

(3 weeks)

Add support for RPMsg functions and selected BeagleBone images.

(5 days) 2nd evaluation

Test and review of the RPMsg functions.

(3 weeks)

Improvements and fixes on the previous implementations done, move examples/ to remoteproc. Code cleanup, documentation and final test coverage.

(9 days) Final Evaluation

Experience

During the Embedded Linux conference 2017 in Prague, I attended a lot of workshops from the Yocto project where I learned how to program on the BeagleBoard. After the conference I played a little bit with the DragonBoard doing some exercises on it. Being a quick learner, I will be comfortable enough to implement this project on a BeagleBone Black. I am new to the PyPRUSS library so I have been doing research in the background on how to implement the different functionalities on BeagleBone and I can assure I will be able to accomplish at least 2/3 deliverables for this summer if things get tough/rough. I am experienced in Python as I have built various web projects, systems and automation tools with it. I have worked with C on some message parsing mechanism projects. Updating to newer images will not be an issue, the challenging part will be to make sure that loading through Python will not cause any future errors.

Contingency

What will you do if you get stuck on your project and your mentor isn’t around?
I will ensure that probability of this happening is less by planning things in advance.I will also check with the community whether they have a backup mentor provision.I will communicate the coding issues with the community or students working on similar projects to see if someone can help. I will contact the organisation administrator to talk about the issue and make sure the work is not delayed in the mean time by documenting the finished work. I have a large network of developers of different expertise in different channels, if the community is not able to attend to the issues I have in time I will contact others I know with the experience to help me out of the situation I might have at hand.

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.
This will benefit the community at large by solving a solution to a problem that was posed by user "pru_python" here: https://www.corecompute.com/beagle/beagle_20180207.html and also every other developer that were having issues using PRUs through a project that uses Python.

Suggestions

Is there anything else we should have asked you?
I was recently admitted into a Masters of Science(MS) program in Computer Science, I am good in Python and C programming.I have no other commitments this summer and can dedicate my entire time for the project. Also even though the Google Summer of Code says 20hrs/week for working on the project I will be able to work 40hrs+ due to my interest in this project and to be able to finish with the project before the GSoC timeline ends.