ryao
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am

Re: MIPS version?

Sun Sep 11, 2011 4:49 am

ARM devices are nice, but my institution uses MIPS for teaching systems programming. Have you considered making a MIPS version after the ARM hardware is finalized?

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: MIPS version?

Sun Sep 11, 2011 9:33 am

Most certainly will not happen, alas.
You might be able o get by on a hacked router, or by doing the MIPS equivalent of whet ukscone did and set up a cross-compilation VM. See http://russelldavis.org/2011/0.....velopment/

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: MIPS version?

Mon Sep 12, 2011 3:21 pm

Quote from ryao on September 11, 2011, 05:49
ARM devices are nice, but my institution uses MIPS for teaching systems programming. Have you considered making a MIPS version after the ARM hardware is finalized?

The closest thing you're going to find for MIPS in this space is something from Lemote in Jiangsu Province, China. http://www.lemote.com/en/

They provide Loongson 2F based systems, which are 64-bit type MIPS devices with a Linux distribution provided stock on the systems. You won't get GPU type support most likely as they used XGI's Volari V2 as the graphics interface (???). You should look them up if you actually need a MIPS based system. (In reality, unless you're doing assembly-language stuff, it should be close enough to the same for your purposes to use an ARM, or even an X86 based machine for at least algorithm experimentation purpoes...)

As it currently stands, you're going to find few SoC's worth messing with in the MIPS architecture space. There's a reason that Roku ditched the MIPS variant of their stuff (Roku XS, etc...)- it's because the things typically aren't coupled with hot DSP hardware, etc. MIPS is chosen for things like routers and high end things like Tilera's stuff or Octeon's because people have use it and ARM wasn't IN this space until recently.

Andre_P
Posts: 241
Joined: Sun Aug 28, 2011 7:57 am

Re: MIPS version?

Mon Sep 12, 2011 4:39 pm

Ryo, have you considered getting hold a FPGA dev board and then downloading some of the stuff from Open Cores. I think there is a 'MIPS' like core there.
I realise that that is a homebrew on the near extreme but it might be an interesting challenge for you.
Unless you are willing to go to the far uber extreme and design your own core like me :)

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: MIPS version?

Mon Sep 12, 2011 10:58 pm

Quote from Andre_P on September 12, 2011, 17:39
Ryo, have you considered getting hold a FPGA dev board and then downloading some of the stuff from Open Cores. I think there is a 'MIPS' like core there.
I realise that that is a homebrew on the near extreme but it might be an interesting challenge for you.
Unless you are willing to go to the far uber extreme and design your own core like me :)

Unfortunately, unless you've got $1000+ to spend on a higher-end FPGA board, the MIPS cores from OpenCores won't do more than 100MHz at best. Unless you're trying to learn FPGA stuff, it's not really too optimal to do what you're suggesting. ;)

HeadCase
Posts: 51
Joined: Sat Sep 03, 2011 8:11 am

Re: MIPS version?

Mon Sep 12, 2011 11:36 pm

In the world of embedded controllers, the Microchip PIC32 is a mips core. Its limited in ram size, but it does have the ability to drive reasonable sized LCD panels ..

http://www.microchip.com/stell.....e=en548037

That is probably not what you had in mind, but For SoC running linux, it does look like ARM has had a complete victory.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23968
Joined: Sat Jul 30, 2011 7:41 pm

Re: MIPS version?

Tue Sep 13, 2011 9:17 am

Quote from ryao on September 11, 2011, 05:49
ARM devices are nice, but my institution uses MIPS for teaching systems programming. Have you considered making a MIPS version after the ARM hardware is finalized?

Do they actually teach assembler then? Or are they just MIPS boards running Linux or something on which you write C or similar?

Reasons I ask is that if using C, then its fairly irrelevant (for teaching) what the architecture is.

Also, I've worked on embedded systems for years, and haven't written any assembler for years either. Not saying assembler expertise is no longer necessary, just that it is unusual to *really* need it. (Although we do use assembler on the Videocore GPU to take advantage of vector processing).

