Shop OBEX P1 Docs P2 Docs Learn Events
HX512K and XMM — Parallax Forums

HX512K and XMM

blittledblittled Posts: 681
edited 2012-08-17 03:42 in Propeller 1
I recently got a HX512K SRAM for my Hydra and was wondering if I could use XMM with it? I realize the first 64K will be fast and the remaining memory will be slower because of how it steps through memory.

Comments

  • jazzedjazzed Posts: 11,803
    edited 2012-08-15 19:58
    blittled wrote: »
    I recently got a HX512K SRAM for my Hydra and was wondering if I could use XMM with it? I realize the first 64K will be fast and the remaining memory will be slower because of how it steps through memory.

    Someone needs to write a Propeller-GCC cache driver for it.
  • David BetzDavid Betz Posts: 14,516
    edited 2012-08-16 03:38
    jazzed wrote: »
    Someone needs to write a Propeller-GCC cache driver for it.
    Unfortunately, you'll probably have to reprogram the CPLD to get reasonable performance out of the HX512K.
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2012-08-16 12:31
    Hi

    this is what I had some time ago:

    * "hydrahx0.spin" is meant to support full 512KB with original firmware, using "page walk" instead of "byte walk" after the first 64KB.

    Clearly this is not quite true "random access", but I think that using the cache it does not much worst than other serial mediums (I2C EEPROMs, or single bit SPI SRAMs).
    Earlier I ran speed tests using this method (not with gcc code code, just reading and writing, 4096 times, 256 byte memory pages, located randomly in the 512KB address space).
    The results were some 5 times slower vs the enhanced firmware, where with the original firmware + original "byte walk" method, it would be more than 20 times slower.

    * "hydrahx1.spin" is probably the most interesting, for Hydra and HX512 with Eric Moyer's firmware.

    * "protohx2.spin" (unfinished), is supposed to work with HX512 attached to a protoboard and a 74hc74 chip to speed things up (maybe).

    All three are untested, I was unable to test them on GEAR back then, IIRC because I had difficulties loading XMM from serial port.

    Hope you guys can find some use for this.

    Alessandro
  • David BetzDavid Betz Posts: 14,516
    edited 2012-08-16 13:13
    Hi

    this is what I had some time ago:

    * "hydrahx0.spin" is meant to support full 512KB with original firmware, using "page walk" instead of "byte walk" after the first 64KB.

    Clearly this is not quite true "random access", but I think that using the cache it does not much worst than other serial mediums (I2C EEPROMs, or single bit SPI SRAMs).
    Earlier I ran speed tests using this method (not with gcc code code, just reading and writing, 4096 times, 256 byte memory pages, located randomly in the 512KB address space).
    The results were some 5 times slower vs the enhanced firmware, where with the original firmware + original "byte walk" method, it would be more than 20 times slower.

    * "hydrahx1.spin" is probably the most interesting, for Hydra and HX512 with Eric Moyer's firmware.

    * "protohx2.spin" (unfinished), is supposed to work with HX512 attached to a protoboard and a 74hc74 chip to speed things up (maybe).

    All three are untested, I was unable to test them on GEAR back then, IIRC because I had difficulties loading XMM from serial port.

    Hope you guys can find some use for this.

    Alessandro
    I think there is some issue like you can't use P31/30 for a serial connection at the same time as you're accessing the HX512 so that means there is no way for our loader to load code into it. Ross handles this in Catalina by downloading over a second serial port connected to the mouse port on the Hydra. We don't currently have that support.
  • RossHRossH Posts: 5,511
    edited 2012-08-17 03:42
    David Betz wrote: »
    I think there is some issue like you can't use P31/30 for a serial connection at the same time as you're accessing the HX512 so that means there is no way for our loader to load code into it. Ross handles this in Catalina by downloading over a second serial port connected to the mouse port on the Hydra. We don't currently have that support.

    Quite correct. The HX512 uses Propeller pin P30 as a clock strobe, essentially disabling normal serial communications on P30/P31. From the HX512 manual:

    ... once the HYDRA boots and the USB_RXD line is quiet then if its clocked by any COG other than the one communicating with the HX512 then you run the risk of instructing the HX512 to load addresses, read or write which would be unintentional.This is a side-effect since the USB_RXD line doubles for the SRAM_CLK line on the HX512 which is more or less the “execute command” strobe line. Thus, the HX512 when inserted disallows the serial communications from the PC for all intent purposes. This has nothing to do with programming of course, this issue only comes into play after the programming of the EEPROM or Propeller is complete by the Propeller tool.


    As David mentioned, Catalina and Payload support a special Hydra_Mouse loader - once this loader is loaded via normal means (with the HS512 essentially quiescent - or at least in a state we don;t care about - it then supports programs being loaded to the HX512 via another port, such as a serial mouse or keyboard port. Payload allows multiple programs to be specified for successive loading, so it takes care of this automatically if you give it a command such as:
    payload hydra_mouse my_program
    

    Ross.
Sign In or Register to comment.