Assembly - any use in teaching it?

Drop in for a chat and a cup of tea

136 posts   Page 4 of 6   1, 2, 3, 4, 5, 6
by rurwin » Thu Feb 14, 2013 3:41 pm
dr_d_gee wrote:Unless I've missed something, Ubuntu has never been a rolling release distro.

Maybe they've changed something, but it certainly used to be. It was not necessarily the preferred method, and there were issues, but it worked.

Or maybe "rolling release" is a stronger term than it deserves. You could change your apt sources and do a dist-upgrade to upgrade to a new major release. Standard Mint does not support that; it's back to download a DVD and install off that, "do you want to format your disk"...

Whereas Mint Debian tracks Debian Testing, so that will be fully rolling, with no release milestones.
User avatar
Forum Moderator
Forum Moderator
Posts: 2933
Joined: Mon Jan 09, 2012 3:16 pm
by LemmeFatale » Thu Feb 14, 2013 5:11 pm
rurwin wrote:Or maybe "rolling release" is a stronger term than it deserves. You could change your apt sources and do a dist-upgrade to upgrade to a new major release.

I'm really sorry, I know that this is off-topic, but: You don't even have to do that, now. You'll get a note in the GUI-based Software Update program when a new distribution version is available, and you can just click an accompanying button in order to do the dist-upgrade. (Or at least, that's the case in recent Xubuntu releases. I prefer those over mainline Ubuntu. :P)
Classic - Raspberry Pi Model B (512MB) with Motorola Atrix Lapdock
Lemcon-One - Raspberry Pi Model B (256MB) PiMAME TV-Box
User avatar
Posts: 254
Joined: Fri Feb 01, 2013 8:47 pm
Location: UK
by jamesh » Fri Feb 15, 2013 7:03 pm
I've been away, but an now refreshed and ready to argue.

Assembler. Worth learning the principles, because occasionally you need to dive down and see what happening at that level when debugging.

And that's it. It's of very little use in industry, and most decent compilers are within a % of producing code as good as hand assembler.

BUT, here at Broadcom, on the GPU used on the Raspi, we do use assembler occasionally, but out of necessity when moving from scaler to vector code - our compiler doesn't handle vector code at all, so all that stuff needs to be in assembly.

However, the vast majority of the code on the GPU is C. Because it's maintainable, is much quicker to write than assembler, easier to debug, and there are lots of decent C programmers around. There are very few decent assembler coders around. I reckon if the GPU 100k's of lines of C code was all hand assembler, there would simply be no products using the GPU, because it would never have worked (or have even have ever been finished)
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by pygmy_giant » Fri Feb 15, 2013 7:11 pm
Interesting - as suspected, but this proves that the world will always need a dedicated hardcore elite of good assemblers to optomise compilers and write the tricky bits of assembler that can't be avoided.

I think they should be highly paid, and like the Sith - only able to progress within their cult by killing their masters (before taking on an aprentice) so that there is always the same number in existence.

I wish I knew more assembler - I think it would make me better at using C, especially when it comes to messing with memory and persuading the operating sytem to let me do things it would rather I didn't.

Perhaps people with good assembler skills who can't make a living could re-train as microchip/CPU designers? I guess you need a good understanding of how CPUs work to do that? Learning assembler could be a good way into hardware design....
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by tufty » Fri Feb 15, 2013 8:29 pm
Best way to make money doing assembler development used to be writing *ahem* "self propagating software" for "interesting" gentlemen in Russia. There's probably still good money in that market space.
Posts: 1371
Joined: Sun Sep 11, 2011 2:32 pm
by jamesh » Fri Feb 15, 2013 8:39 pm
pygmy_giant wrote:Interesting - as suspected, but this proves that the world will always need a dedicated hardcore elite of good assemblers to optomise compilers and write the tricky bits of assembler that can't be avoided.

I think they should be highly paid, and like the Sith - only able to progress within their cult by killing their masters (before taking on an aprentice) so that there is always the same number in existence.

I wish I knew more assembler - I think it would make me better at using C, especially when it comes to messing with memory and persuading the operating sytem to let me do things it would rather I didn't.

