[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Assembly class HERE

Assembly class HERE

Assembly class HERE

Postby DonQuichotte » Sat May 21, 2016 10:26 pm

Hello

I'm opening this topic for teaching Epiphany assembly - interfaced to C - to whoever wants.
Teaching and being teached: I am a beginner too, and there are lots of questions I still cannot answer.
I think teaching will help me reinforce my learning and may help a few others, hopefully.

I intend to start next week.
The subject is "writing recursive functions in assembly".
:o OK I know... some of you already whisper, that's two hard problems...
I agree, :roll: you'd better NOT begin with this topic :mrgreen:
As Andreas said, and I for the most part agree: there are lots of high quality assembly code in the Parallella examples.
I particularly appreciated e_fft_asm.S... so have a nice reading :) and you're welcome any time.

Why or when should we write in assembly ?
Apart from speed concerns: no way, it's not productive, not portable, not readable, etc.
Speed... when I bought the Parallella I had just speed (per watt) as expectation.
So if I can cut down the execution time by 10 %, I'm in.
The fact is, the assembly version we'll see next week is about 25 % smaller than the C compiler's output.

And I am quite convinced everybody should "think assembly" at least once to improve its C source code:
looking at the C compiler's output helps you reorganize data more efficiently or find out where it is not optimal yet (it's a robust but young compiler).
Look at __builtin_ctz output for example, or think about a 64-bit addition.

That's why I'm opening a second topic, let's call it "Assembly snippets".
It may give hints for the compiler guys, or we can simply integrate these snippets into our own source files.

Homework ;) for next week:
- read the docs if not done - especially the instruction set in the architecture reference on
Recommended: install esdk 2015.1 on your regular computer if possible (Linux x86-64 esdk for example) - even if it's several hours to get it,
you'll get nice tools to debug things faster than on the Parallella itself.
The esdk doc is fairly good.
User avatar
DonQuichotte
 
Posts: 46
Joined: Fri Apr 29, 2016 9:58 pm

Re: Assembly class HERE

Postby Olaf » Sun May 22, 2016 12:41 pm

I think it would be interesting to have an explanation about the RISC used in Parallella.
I have no background in RISC

Parallella Desktop model
So it has a Zynq SOC (FPGA + ARM A9)
And a Epiphany III processor.

This ARM A9 is a Cortex-A9 Processor:
The ARM A9 is basically a ARMv7-A 32-bit that has more added to it.

The Epiphany III is a second co processor.
It is also a RISC architecture but it has a different assembler instruction set than the ARM A9.

The ARM A9 (2 cores version) in Parallella is used to power Linux.
Linux does not use Epiphany III.
So it is the job of the developer, to create custom code for the Epiphany III RSIC to be uploaded and executed to each Epiphany core.
Olaf
 
Posts: 37
Joined: Sun May 08, 2016 8:47 pm

Re: Assembly class HERE

Postby ImperialTurbineSaint » Sun May 22, 2016 11:24 pm

Just got my Parallella running today. And I am definitely interested in the assembly aspect of things; what I would love to be able to do is make a run time x86/64 bit assembly to epiphany assembly so foreign programs could be used. (I.E. Run anything that can fit and run.)

Edit: Sorry for the confusion DonQuichotte, writing isn't my greatest attribute and I can often make simple perspective mistakes. So let me try this again. I want to take code that was written for Windows computer; take that and turn it into an epiphany equivalent. I.E. Take a program, re-assemble it for use in epiphany. (Independent of its original platform. E.G. Take Tetris made on a Windows computer, and convert it for running on the Parallella independent from windows.)
Last edited by ImperialTurbineSaint on Mon May 23, 2016 5:39 pm, edited 1 time in total.
ImperialTurbineSaint
 
Posts: 2
Joined: Wed Dec 12, 2012 8:14 am

Re: Assembly class HERE

Postby DonQuichotte » Mon May 23, 2016 11:04 am

User avatar
DonQuichotte
 
Posts: 46
Joined: Fri Apr 29, 2016 9:58 pm

Re: Assembly class HERE

Postby aolofsson » Mon May 23, 2016 2:41 pm

Great writeup!
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Assembly class HERE

Postby DonQuichotte » Thu May 26, 2016 3:24 pm

Hello

I've reached 81 Mn/s with full assembly... that's for the good news.

The fresh update is under

and all the new files under the *2016...05...26...tar...gz archive

1st you should read README.
I'm open to any question.
I put several versions of C or S files: I think there should be several steps for producing assembly.

Bye
Last edited by DonQuichotte on Mon May 30, 2016 9:44 am, edited 1 time in total.
User avatar
DonQuichotte
 
Posts: 46
Joined: Fri Apr 29, 2016 9:58 pm

Re: Assembly class HERE

Postby MiguelTasende » Fri May 27, 2016 12:53 pm

MiguelTasende
 
Posts: 51
Joined: Tue Jun 30, 2015 12:44 pm

Re: Assembly class HERE

Postby DonQuichotte » Fri May 27, 2016 2:25 pm

User avatar
DonQuichotte
 
Posts: 46
Joined: Fri Apr 29, 2016 9:58 pm

Re: Assembly class HERE

Postby Olaf » Sat May 28, 2016 9:01 pm

DonQuichotte, I see you have been busy.

Deadlines at work so almost no time for Parallella, and too tired to do mental stuff.
But your ARM assembler explanation comes just in time, I was preparing to learn the assembly and did not know where to start yet.
Olaf
 
Posts: 37
Joined: Sun May 08, 2016 8:47 pm

Re: Assembly class HERE

Postby Olaf » Sat May 28, 2016 9:27 pm

I have a question:

On x86 every register has an intentional purpose:

* AX --> Accumulator
* BX --> Source
* CX --> Counter
* DX --> Destination

How are the RISC register used, is there a certain convention how they are used?

Also the Stack is not very clear, r13 is used but how is something pushed and popped?
Olaf
 
Posts: 37
Joined: Sun May 08, 2016 8:47 pm

Next

Return to Assembly

Who is online

Users browsing this forum: No registered users and 1 guest

cron