Modern C compilers are generally (let's say gcc -O1) as good as a good assembler programmer.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

rwaltman
Posts: 31
Joined: Mon Sep 05, 2011 3:16 pm

Re: MIPS version?

Tue Sep 13, 2011 4:50 pm

HeadCase
...the Microchip PIC32 is a mips core..

To the OP: you can find a low-cost PIC32 (MIPS) based system here:
http://geoffg.net/maximite.html

--
Roberto Waltman

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: MIPS version?

Tue Sep 13, 2011 5:02 pm

Quote from jamesh on September 13, 2011, 10:17
Also, I've worked on embedded systems for years, and haven't written any assembler for years either. Not saying assembler expertise is no longer necessary, just that it is unusual to *really* need it. (Although we do use assembler on the Videocore GPU to take advantage of vector processing).


Heh... The only times I've ever seen needing to do assembly is when you're talking some lowest level component of an OS kernel, defining the machine code backend of a compiler, or doing something specialized that the kernel currently doesn't do "right" like CAS type atomic operations or your example with the Videocore...

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4164
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: MIPS version?

Tue Sep 13, 2011 5:12 pm

Quote from jamesh on September 13, 2011, 10:17
Also, I've worked on embedded systems for years, and haven't written any assembler for years either. Not saying assembler expertise is no longer necessary, just that it is unusual to *really* need it. (Although we do use assembler on the Videocore GPU to take advantage of vector processing).

Modern C compilers are generally (let's say gcc -O1) as good as a good assembler programmer.


i've had to get my hands dirty with some ARM assembler on the pxa270 in the past year or so to access some of the registers (for overclocking, underclocking, general "lets try to break it" stuff and bootloader) but that was the first time in about 20 years or so for anything other that pleasure and masochism.

Andre_P
Posts: 241
Joined: Sun Aug 28, 2011 7:57 am

Re: MIPS version?

Tue Sep 13, 2011 8:05 pm

Hi Svartalf,
You maybe surprised what you can do with 100 MHz. The embedded cores I work with are running Linux, handling backplane comms with a TCPIP stack, passing messages for DSPs and a whole host of other bits and bobs that happen in a Broadcast Encoder run at 125 MHz. Also they happen to be in some of the smaller FPGAs out there.
Also if you are trying to get into Assembler you aren't necessarily interested in running spectacularly fast you are interested in learning how to program a core.
From a power point of view the slower the clock the less power consumption.
Seeing that Ryao is at an educational institution he could get a one of the smaller dev boards for a very very good price and if he has a word with the right person even get it for free.
Also, IMHO, having a Software Engineer having a GOOD appreciation of the hardware he is running on is a good thing. There is nothing SO frustrating than having to explain to a Software Engineer that operations are NOT instantaneous.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: MIPS version?

Tue Sep 13, 2011 9:34 pm

Quote from Andre_P on September 13, 2011, 21:05
Hi Svartalf,
You maybe surprised what you can do with 100 MHz. The embedded cores I work with are running Linux, handling backplane comms with a TCPIP stack, passing messages for DSPs and a whole host of other bits and bobs that happen in a Broadcast coder run at 125 MHz. Also they happen to be in some of the smaller FPGAs out there.


Well, from past experience, the cheapest boards that'll do a MIPS well and have room left over for a few other things would be a SP605 or similar- those run $500. I know, I'm actually contemplating getting one or something like it by end of year for conducting a few Verilog/VHDL experiments for some things I've always wanted to try out.


Also if you are trying to get into Assembler you aren't necessarily interested in running spectacularly fast you are interested in learning how to program a core.
From a power point of view the slower the clock the less power consumption.
Seeing that Ryao is at an educational institution he could get a one of the smaller dev boards for a very very good price and if he has a word with the right person even get it for free.


Heh... I'd love to meet up with someone like that. A MIPS core won't fit in anything really less than something on the SP605 tier. Unless you're going to also be dinking with VHDL or Verilog, you're probably better off with buying something from Lemote because it'll be closer to what you need, you won't have to futz with logic designs and getting it all right and the like.


Also, IMHO, having a Software Engineer having a GOOD appreciation of the hardware he is running on is a good thing. There is nothing SO frustrating than having to explain to a Software Engineer that operations are NOT instantaneous.

Unfortunately, unless they're "ready" for it, it's a BAD thing as it'll be just a turn-off for them to get the right understanding. Most people aren't ready for that EE/CS hybrid task like you or I are. ;)

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: MIPS version?

Tue Sep 13, 2011 10:05 pm

http://www.mips.com/everywhere.....Networking
has a list of routers with MIPS inside (most of them via Broadcom chips ^^). I'm sure some of those can be hacked on the cheap. Most important factors would be RAM and I/O.
http://www.dd-wrt.com/wiki/ind.....ed_Devices has a nice recap of router's specs... I'm too lazy to cross-check with the first list.

ryao
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am

Re: MIPS version?

Thu Sep 15, 2011 3:31 am

Quote from jamesh on September 13, 2011, 10:17
Quote from ryao on September 11, 2011, 05:49
ARM devices are nice, but my institution uses MIPS for teaching systems programming. Have you considered making a MIPS version after the ARM hardware is finalized?

Do they actually teach assembler then? Or are they just MIPS boards running Linux or something on which you write C or similar?

Reasons I ask is that if using C, then its fairly irrelevant (for teaching) what the architecture is.

Also, I've worked on embedded systems for years, and haven't written any assembler for years either. Not saying assembler expertise is no longer necessary, just that it is unusual to *really* need it. (Although we do use assembler on the Videocore GPU to take advantage of vector processing).

Modern C compilers are generally (let's say gcc -O1) as good as a good assembler programmer.

They write programs by hand using the MIPS 1 instruction set. They also learn to do it in C, but that is only after they have learned how to do it in MIPS 1.

Quote from rwaltman on September 13, 2011, 17:50
HeadCase
...the Microchip PIC32 is a mips core..

To the OP: you can find a low-cost PIC32 (MIPS) based system here:
http://geoffg.net/maximite.html

--
Roberto Waltman

If the Raspberry Pi used MIPS, we could install a Linux distribution, setup user accounts with quotas, and then let the students SSH into it to do programming in a self contained environment. The instructors teaching systems programming would never consider using what you suggest.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: MIPS version?

Thu Sep 15, 2011 1:16 pm

Quote from ryao on September 15, 2011, 04:31
If the Raspberry Pi used MIPS, we could install a Linux distribution, setup user accounts with quotas, and then let the students SSH into it to do programming in a self contained environment. The instructors teaching systems programming would never consider using what you suggest.

You can still do that with ARM though.
Dear forum: Play nice ;-)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23968
Joined: Sat Jul 30, 2011 7:41 pm

Re: MIPS version?

Thu Sep 15, 2011 1:40 pm

Quote from abishur on September 15, 2011, 14:16
Quote from ryao on September 15, 2011, 04:31
If the Raspberry Pi used MIPS, we could install a Linux distribution, setup user accounts with quotas, and then let the students SSH into it to do programming in a self contained environment. The instructors teaching systems programming would never consider using what you suggest.

You can still do that with ARM though.

The only difference is using the Arm instead of the MIPS instruction set. Since Arm is used in many more embedded devices than MIPS (AFAIK), it seems odd to stick with MIPS. They are both RISC instruction sets. To me, assembler is assembler. Once you have the concepts, the instruction set is pretty irrelevant.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: MIPS version?

Thu Sep 15, 2011 1:55 pm

the wikipedia article is ... well, informative. http://en.wikipedia.org/wiki/M.....chitecture
I had forgotten MIPS is the one the Chinese are building their national CPU on. I thought it was in the early Laserjets, but apparently it was a 68k (and to think I could never even afford a QL).

Apparently, MIPS is cheap and simple, and as an really RISC design has he same advantages as learning Latin... there ARE advantages to that, right ?

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: MIPS version?

Thu Sep 15, 2011 8:41 pm

Quote from Svartalf on September 13, 2011, 18:02Heh... The only times I've ever seen needing to do assembly is when you're talking some lowest level component of an OS kernel, defining the machine code backend of a compiler, or doing something specialized that the kernel currently doesn't do "right" like CAS type atomic operations or your example with the Videocore...
Or if you need performance. Real performance. As a case in point, I have a string hashing routine (used for first cut string equivalence testing, among other things) that I'm using in my scheme implementation. The "C" version, compiled using LLVM/GCC with maximum optimisations, came in at ~1400 bytes on ARM. I can't remember the exact number of cycles per compare, but it was pretty horrible. My initial, and rather naive, ARM assembler implementation came in at 206 bytes, dealt with utf8 correctly, and was over 3 times as fast. Most code does a lot of string equivalence checking. Mine, obviously, is used in compiling and interpreting code on "limited" platforms, optimising was absolutely necessary.

Assembler is far from dead.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: MIPS version?

Thu Sep 15, 2011 8:54 pm

Quote from jamesh on September 15, 2011, 14:40
The only difference is using the Arm instead of the MIPS instruction set. Since Arm is used in many more embedded devices than MIPS (AFAIK), it seems odd to stick with MIPS. They are both RISC instruction sets. To me, assembler is assembler. Once you have the concepts, the instruction set is pretty irrelevant.


MIPS is used a lot more in network gear than ARM is. Many of your routers and similar use MIPS processors- and all the network processing engines (Tilera, Octeon, etc...) use MIPS. As for your thinking on things...yeah, it's pretty much that. This almost strikes me as a "teaching 'marketable' skills" thing there, based on what's used in the network-centric market.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: MIPS version?

Thu Sep 15, 2011 8:57 pm

Quote from tufty on September 15, 2011, 21:41
Or if you need performance. Real performance. Mine, obviously, is used in compiling and interpreting code on "limited" platforms, optimising was absolutely necessary.

Ah, but sadly it's not a skill that's been encouraged in the schools and elsewhere. And it'd be that "odd" case as much as anything else. I've seen devs go "oooh..." and view my inlined stuff with trepidation because it's "not portable" and they just don't know how to understand that which you've done when you've done it.

Assembler is far from dead.

As a fellow developer who goes where angels fear to tread on that score, I'd have to concur. :D

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: MIPS version?

Fri Sep 16, 2011 6:40 am

Quote from Svartalf on September 15, 2011, 21:57Ah, but sadly it's not a skill that's been encouraged in the schools and elsewhere.
What you often hear is "you can't do better than the compiler". In reality, you can almost always do better than the compiler if you really need to. The question, as ever, is "do you need to", and "can you handle the maintenance pain of doing it".

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23968
Joined: Sat Jul 30, 2011 7:41 pm

Re: MIPS version?

Fri Sep 16, 2011 7:47 am

Quote from tufty on September 15, 2011, 21:41
Quote from Svartalf on September 13, 2011, 18:02Heh... The only times I've ever seen needing to do assembly is when you're talking some lowest level component of an OS kernel, defining the machine code backend of a compiler, or doing something specialized that the kernel currently doesn't do "right" like CAS type atomic operations or your example with the Videocore...
Or if you need performance. Real performance. As a case in point, I have a string hashing routine (used for first cut string equivalence testing, among other things) that I'm using in my scheme implementation. The "C" version, compiled using LLVM/GCC with maximum optimisations, came in at ~1400 bytes on ARM. I can't remember the exact number of cycles per compare, but it was pretty horrible. My initial, and rather naive, ARM assembler implementation came in at 206 bytes, dealt with utf8 correctly, and was over 3 times as fast. Most code does a lot of string equivalence checking. Mine, obviously, is used in compiling and interpreting code on "limited" platforms, optimising was absolutely necessary.

Assembler is far from dead.

The GCC compiler for Arm is (or certainly has been in the past) notorious for not producing very good Arm code. I think it has improved. Can you do the test again with the latest version? I would be interested to see the figures. The original compiler from Arm (which you have to pay for) is MUCH MUCH better.

To really compare apples with apples, try doing the same test with a good x86 compiler. There are very few assembler people out there who could beat it. Compilers are just too good nowadays to spend the time writing assembler, except for a very very very very very few circumstances.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

stuporhero
Posts: 125
Joined: Fri Aug 19, 2011 2:02 pm

Re: MIPS version?

Fri Sep 16, 2011 9:43 am

When "Hello World" in C compiled to ARM assembly takes up 7k you know you're not using the most out of the processor (or you haven't set your compiler flags up right!)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23968
Joined: Sat Jul 30, 2011 7:41 pm