Perhaps people with good assembler skills who can't make a living could re-train as microchip/CPU designers? I guess you need a good understanding of how CPUs work to do that? Learning assembler could be a good way into hardware design....


I'm not sure you write much assembler when developing a compiler. I'd go for C for the code in a compiler - you generate assembler, you don't write in it. You would of course need knowledge of the instruction set when finally getting to the nitty gritty.

Interestingly, RTL, Verilog etc which are languages for writing 'hardware' are very C like.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by pygmy_giant » Fri Feb 15, 2013 9:05 pm
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by jamesh » Fri Feb 15, 2013 11:17 pm


We use large FPGA devices when developing the next generation GPU chips. The whole GPU is testing in FPGA (the boxes are really quite large ie they have wheels, as we need somewhat more than 200k gates) prior to tapeout so we know they 'work' before spending $750k on masks etc.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by DexOS » Fri Feb 15, 2013 11:26 pm
jamesh wrote:I've been away, but an now refreshed and ready to argue.

Assembler. Worth learning the principles, because occasionally you need to dive down and see what happening at that level when debugging.

And that's it. It's of very little use in industry, and most decent compilers are within a % of producing code as good as hand assembler.

BUT, here at Broadcom, on the GPU used on the Raspi, we do use assembler occasionally, but out of necessity when moving from scaler to vector code - our compiler doesn't handle vector code at all, so all that stuff needs to be in assembly.

So what your saying is you DO need assembly coders, but for the bread and butter stuff, you can use those cheaper C programmers.
lots of decent C programmers around

No ones saying that theres 100,1000 of jobs for assembly programmers.
What we are saying, is if you want to be paid top $ as a programmer, you need to learn assembly, its supply and demand.
You said it yourself
so all that stuff needs to be in assembly
if a Co need something and theres not many programmers that can do decent assembly.
Those that can, can ask top $.
Also this very ? was asked on "adafruit ask an engineer" and she answer yes theres is a need, as Co want to save penny's on low spec chips, the only way to make them work is use assembly.
Add to that, that one of the main reason they changed from BIOS to UEFI
was a shortage of assembly programmers
The silicon vendor "wish list" for the BIOS continued to grow. There was a desire to be able to use a high-level language such as C for driver development by standardizing on interfaces and coding practices, thereby easing driver development. The use of C would also help address a growing shortage of assembly language programmers.

http://www.edn.com/electronics-news/431 ... OS-to-UEFI

Shortage, does not mean no jobs and are the assembly programmers higher paid ?.
Batteries not included, Some assembly required.
User avatar
Posts: 865
Joined: Wed May 16, 2012 6:32 pm
by pygmy_giant » Sat Feb 16, 2013 12:07 am
Assembly programmers are paid in pound coins - a stack of 32 every hour.

C programmers get the same but are paid directly into their bank accounts.

jamesh said
We use large FPGA devices when developing the next generation GPU chips. The whole GPU is testing in FPGA (the boxes are really quite large ie they have wheels, as we need somewhat more than 200k gates) prior to tapeout so we know they 'work' before spending $750k on masks etc.

Interesting.

In the future, when people have flying cars, all computers will have dual core FPGAs instead of CPUs - these will be capable of re-configuring each other and the memory which will also be a giant FPGA which will allow them to remember what they were doing before you switched them off when you switch them back on again.

This means that people will be able to download and update their architecture and won't have to bother saving stuff.

You wait and see.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by jamesh » Sat Feb 16, 2013 10:06 am
pygmy_giant wrote:
jamesh said
We use large FPGA devices when developing the next generation GPU chips. The whole GPU is testing in FPGA (the boxes are really quite large ie they have wheels, as we need somewhat more than 200k gates) prior to tapeout so we know they 'work' before spending $750k on masks etc.

Interesting.

In the future, when people have flying cars, all computers will have dual core FPGAs instead of CPUs - these will be capable of re-configuring each other and the memory which will also be a giant FPGA which will allow them to remember what they were doing before you switched them off when you switch them back on again.

This means that people will be able to download and update their architecture and won't have to bother saving stuff.

You wait and see.


