Shop OBEX P1 Docs P2 Docs Learn Events
problem when using propeller-load with xmmc or xmm-single (propgcc default branch) - Page 2 — Parallax Forums

problem when using propeller-load with xmmc or xmm-single (propgcc default branch)

24

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 07:18
    I hate to suggest this but one possible "solution" would be to install VirtualPC and a Linux distro and build under Linux. You can even still use Windows as your Propeller development environment since Eric recently added a way to build Windows binaries under Linux. The build is a lot faster under Linux and probably also won't have these problems you're encountering. In fact, you might decide you like Linux so much you'll abandon Windows! :-)
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 07:25
    I have no problem using Linux because I'm quite familiar with it. Used it for years when I did Java development.
    But maybe it is faster if Steve could upload his default branch build, so that I can test this weekend ;-)

    If Steve has no time I will definitely consider installing Linux :-)
    Thanks David for the suggestion!
  • jazzedjazzed Posts: 11,803
    edited 2014-03-01 08:47
    Hi Christian,

    Here is an alpha_1_9 default branch build package. https://drive.google.com/file/d/0BzcfH7bdVTbtWVVDRndHeWt0Qkk/edit?usp=sharing
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 09:14
    jazzed wrote: »
    Hi Christian,

    Here is an alpha_1_9 default branch build package. https://drive.google.com/file/d/0BzcfH7bdVTbtWVVDRndHeWt0Qkk/edit?usp=sharing

    Hi Steve,

    Thanks very much! I will test if XMM is working today evening.
    Did you do something special to get the branch built on windows? I have problems using make.

    Christian
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 09:27
    Wooooooooohooooooooooooo! It works, I have XMMC with sqi SRAM working :-) Never thought that I could be so happy ;-)
    So there is definitely an issue when using the rebuild.sh script instead of make. If I don't get make to work on windows I will use Linux for development.

    @Steve: Could you post how u built the sources? Because I have no luck with make.


    Christian
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 09:46
    Wooooooooohooooooooooooo! It works, I have XMMC with sqi SRAM working :-) Never thought that I could be so happy ;-)
    So there is definitely an issue when using the rebuild.sh script instead of make. If I don't get make to work on windows I will use Linux for development.

    @Steve: Could you post how u built the sources? Because I have no luck with make.


    Christian
    Could you try xmm-single to see if that works for you? I'm having trouble getting ebasic3 working in xmm-single mode but I haven't been able to find the bug in the XMM kernel that might cause this problem.

    Thanks,
    David
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 10:01
    David Betz wrote: »
    Could you try xmm-single to see if that works for you? I'm having trouble getting ebasic3 working in xmm-single mode but I haven't been able to find the bug in the XMM kernel that might cause this problem.

    Thanks,
    David

    Hi David,

    XMM-Single is working for me. I will solder the flash ram onto my board today evening and try XMM split also.

    Christian
  • jazzedjazzed Posts: 11,803
    edited 2014-03-01 10:09
    Hi Steve,

    Thanks very much! I will test if XMM is working today evening.
    Did you do something special to get the branch built on windows? I have problems using make.

    Christian

    I built it on Linux. The windows build really needs to be fixed. The linux build generally takes less time though.
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 10:28
    jazzed wrote: »
    I built it on Linux. The windows build really needs to be fixed. The linux build generally takes less time though.

    Which compiler are you using that you can create windows binaries with linux?
  • jazzedjazzed Posts: 11,803
    edited 2014-03-01 11:32
    Which compiler are you using that you can create windows binaries with linux?
    GCC of course :)

    Pull repository.

    $ cd propgcc
    $ make
    $ make CROSS=win32
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 12:20
    David Betz wrote: »
    Could you try xmm-single to see if that works for you? I'm having trouble getting ebasic3 working in xmm-single mode but I haven't been able to find the bug in the XMM kernel that might cause this problem.

    Thanks,
    David

    Hi David,

    XMM-Split does also work. Filling an array with 1024 int values takes 3,6 us in XMM-Split.

    Christian
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 14:00
    Hi David,

    XMM-Split does also work. Filling an array with 1024 int values takes 3,6 us in XMM-Split.

    Christian
    Thanks for testing xmm-single. I wonder why it doesn't work with ebasic3? I can't see anything wrong with the XMM kernel code. I must be missing something somewhere I guess.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 14:02
    Hi David,

    XMM-Split does also work. Filling an array with 1024 int values takes 3,6 us in XMM-Split.

    Christian
    I just noticed you said xmm-split not xmm-single. That shouldn't work with only an SRAM for external memory. It's designed for a system that has both flash and RAM. The code runs from flash and the data is placed in RAM. Did you mean "xmm-single"?
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 14:13
    David Betz wrote: »
    I just noticed you said xmm-split not xmm-single. That shouldn't work with only an SRAM for external memory. It's designed for a system that has both flash and RAM. The code runs from flash and the data is placed in RAM. Did you mean "xmm-single"?
    Hi David,

    I tested XMM-single, which worked and XMM-split (My own board has sram and flash. I have just soldered the flash ram to the board after sram test was successfull. So both ram work :-))
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 14:23
    Hi David,

    I tested XMM-single, which worked and XMM-split (My own board has sram and flash. I have just soldered the flash ram to the board after sram test was successfull. So both ram work :-))
    Okay thanks. I didn't know you had a flash chip as well. Which driver are you using for both? sqi_flash_sram_xmem?
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 14:25
    Yes, this is the driver I am using. Works absolutely well and even the xmm-split performance is good enough for my needs. I need a bigger RAM because I have to buffer DMD characters, numbers and so on.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 14:29
    Yes, this is the driver I am using. Works absolutely well and even the xmm-split performance is good enough for my needs. I need a bigger RAM because I have to buffer DMD characters, numbers and so on.
    Great! I'm glad things are working well for you. Thanks for reporting the XMM problems!
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 14:35
    David Betz wrote: »
    Great! I'm glad things are working well for you. Thanks for reporting the XMM problems!
    I have to thank you and Steve for helping me out! Thanks again!
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 14:38
    I have to thank you and Steve for helping me out! Thanks again!
    No problem. Glad we were able to help.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 14:53
    FYI, I figured out why ebasic3 isn't working in xmm-single mode. The problem is that I'm missing HUB declarations to force certain variables into hub memory so they can be accessed by the PASM VM running in a separate COG. I'm not going to bother fixing this because I would probably never want to run ebasic3 in xmm-single or xmm-split mode anyway. It was designed for CMM or xmmc. However, ebasic2 seems to work just fine in xmm-single mode. I'm posting this to let you know that I don't think my problem with ebasic3 has anything to do with a bug in the xmm-single support in propgcc.
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 14:59
    David Betz wrote: »
    FYI, I figured out why ebasic3 isn't working in xmm-single mode. The problem is that I'm missing HUB declarations to force certain variables into hub memory so they can be accessed by the PASM VM running in a separate COG. I'm not going to bother fixing this because I would probably never want to run ebasic3 in xmm-single or xmm-split mode anyway. It was designed for CMM or xmmc. However, ebasic2 seems to work just fine in xmm-single mode. I'm posting this to let you know that I don't think my problem with ebasic3 has anything to do with a bug in the xmm-single support in propgcc.

    Thanks for the update, David!
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 15:08
    Hi David,

    I have a question with regards to start a new cog in the default branch. Is it by default, that the cog runs in xmm mode, when xmm is set when compiling the sources or do I have to use another function to do that?
    Is there also a way to start a new cog in LMM mode?

    Thanks,
    Christian
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 15:15
    Hi David,

    I have a question with regards to start a new cog in the default branch. Is it by default, that the cog runs in xmm mode, when xmm is set when compiling the sources or do I have to use another function to do that?
    Is there also a way to start a new cog in LMM mode?

    Thanks,
    Christian
    I'm not sure. We may have to wait for Eric to answer that. I only did the new xmem driver support. Eric added the multiple XMM COG support. Sorry.
  • trancefreaktrancefreak Posts: 186
    edited 2014-03-01 15:22
    David Betz wrote: »
    I'm not sure. We may have to wait for Eric to answer that. I only did the new xmem driver support. Eric added the multiple XMM COG support. Sorry.
    No problem, maybe Eric reads this and answers. Would be good if LMM cogs are still available.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 15:43
    No problem, maybe Eric reads this and answers. Would be good if LMM cogs are still available.
    Actually, now that I think of it, I don't think there is any way to have two different memory models in the same program. The problem is that you'd have to have two copies of any library functions you used.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-01 16:04
    David Betz wrote: »
    Actually, now that I think of it, I don't think there is any way to have two different memory models in the same program. The problem is that you'd have to have two copies of any library functions you used.

    It is possible to run LMM code from an XMM memory model of course. Just tag the function as HUBTEXT. Not sure if that applies to cogs other than the main one though.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 16:22
    jazzed wrote: »
    It is possible to run LMM code from an XMM memory model of course. Just tag the function as HUBTEXT. Not sure if that applies to cogs other than the main one though.
    I don't think this is true. Just because it is in hub memory does not mean it is LMM code. There is no LMM kernel in an XMM program to load into another COG. You can, of course, run XMM code that happens to be running a function that is in hub memory. Maybe that would be adequate? Again, you'd have to be sure that function was not going to call any library functions because those will probably be in external memory in XMM mode. It will work to call them but it will go through the cache.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-01 17:02
    David Betz wrote: »
    I don't think this is true. Just because it is in hub memory does not mean it is LMM code.

    In this case (where code is tagged as HUBTEXT) the XMM kernel is supposed to fetch code from HUB RAM, and since the code is essentially the same except for some macros, it is practically LMM code.

    I have a program where the tagged LMM code out-performs normal LMM code :)
  • David BetzDavid Betz Posts: 14,516
    edited 2014-03-01 17:06
    jazzed wrote: »
    In this case (where code is tagged as HUBTEXT) the XMM kernel is supposed to fetch code from HUB RAM, and since the code is essentially the same except for some macros, it is practically LMM code.

    I have a program where the tagged LMM code out-performs normal LMM code :)
    Really? That's hard to believe. Every memory reference in XMM mode goes through an XMM macro as does fetching of the next instruction. It's hard to believe that could outperform rdlong for fetching instructions. Maybe we should examine that code to see if there is some bug at work?
  • jazzedjazzed Posts: 11,803
    edited 2014-03-01 17:14
    David Betz wrote: »
    Really? That's hard to believe. Every memory reference in XMM mode goes through an XMM macro as does fetching of the next instruction. It's hard to believe that could outperform rdlong for fetching instructions. Maybe we should examine that code to see if there is some bug at work?

    I'll test it on the default branch and see if it fails. :<
Sign In or Register to comment.