Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

SimpleNGen 1.1


  • Please log in to reply
28 replies to this topic

#21 Klop

Klop

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 10 June 2011 - 07:17 AM

I just looked at your code. I'm not getting the same 'pop' error you are getting, and I'm not sure why.... did you send me exactly the code you were using? In any case, I am getting a couple of other errors that touch on areas I didn't implement (namely, unsigned types, and types smaller than int). I took a bunch of shortcuts there, just to get things working.

The code I sent you had some more steps in it that the code that failed with the pop error. I've just PM'ed you the code that produces the 'pop' error (a subset of the first code piece I sent you). Regarding using types smaller than int - that's my mistake - ints are just fine.

I was hoping to do a quick hack tonight but I'm getting pretty tired. I think I'd like to take another look this weekend if that's OK with you. It would be quite exciting if I could get this prototype to produce correct code for the routine you wrote.

Of course that's OK with me.

By the way, I'm a little worried about whether this is going to be effective. I'm pretty confident that I can (eventually) produce code for the routine you sent me, but I'm very worried that the interop overhead (going from managed to native) is going to dwarf any savings you get by doing these several math operations in native code. Now on the other hand, if you had a whole array of CrossScale[] Value1[] and Value2[]s to work on (so that you only made one managed-to-native transition but then worked on a whole array of parameters), I'm pretty confident that there would be substantial performance improvement.

You are absolutely right about this and this is also how I intend to do it. The code I sent you was just the first steps towards having it all run natively.

Regarding more than one method in the class, yeah, I was thinking about that. It helps a lot that you're interested in this project--after doing the initial prototype I kind of moved on to other things because, although people seem to like this idea in principle, I wasn't sure anyone was actually going to use my particular prototype in practice.

This project you have done here is just what I need to complete my project and keep me on the netduino platform. And I would very much like to stay on the netduino platform. I have some realtime code that runs way way to slow on netduino and therefore need it to run natively. So I really appreciate what you have done here and if I can help in any way let me know.

#22 Dan Morphis

Dan Morphis

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 10 June 2011 - 05:09 PM

The project has been idle for a while, but now that I have a user I'm getting excited about it!

I didn't implement all the MSIL opcodes--just basically exactly the ones that I needed to get my sample code working.

But I'm happy to implement more of them. I'd like to propose the following:

  • Tonight I'll add support for POP
  • If you want to send me your code, I will run it and make sure there are no other missing opcodes (and even see if I can get it to work)
  • If you'd rather keep your code private for whatever reason, then we'll have to iterate back and forth a little as I add missing opcodes
Sound good? Feel free to send me the code using the crappy messaging interface in this forum :-)


Corey,
Not to over complicate your project, but what about adding unit testing? For something as error prone as code-gen, it would probably be hugely beneficial!

-dan

#23 Fabien Royer

Fabien Royer

    Advanced Member

  • Members
  • PipPipPip
  • 406 posts
  • LocationRedmond, WA

Posted 10 June 2011 - 05:27 PM

Thanks for your awesome work Corey! I'm super interested in any native code options on the netduino: the support just needs to be in the stock or Beta firmware though and I'm anxiously waiting for .Net MF 4.2 for that :) Cheers, -Fabien.

#24 Corey Kosak

Corey Kosak

    Advanced Member

  • Members
  • PipPipPip
  • 276 posts
  • LocationHoboken, NJ

Posted 10 June 2011 - 06:26 PM

The code I sent you had some more steps in it...


AHAHAHAHAHA. Oops--I had meant to PM my original message to Klop rather than blasting it to the whole forum. My mistake. But anyway I guess it all worked out because of your messages of support. Thanks everyone!

#25 Klop

Klop

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 02 July 2011 - 09:53 PM

I'd love to see tons of people using this, and see it become an even stronger resource for .NET MF programmers.

Let's all download Corey's SimpleNGEN-enhanced firmware and push the limits :)

Chris

Hi Chris,

Just talked to Corey Kosak about him building the SimpleNGen for the netduino plus firmware. He sad you build it for the netduino firmware. Could you build it for the Netduino Plus firmware as well? Please :) I need access to the SD card.

Thanks

#26 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 02 July 2011 - 10:29 PM

Hi Klop,

Just talked to Corey Kosak about him building the SimpleNGen for the netduino plus firmware. He sad you build it for the netduino firmware. Could you build it for the Netduino Plus firmware as well? Please :) I need access to the SD card.

When the v4.1.1 firmware moves out of beta next month, we can build a version with SimpleNGEN. For all three Netduinos.

You can also download the source and build from scratch... We'll use RVDS, which makes much smaller code than GCC.

Chris

#27 Klop

Klop

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 04 July 2011 - 01:35 PM

When the v4.1.1 firmware moves out of beta next month, we can build a version with SimpleNGEN. For all three Netduinos.

You can also download the source and build from scratch... We'll use RVDS, which makes much smaller code than GCC.

Chris

Hi Chris,

I've never had any luck building the firmware. I have the GCC but it keeps reporting errors and I've tried different setups. If I ask you very very nicely - would it be possible for you to build a plus? Or does your repository contain v4.1.1 stuff?

Thanks.

#28 Corey Kosak

Corey Kosak

    Advanced Member

  • Members
  • PipPipPip
  • 276 posts
  • LocationHoboken, NJ

Posted 04 July 2011 - 02:44 PM

I've never had any luck building the firmware.

Klop,

I'm happy to build you a version but with the following caveats:
  • I'll be using gcc
  • I'll be using whatever Netduino source is publicly available (i.e. from the downloads tab of this forum)
Let me know.. but first let me finish this multi-method support.. I think I'm close

#29 Klop

Klop

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 04 July 2011 - 11:16 PM

I'm happy to build you a version but with the following caveats:

  • I'll be using gcc
  • I'll be using whatever Netduino source is publicly available (i.e. from the downloads tab of this forum)
Let me know.. but first let me finish this multi-method support.. I think I'm close

Hi Corey,

Yes please, I'd really appreciate it if you would like to build a version. It looks like the publicly available source is 4.1.0.6 and that's just fine. Of course I'll wait for you to finish the multi-method support - cool your almost done with that.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.