Only if FPGA's get a hell of a lot faster. They are very slow in comparison to the actual chips, and use a lot more power, and the box to simulate a Videocore4 is about 45cmx25cxx25cx. That's too big to fit in a mobile phone.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by jamesh » Sat Feb 16, 2013 10:11 am
DexOS wrote:
jamesh wrote:I've been away, but an now refreshed and ready to argue.

Assembler. Worth learning the principles, because occasionally you need to dive down and see what happening at that level when debugging.

And that's it. It's of very little use in industry, and most decent compilers are within a % of producing code as good as hand assembler.

BUT, here at Broadcom, on the GPU used on the Raspi, we do use assembler occasionally, but out of necessity when moving from scaler to vector code - our compiler doesn't handle vector code at all, so all that stuff needs to be in assembly.

So what your saying is you DO need assembly coders, but for the bread and butter stuff, you can use those cheaper C programmers.
lots of decent C programmers around

No ones saying that theres 100,1000 of jobs for assembly programmers.
What we are saying, is if you want to be paid top $ as a programmer, you need to learn assembly, its supply and demand.
You said it yourself
so all that stuff needs to be in assembly
if a Co need something and theres not many programmers that can do decent assembly.
Those that can, can ask top $.
Also this very ? was asked on "adafruit ask an engineer" and she answer yes theres is a need, as Co want to save penny's on low spec chips, the only way to make them work is use assembly.
Add to that, that one of the main reason they changed from BIOS to UEFI
was a shortage of assembly programmers
The silicon vendor "wish list" for the BIOS continued to grow. There was a desire to be able to use a high-level language such as C for driver development by standardizing on interfaces and coding practices, thereby easing driver development. The use of C would also help address a growing shortage of assembly language programmers.

http://www.edn.com/electronics-news/431 ... OS-to-UEFI

Shortage, does not mean no jobs and are the assembly programmers higher paid ?.


I don't think they are paid any more than the C people (maybe those with the vector code expertise, but that's not your average assembler). So I don; think, personally, that to get the highest paid jobs you need to be an assembler programmer. If anything a really good C programmer will produce a hell of a lot more good production code than an solely assembly programmer - and note we don;t have people who write assembler all the time - they only do it when really required. 200 coders in the Cambridge office, I think there are perhaps 4 or 5 who occasionally write assembler.

I'm sure there is a demand for assembler people out there somewhere, but it's not a huge demand. There is a huge demand for good C (and other languages) programmers, bigger than assembler programmers.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by croston » Sat Feb 16, 2013 10:35 am
To be a good, well rounded software engineer, you should know several programming languages, not just assembler or C. You will then know which tool (language) to use for a particular task. Only knowing one language is the programming equivalent of using a Birmingham screwdriver. This way, you can identify and optimise both the speed of program execution and of development. The highest paid software engineer will be the one who knows his/her tools the best.
User avatar
Posts: 464
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
by DavidS » Sat Feb 16, 2013 11:42 am
What is the big deal about being highly paid? I only ask for $12000USD per year, because that is 1.6 times more than my cost of living, and so many refuse to hire me because they do not think I am asking for enough, I do not need more than that, I am only supporting 3 people.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by pygmy_giant » Sat Feb 16, 2013 1:55 pm
Do you own your own house and grow your own food?

I agree in principle though that just enough is plenty for people who enjoy being creative.

A little bit more can make life less of a struggle though.

jamesh said:

Only if FPGA's get a hell of a lot faster. They are very slow in comparison to the actual chips, and use a lot more power, and the box to simulate a Videocore4 is about 45cmx25cxx25cx. That's too big to fit in a mobile phone.


I suppose FPGA's will enevitably get smaller, cheaper, faster, more economical and more reliabe. Whether this happens to the degree required to make self-wiring hardware practicable remains to be seen. There must be physical constraints.

If it is possible you could have humans build rudimentary machines that are aware of their requirements and then self-optomise their own designs to better meet those requirements.

They could then work out how to send robots back in time to assasinate the parents of human resistance fighters - actually scrap that idea, I like machines to be dumb.
Last edited by pygmy_giant on Sat Feb 16, 2013 2:21 pm, edited 1 time in total.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by DavidS » Sat Feb 16, 2013 2:16 pm
pygmy_giant wrote:Do you own your own house and grow your own food?

