MathEx class and floating point on Cerberus?

Does the MathEx class make use of the Cerberus’ floating point unit? Ideally it would do so automatically if a FPU is detected but I can’t find any documentation that explictly says that is the case.

I’be been working mostly on the mbed platform and I must say that it’s much easier to search their site and get this type of information.

Thanks, Tom

It would depend on how the firmware was compiled. Only GHI could tell us that, I believe.

There is no MathEx on Cerberus :slight_smile:

The way NETMF work is very different than anything you see on the market, from mbed to arduino. When you work with .NET you usually do not need to worry about the underlying details. In other words, if you move your code from one platform to another, you do not need to open datasheet to learn details. For most developers, this is a favorable scenario. If you program $25 device or $400 device, you are using the same environment…which is why you will not find deep details like your question for example.

The only exception to the above is the extended libraries vendors add on top of NETMF, which GHI has 2 version premium and OSHW http://www.ghielectronics.com/offers

By the way, RLPlite is low level, similar to mbed and other offers and you can compile your RLP code to use floating point instructions.

Also, remember that because NETMF code is interpreted, taking advantage of the hardware FPU would not speed things up as much as you might think. While the actual operation might get significantly faster, the framework overhead would still be the dominant factor.

Let me rephrase the question then:

Does the System.Math take advantage of the FPU on the Cerberus?

The only correct answers are Yes or No. We don’t know or it doesn’t matter doesn’t cut it, in which case you should not advertise that Cerberus has a FPU. Interpreted code or not, an FPU should speed up certain math operations significantly.

I have programmed uCs from 8051s to Toradex boards and big systems like 16 core servers, in NET and .NET CF, and have learned to pay attention to underlying hardware no matter what size it is and not to make assumptions about code portability. It’s fine if you want to abstract users from the hardware, but it’s ridiculous to say you don’t need to supply deep details to such questions.

Also you done a very poor job showing on you web site which modules run which software libraries. You should publish a compatibility chart - if there is one I can’t find it.

…Tom

Cerberus has an FPU, the hardware is definitely there. If you program with RLPLite, then whether or not you take advantage of the FPU depends on your workload and your compiler. However (and I understand that you don’t like this answer), it mostly doesn’t matter.

Whether a given instruction takes 16 cycles or 1 cycle isn’t really important when the framework adds tens of thousands of cycles of overhead to the operation. Sorry.

@ tkreyche - what I was explaining is that everything you programmed before is different than netmf.

Yes FPU is used but that wouldn’t make any difference in netmf.

Your second post ever on this forum and already complaining? I would say you’ve done a poor job of being polite. You won’t get much help with that kind of post.

I see the bad cop has made an appearance again :smiley:

I think he has a point if you see it from his perspective. Yes it is poorly documented as far as low level stuff but he doesn’t know yet that all this info is not needed in netmf, and so no need for it. Once he starts using netmf more he will realize how much documentation are available. I am assuming things of course so let us see what he thinks after couple weeks. Hopefully it will earn his trust and get him hooked.

Gus,

This .NET micro environment is not all that different from .NET CF on the Toradex boards. Main differences are that the Toradex boards are less resource constrained and native code is default, but when you run .NET CF and C# it’s nearly the same; for example there are standard .NET CF libs plus some custom board specifc ones and you can pay extra for some additional ones. Toradex also hides a fair amount of low level hardware details but sometimes it’s necessary to go there. Of course the boards are 4x more expensive.

So I’m just looking for an environment that is a little lower end and similar but not as expensive. Probably I should have got one of your G120HDR modules - I didn’t take time to understand the Cerberus and Gadgeteer constraints - expecially didn’t read closely enough that the premium libraries weren’t supported.

And by comparison to mbed especially, your documentation is scattered all over the place and there are quite a few broken links - that may be complaining but it won’t fix the problem.

Again it’s fine if you want to hide hardware details from people who don’t care about it, but sooner or later it’s necessary to get closer for many projects.

I do a lot of community participation and you can check out my mbed work tkreyche - Notebook | Mbed

Thanks, Tom

I think the one significant difference that you need to consider is that the .NET MF does not have a JIT Compiler, therefore the IL is executed directly by an interpreter rather than being compiled to native code. There are a number of optimizations that just don’t happen because of this, no variable hoisting, no array bound check elimination etc. So yes from an interface perspective there is not much difference to .NET CF, but the runtime performance charateristics differ significantly especially if your application is very performance sensitive.

@ tkreyche - good to learn more about your knowledge. That is importsnt part of becoming part of the community and helping each other.

Everything you need should be on the support page on the link above. Where are the scattered docs? And if you see a broken link or have any advice then please let us know. We have moved things around recently so it is possible we missed few.