Re: MIPS version?

Fri Sep 16, 2011 9:59 am

Sounds like you are including libMakeMeUnnecessarilyBig by accident.

Although the standard clib startup which you have linked in to get printf to work is probably most of that. You probably are making the most out of the processor (i.e. it runs fast), but not necessarily memory!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

ryao
Posts: 24
Joined: Sun Sep 11, 2011 3:47 am

Re: MIPS version?

Sun Sep 18, 2011 5:40 am

Quote from jamesh on September 15, 2011, 14:40
Quote from abishur on September 15, 2011, 14:16
Quote from ryao on September 15, 2011, 04:31
If the Raspberry Pi used MIPS, we could install a Linux distribution, setup user accounts with quotas, and then let the students SSH into it to do programming in a self contained environment. The instructors teaching systems programming would never consider using what you suggest.

You can still do that with ARM though.

The only difference is using the Arm instead of the MIPS instruction set. Since Arm is used in many more embedded devices than MIPS (AFAIK), it seems odd to stick with MIPS. They are both RISC instruction sets. To me, assembler is assembler. Once you have the concepts, the instruction set is pretty irrelevant.

In theory, yes. In practice not quite. The course has been taught in MIPS for a long time and I am not its instructor. Reworking things for ARM would take work on the part of the people that do teach it and I asked about the possibility of a MIPS version of the Raspberry Pi because I know that at least one of them is interested in providing students with access to an actual MIPS machine on which they could do their assignments.

