Shop OBEX P1 Docs P2 Docs Learn Events
Anyone using any of the XMM memory models? For which boards? — Parallax Forums

Anyone using any of the XMM memory models? For which boards?

David BetzDavid Betz Posts: 14,516
edited 2013-11-15 04:32 in Propeller 1
I'm about to change the interface between the XMM kernel and the external memory drivers. This will affect all XMM memory models and will replace all of the current "cache drivers" with "external memory drivers". I have many of the current cache drivers converted to this new interface but not all of them. I want to make sure I have support for the drivers that people are currently using. I have drivers for the C3, EEPROM, the Propeller Memory Card, and generic drivers that should work with any board using either SPI or QuadSPI flash or SRAM chips. Is anyone using anything beyond those? I don't have, for example, a driver for the DracBlade, the SDRAM board that jazzed designed, and a number of others.

If you're using XMM could you please post a list of the boards you're using it with and what driver you're currently using. Just saying which board configuration file is enough.

Thanks!
David
«1

Comments

  • Heater.Heater. Posts: 21,230
    edited 2013-11-13 06:59
    I have here a Gadget Gangster SDRAM board and a TriBlade. So I guess I'm out of luck
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-13 07:03
    Heater. wrote: »
    I have here a Gadget Gangster SDRAM board and a TriBlade. So I guess I'm out of luck
    Steve could port the SDRAM driver. He wrote the current one. We have never had a TriBlade driver. What memory chips does it use?
  • Heater.Heater. Posts: 21,230
    edited 2013-11-13 07:32
    As far as I remember it has 512K static RAMS on it. Blade One has space for one and Blade Two has space for two. I only have a single RAM and it's on Blade two. I don't have the board to hand at the moment so I can't check what they are exactly.

    I wonder how much the DracBlade departed from Cluso's TriBlade.

    Whilst we're at it, what is the status of propgcc on the P2 and any driver for the RAM on the FPGA cards?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-13 07:38
    Heater. wrote: »
    As far as I remember it has 512K static RAMS on it. Blade One has space for one and Blade Two has space for two. I only have a single RAM and it's on Blade two. I don't have the board to hand at the moment so I can't check what they are exactly.

    I wonder how much the DracBlade departed from Cluso's TriBlade.
    I could easily port our existing DracBlade driver if that would be helpful. I don't have an assembled TriBlade board so I have no way of testing drivers for it. I do have a couple of blank boards but I don't have the time to source parts and assemble them.
    Whilst we're at it, what is the status of propgcc on the P2 and any driver for the RAM on the FPGA cards?
    A fair amount of work will need to be done on PropGCC for P2 once Chip is done with his instruction set changes. I'm intending to update binutils to the new instruction set but we'll have to wait for some of Eric's time to become available to make the required changes to the GCC code generator. The current GCC code generator for P2 makes use of the WR bit which no longer exists in the P2 instruction set. I'm not sure if there are any other changes that will require rework of the code generator.

    The short answer is that the PropGCC P2 support is currently broken because of the instruction set changes.
  • Mark MaraMark Mara Posts: 64
    edited 2013-11-13 10:29
    I have been playing with xmmc on a C3 using C3F board configuration.

    --mark
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-13 11:05
    Mark Mara wrote: »
    I have been playing with xmmc on a C3 using C3F board configuration.

    --mark
    Anything written for C3F should work fine with the new C3 driver.
  • jazzedjazzed Posts: 11,803
    edited 2013-11-13 11:39
    I generally don't like changes to features, and this one still disturbs me a little.

    However ... in this case, the change is to enable multi-cog xmm programs. It is impossible to do without the change David has described.

    One important point of xmm to me is to be able to continue a development when code space allowed for in LMM/CMM is exhausted (as has happened to me time after time with SPIN ... because I do more than blink LEDs). If you have a program that does cogstart(function, ....) written in LMM/CMM and you run out of space, this change will allow you to continue development.

    If you don't want that or the cache changes, then release_1_0 will always have the old method, but it will never support any chip other than P8X32A.

    I do look forward to porting the old SDRAM and SSF cache drivers though ... just not today.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-13 11:50
    jazzed wrote: »
    I generally don't like changes to features, and this one still disturbs me a little
    With a fairly large amount of effort it would be possible to allow building either kind of .elf file and so we would be backward compatible with the current version of PropGCC. If you think that would be better then we can talk to Parallax about adding this to the development plan.
    However ... in this case, the change is to enable multi-cog xmm programs. It is impossible to do without the change David has described.
    Well, not exactly impossible. After all, this is the Propeller where *everything* is possible! :-)
    To do multi-cog xmm with the old cache driver interface we would have to lock the cache driver for every access to external memory to prevent the xmm cogs from stepping on each other. The performance would likely be horrible. We could solve that to some extend by having an n-way cache where each xmm cog gets at least one "way". That is complicated code and some of the cache drivers probably wouldn't fit in COG memory anymore with that approach. This seemed like the most straight forward approach that was likely to work.
    One important point of xmm to me is to be able to continue a development when code space allowed for in LMM/CMM is exhausted (as has happened to me time after time with SPIN ... because I do more than blink LEDs). If you have a program that does cogstart(function, ....) written in LMM/CMM and you run out of space, this change will allow you to continue development.
    This should be possible especially in xmmc mode. The other xmm modes will be tricky because of cache coherency.
    If you don't want that or the cache changes, then release_1_0 will always have the old method, but it will never support any chip other than P8X32A.
    I'm not sure why you would want to stay away from these changes. If it's just because you're using a cache driver that we haven't yet ported then you should make a request and it will get ported.
    I do look forward to porting the old SDRAM and SSF cache drivers though ... just not today.
    That would be great! Actually, if you just provide init/read/write functions for SDRAM and SSF then I can do the rest.

    Edit: FYI, this new external memory interface is compatible with the one that Chip designed for SDRAM on the P2 so it should allow XMM on P2 to be implemented relatively easily.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-14 05:00
    FYI, I just pushed the XMM changes to the default branch. I can port any of the existing cache drivers to use this new interface easily as long as I have a board to use for testing. I won't be able to port the SSF (SpinSocket-Flash) driver because my SSF module died. If there is a driver you used to use with the old cache interface that you'd like to use again with the new one please let me know and I'll get it ported. Essentially, porting involves deleting code. The cache tag handling code is now in the XMM kernel and the only thing that the new drivers do is read/write blocks of external memory. It should also be very easy to add new boards if anyone has one they're particularly interested in.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-14 05:16
    jazzed,
    If you don't want that or the cache changes, then release_1_0 will always have the old method, but it will never support any chip other than P8X32A.
    What does this mean? Are there to be two versions of the compiler to support going forward?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-14 05:20
    Heater. wrote: »
    jazzed,

    What does this mean? Are there to be two versions of the compiler to support going forward?
    I don't know why Steve said this. I see no reason not to use the new cache interface. The interface used between the kernel and the external drivers is completely invisible to C programmers. The only people who might be affected are ones who wrote their own cache drivers and those drivers should be utterly trivial to convert to the new interface. I do not recommend that anyone continue using the old interface.

    And, to answer your question, no there will not be two versions of PropGCC going forward. The next release of PropGCC will include the changes that are currently in the default branch. That's why kernel-work was merged into default.
  • jac_goudsmitjac_goudsmit Posts: 418
    edited 2013-11-14 07:37
    David Betz wrote: »
    The short answer is that the PropGCC P2 support is currently broken because of the instruction set changes.

    Side note: How often does it happen that a compiler is broken because the target processor's instruction set got changed? :-)

    ===Jac
  • Heater.Heater. Posts: 21,230
    edited 2013-11-14 08:09
    Long ago I spend many hours debugging a problem with a real-time, multi-processor, multi-tasking system when I eventually determined the processors "lock exchange" instruction did not work and data was getting corrupted as a result. Took me a while to convince myself what I was seeing was true.

    When I asked the department that was building the CPU they casually said "Lock exchange is not implemented in that CPU version you have there".
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-14 08:12
    Side note: How often does it happen that a compiler is broken because the target processor's instruction set got changed? :-)

    ===Jac
    It's actually fun being involved with a chip at the early change when things are still in flux. I think the changes that Chip made recently will make the P2 a better chip and hopefully it will generate revenue for Parallax for years to come!
  • jazzedjazzed Posts: 11,803
    edited 2013-11-14 09:24
    Heater. wrote: »
    jazzed,

    What does this mean? Are there to be two versions of the compiler to support going forward?
    It means release_1_0 will always be available in it's current feature form, but will be frozen except critical changes.

    The release_2_0 when that happens will support new features.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-14 11:17
    Jazzed,

    So there will be two versions, functionally different, going forward.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-14 11:19
    Heater. wrote: »
    Jazzed,

    So there will be two versions, functionally different, going forward.
    I don't think that's what he meant. There is no reason to keep the versions separate. Do you have some objection to the new cache interfaces?

    All that Steve was saying is that the current released version will be maintained until we are ready to make another release and that new release will be from the default branch and will include these changes.
  • jazzedjazzed Posts: 11,803
    edited 2013-11-14 11:28
    Heater. wrote: »
    Jazzed,

    So there will be two versions, functionally different, going forward.
    Yes, that is exactly what I meant. It will be that way until someone at Parallax says to retire release_1_0 entirely.

    I don't have a problem producing release_2_0 code from the default branch whatever that is.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-14 11:35
    jazzed wrote: »
    Yes, that is exactly what I meant. It will be that way until someone at Parallax says to retire release_1_0 entirely.

    I don't have a problem producing release_2_0 code from the default branch whatever that is.
    But there won't be any further development on the release_1_0 branch, right? Only potentially bug fixes.
  • jazzedjazzed Posts: 11,803
    edited 2013-11-14 11:42
    David Betz wrote: »
    But there won't be any further development on the release_1_0 branch, right? Only potentially bug fixes.

    http://forums.parallax.com/showthread.php/151558-Anyone-using-any-of-the-XMM-memory-models-For-which-boards?p=1219675&viewfull=1#post1219675
  • Heater.Heater. Posts: 21,230
    edited 2013-11-14 11:51
    I have no objection to the new cache interfaces. Anything that works is good for me.

    I was just wondering about the mechanics of maintaining two different compilers.

    It seems to me that these memory interfaces define different machine architectures. We are not talking Propeller chip here but some "virtual machine" defined by the run time kernel and XMM interface.

    Heck, even the LMM machine is not real but a software defined virtual machine architecture.

    I can't see the sense in proliferating these virtual machine architectures and having to maintain them.
  • jazzedjazzed Posts: 11,803
    edited 2013-11-14 11:54
    Heater. wrote: »
    I was just wondering about the mechanics of maintaining two different compilers.

    Easy:

    $ hg update release_1_0

    $ hg update default

    # or when the time comes
    $ hg update release_2_0
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-14 11:58
    Heater. wrote: »
    I have no objection to the new cache interfaces. Anything that works is good for me.

    I was just wondering about the mechanics of maintaining two different compilers.

    It seems to me that these memory interfaces define different machine architectures. We are not talking Propeller chip here but some "virtual machine" defined by the run time kernel and XMM interface.

    Heck, even the LMM machine is not real but a software defined virtual machine architecture.

    I can't see the sense in proliferating these virtual machine architectures and having to maintain them.
    All exactly correct. That is why the current cache interface will die with release_1_0. Everything going forward will use the new interface. However, Parallax supports customers on older versions of their tools so they will continue to support customers by retaining the release_1_0 version to support any customer that can't for some reason move to the newer toolchain. My guess is that that will be nobody in this case unless there is some customer who spent a lot of effort to write an old-style cache driver that they don't want to migrate to the new memory interface. I would be happy to help anyone who is in that position if they will send me one of their boards and the sources for their old-style cache driver.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-14 12:01
    Jazzed,

    That's easy for us out here:)

    But who is going to maintain this, and why?

    I'm not even sure why branch release_1_0 is even moving forward. It should have been released, tagged, done, move on.
  • ersmithersmith Posts: 6,054
    edited 2013-11-14 12:22
    Heater. wrote: »
    I was just wondering about the mechanics of maintaining two different compilers.

    It seems to me that these memory interfaces define different machine architectures. We are not talking Propeller chip here but some "virtual machine" defined by the run time kernel and XMM interface.

    The compiler itself doesn't change, and the XMM APIs are the same for the two different cache schemes. The only really visible differences are:

    (1) The new method allows XMM code to run in other COGs (a good thing).
    (2) The new method takes up a small amount of extra HUB memory for cache tags (a "bad" thing, but it is very small, so I doubt it will really be much impact to programmers).
    (3) The new method will be easier to port to P2.

    People writing XMM drivers for boards will have to make changes, of course, but for most programmers the new method and old method will both work just fine, and the new one offers more functionality.

    Eric
  • Heater.Heater. Posts: 21,230
    edited 2013-11-14 12:26
    OK. Thank you Eric.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-14 12:35
    ersmith wrote: »
    (2) The new method takes up a small amount of extra HUB memory for cache tags (a "bad" thing, but it is very small, so I doubt it will really be much impact to programmers).
    Just to be clear, some of the old cache drivers kept their tags in hub memory as well. Any driver you find in the old set whose name ends in "_xcache" kept its tags in hub memory and had the same hub footprint hit as the new cache interface. This became necessary because there wasn't enough space in COG memory for the cache tags along with complex memory access code.

    Also, the old interface made calls to the cache driver COG for almost every memory access. The new interface only calls the external memory driver on cache misses.

    Of course, all of this is pretty much invisible to user programs except for the small hub memory hit for keeping tags in hub memory. That can be smaller than 512 bytes if you adjust the cache geometry. The tags take up one long for every cache line. You can trade memory performance for hub memory space by adjusting the geometry. That feature is available to every board configuration in the new scheme. It was only available to some boards in the old scheme.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-11-14 14:14
    I don't have, for example, a driver for the DracBlade, the SDRAM board that jazzed designed, and a number of others.

    Maybe don't bother about the dracblade (512k sram) driver. I think it has been rendered obsolete by the larger serial sram chips and also by the clever cache driver code. I'm using serial chips now - far less pins as well.

    I'm maybe thinking the dracblade could be removed from the drop down menu in GCC? It kind of is cluttering up the list of better drivers...
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-15 04:14
    Dr_Acula wrote: »
    Maybe don't bother about the dracblade (512k sram) driver. I think it has been rendered obsolete by the larger serial sram chips and also by the clever cache driver code. I'm using serial chips now - far less pins as well.

    I'm maybe thinking the dracblade could be removed from the drop down menu in GCC? It kind of is cluttering up the list of better drivers...
    I would agree except I have a working DracBlade so I will probably port its driver at some point. Is it even in the dropdown menu? I thought that only had Parallax boards in it.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-15 04:32
    DracBlade is in the drop down menu on my 0.0.43 build of SimpleIDE.
Sign In or Register to comment.