I agree in principle though that just enough is plenty for people who enjoy being creative.

:-) Thank you.

Own house: Yes.
Grow ow food: No (not enough land for livestock). Food only comes to about $130 per month for three people.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by pygmy_giant » Sat Feb 16, 2013 2:32 pm
Wow - assuming you live in America, the cost of living is cheaper than the UK.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by DavidS » Sat Feb 16, 2013 2:37 pm
jamesh wrote:Only if FPGA's get a hell of a lot faster. They are very slow in comparison to the actual chips, and use a lot more power, and the box to simulate a Videocore4 is about 45cmx25cxx25cx. That's too big to fit in a mobile phone.
And yet it only takes 20000 LE Cyclone II to simulate 2 core ARMv6 (7 stage Pipeline, shared 64kB 8 way associative D-cache, and 8KB I-cache each,No Thumb) + 2 Core VFP (3 stage pipeline, No cache) + 4 Core DSP 56K (6 stage pipeline, No Cache) Based Video Procesor + some peripherials, and it runs at 50Mhz. I have the source for this somewhere as implemented on the Altera DE1 development board, I only wish that getting license from ARM (Elemet 14) was not so costly then I would distribute it.

It shows the difference in the way things are done. Though having looked at the published Video Core V information I can see how it is so costly in HW.

Maybe you should suggest to who ever makes the decisions using a 8 Core ARMv5 + 8 Core VFP + a simple control processor, for the next generation of video processor for Brodcom devices :-) .
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by jamesh » Sat Feb 16, 2013 2:41 pm
DavidS wrote:What is the big deal about being highly paid? I only ask for $12000USD per year, because that is 1.6 times more than my cost of living, and so many refuse to hire me because they do not think I am asking for enough, I do not need more than that, I am only supporting 3 people.


That would pay my mortgage for less than a year. And apparently my children need to eat as well has having a roof over their heads. And I don't live anywhere near Cambridge, where I cannot even afford to buy a house anyway (rent for a small house will be at least £1000/month in Cambridge).

It's not about being highly paid, its about being paid enough to actually live. The UK (esp. Cambridge area) is very expensive.

I
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by jamesh » Sat Feb 16, 2013 2:43 pm
pygmy_giant wrote:Do you own your own house and grow your own food?

I agree in principle though that just enough is plenty for people who enjoy being creative.

A little bit more can make life less of a struggle though.

jamesh said:

Only if FPGA's get a hell of a lot faster. They are very slow in comparison to the actual chips, and use a lot more power, and the box to simulate a Videocore4 is about 45cmx25cxx25cx. That's too big to fit in a mobile phone.


I suppose FPGA's will enevitably get smaller, cheaper, faster, more economical and more reliabe. Whether this happens to the degree required to make self-wiring hardware practicable remains to be seen. There must be physical constraints.

If it is possible you could have humans build rudimentary machines that are aware of their requirements and then self-optomise their own designs to better meet those requirements.

They could then work out how to send robots back in time to assasinate the parents of human resistance fighters - actually scrap that idea, I like machines to be dumb.


You will never get an FPGA to run as fast as a dedicated chip, or have the low power consumption required. But I can see a time where some tasks can be pushed on to FPGA's.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by jamesh » Sat Feb 16, 2013 2:45 pm
DavidS wrote:
jamesh wrote:Only if FPGA's get a hell of a lot faster. They are very slow in comparison to the actual chips, and use a lot more power, and the box to simulate a Videocore4 is about 45cmx25cxx25cx. That's too big to fit in a mobile phone.
And yet it only takes 20000 LE Cyclone II to simulate 2 core ARMv6 (7 stage Pipeline, shared 64kB 8 way associative D-cache, and 8KB I-cache each,No Thumb) + 2 Core VFP (3 stage pipeline, No cache) + 4 Core DSP 56K (6 stage pipeline, No Cache) Based Video Procesor + some peripherials, and it runs at 50Mhz. I have the source for this somewhere as implemented on the Altera DE1 development board, I only wish that getting license from ARM (Elemet 14) was not so costly then I would distribute it.