Also, it is easier to do assembly programming with MIPS because MIPS provides 32 registers while ARM provides 16.

Quote from tufty on September 15, 2011, 21:41
Quote from Svartalf on September 13, 2011, 18:02Heh... The only times I've ever seen needing to do assembly is when you're talking some lowest level component of an OS kernel, defining the machine code backend of a compiler, or doing something specialized that the kernel currently doesn't do "right" like CAS type atomic operations or your example with the Videocore...
Or if you need performance. Real performance. As a case in point, I have a string hashing routine (used for first cut string equivalence testing, among other things) that I'm using in my scheme implementation. The "C" version, compiled using LLVM/GCC with maximum optimisations, came in at ~1400 bytes on ARM. I can't remember the exact number of cycles per compare, but it was pretty horrible. My initial, and rather naive, ARM assembler implementation came in at 206 bytes, dealt with utf8 correctly, and was over 3 times as fast. Most code does a lot of string equivalence checking. Mine, obviously, is used in compiling and interpreting code on "limited" platforms, optimising was absolutely necessary.

Assembler is far from dead.

Someone visited my university recently and talked about his research into cache oblivious algorithms. He had a chart that showed benchmarks of a few different software packages for doing some numerical calculations by % of floating point operations. Standard C code was 10%. His cache oblivious algorithms raised that to 50%. Gotoblas, which uses handwritten assembly obtained 80%.

Return to “General discussion”