It shows the difference in the way things are done. Though having looked at the published Video Core V information I can see how it is so costly in HW.

Maybe you should suggest to who ever makes the decisions using a 8 Core ARMv5 + 8 Core VFP + a simple control processor, for the next generation of video processor for Brodcom devices :-) .


The Videocore 4 is MUCH more complicated than any Arm chip (For example, the Arm in the 2835 was squeezed in to a corner of the VC4 die in a bit of spare space - its a very small proportion of the total die area). Although we are pushing more an more processing on the Arm core where its sensible to do so.

Fortunately I don't need to tell anyone at Broadcom how to make GPU;s - they are already quite good at it.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12113
Joined: Sat Jul 30, 2011 7:41 pm
by pygmy_giant » Sat Feb 16, 2013 2:56 pm
Hmmm - GPU with ARM squeezed on as an after thought placed on a break out board and sold as an educational computer. Quirkily British.

Its a pity we have no software showcasing the GPU as yet. I cant help thinking this machine is not fulfilling its potential. I hope my digitally downloadable kickstarter copy of Elite Dangerous will run on the Pi - otherwise I will probably have ot give it away as I expect it will be incompatible with my 6 year old lap top.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by DavidS » Sat Feb 16, 2013 5:24 pm
jamesh wrote:The Videocore 4 is MUCH more complicated than any Arm chip (For example, the Arm in the 2835 was squeezed in to a corner of the VC4 die in a bit of spare space - its a very small proportion of the total die area).


I have no doubt of that. Jut looking at the instrution set highlites this nicely. Though is not there also a significant amount of space taken up by the Peripherials (More than the ARM anyway).

And hence my half hearted point of making a GPU out of Multiple ARM CPUs each with its own VFP, less HW cost, Faster processing of most things (there are defiitely areas where the VideoCore V will outperform 8 well layed out ARMs + VFP) . Something like that could make a good low end Video processor with a much lower HW cost than the VideoCore V, of cource there would still be the need to bolt a ARMv7 device on the side (maybe a Cortex A8?).. Though as said this is is just a half hearted statement, mor for a laugh than anything.

Although we are pushing more an more processing on the Arm core where its sensible to do so.


Makes sense, it is there so use it.

Fortunately I don't need to tell anyone at Broadcom how to make GPU;s - they are already quite good at it.
[/quote]

For sure. They make quite good GPUs.
Last edited by DavidS on Sat Feb 16, 2013 5:25 pm, edited 1 time in total.
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by tufty » Sat Feb 16, 2013 5:25 pm
pygmy_giant wrote:Assembly programmers are paid in pound coins - a stack of 32 every hour.

Is that really the going rate? Hell, I was paid 50 quid an hour 11 years ago doing boring old C++ and SQL, and I was far from being the highest paid - the guy sat next to me was pulling in 80. And I know guys doing SAP configuration on contract who were billing upwards of 150 / hr, 20 years ago.

But it's not about the money in the end, is it? I'm currently earning almost exactly 9 quid an hour, and I'm a damn sight happier than I ever was working in the city.
Posts: 1371
Joined: Sun Sep 11, 2011 2:32 pm
by Bakul Shah » Sat Feb 16, 2013 6:32 pm
jamesh wrote:We use large FPGA devices when developing the next generation GPU chips. The whole GPU is testing in FPGA (the boxes are really quite large ie they have wheels, as we need somewhat more than 200k gates) prior to tapeout so we know they 'work' before spending $750k on masks etc.

The last time I was involved with an ASIC design, we didn't bother with an FPGA; we just used multiple simulators and ran lots and lots and lots and lots of tests. And a few more. We ran our verilog code on a commercial simulator, we translated this code to C via a homebrew verilog->C translator and compiled and ran that, and I wrote a custom simulator in C++ that was significantly faster than the first two simulators -- obviously very slow compared to the eventual ASIC but fast enough that we could run some actual data traffic through it. It also helped that we had a simulator for the entire product.
Posts: 293
Joined: Sun Sep 25, 2011 1:25 am