Shop OBEX P1 Docs P2 Docs Learn Events
VMCOG: Virtual Memory for ZiCog, Zog & more (VMCOG 0.976: PropCade,TriBlade_2,HYDRA HX512,XEDODRAM) - Page 11 — Parallax Forums

VMCOG: Virtual Memory for ZiCog, Zog & more (VMCOG 0.976: PropCade,TriBlade_2,HYDRA HX512,XEDODRAM)

18911131416

Comments

  • heaterheater Posts: 3,370
    edited 2010-06-19 09:54
    Stack overflows have bugged me enough over the years. They are a special case of memory corruption which is even more insidious when its some stray pointer access done by some code that apparently works OK but causes other functions to fail at random some time later.

    Bills stack guard will prove the point one way or the other which is a "good thing".

    I'm surprised, I have never seen a micro-processor in which the stack grow upwards. No idea about minis and mainframes though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-19 14:48
    Cluso99 said...
    Bill, where do you find the time? Congratulations, these are great advances, but no time for me to test :-(

    Thanks [noparse]:)[/noparse]

    Mikronauts IS my day job, and I work a ridiculous number of hours per week; fortunately I have a very understanding wife!
    heater said...
    OK, if the stack grows UP (is there anything normal about the Prop?) from the end of the Spin data into the Stack/Free Space area (Blue bar in the F8 output window) then Zog should have about 6K of stack with a 24 page VM. Which sounds ample. Used to be enough for 25 page of working set.

    Now I move my VM last page up to $7E00. The last page of HUB memory.
    With 23 pages fibo runs through to completion.
    With 24 pages it fails on fibo(26)

    But I just made room for that extra page by moving everything up one page.

    I still don't buy the stack overflow explanation.

    I don't think the stack is the only problem, however it is the only thing I have been able to think of so far as to why all the memory tests pass, and ZOG code (with some working set configurations) fails.

    I suspect there may still be some multi-legged creatures lurking in VMCOG that need squishing.
    heater said...
    There is no time to go shopping whilst dhrystone performs 5000 loops any more[noparse]:)[/noparse]

    20 pages 42 seconds
    10 pages 65 seconds
    5 pages 270 seconds

    Sounds GREAT!

    What is the hub-only time?
    heater said...
    dhrystone runs fine with 35 pages!

    Very strange...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system

    Post Edited (Bill Henning) : 6/19/2010 2:56:20 PM GMT
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-19 14:54
    I've been bitten by the stack overwriting other memory in the past too. It's a pain in the posterior.

    GuardDog launches a separate cog that does nothing but monitor a firewall of configurable size. When corruption is detected, it blinks an LED (can be changed to generating a tone).

    I actually got it debugged, with a test program last night; I just have to clean it up a bit before uploading it. I will integrate it with the ZOG test shell today.

    FYI, GuardDog was VERY easy to write, and it is trivial to integrate with any Spin program - purely because of how the Propeller works, and because GuardDog can use an independent cog to do the checking.
    BradC said...
    heater said...

    I still don't buy the stack overflow explanation.

    Stack overflows can be quite insidious, particularly if something writes to the same memory location the stack has overflowed into. When the next method returns, it ends up popping random garbage off the stack and going off into never never land. Generally stack overflows are pretty repeatable though, so they're not *that* hard to pin down.

    I thought a growing stack pointer was pretty normal. Every time you push something on the stack you simply increment the pointer. I do recall a processor I once used worked the other direction, but I can't recall which one it was now.

    I like Bills idea of just poisoning a guard area between the stack and the remainder of ram. Just check it regularly and if it has changed your stack has been bigger than you thought it might.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-19 14:58
    I find the "growing upwards" stack strange too.

    Debugging this will be nasty, especially if GuardDog does not find corruption!

    If I can't find the problem soon, I have an idea of how to build a debug version of VMCOG that guards against memory corruption - but it will be much slower...

    - when a page is read in, generate a checksum, and store it in a table in the hub.
    - when a write is performed to the page, check before writing to see if the checksum is correct, then do the write and update the checksum

    If the above does not do it...

    - check the checksum before every read as well.

    if either read or write test fails a checksum test, force a ZOG breakpoint, dump TLB
    heater said...
    Stack overflows have bugged me enough over the years. They are a special case of memory corruption which is even more insidious when its some stray pointer access done by some code that apparently works OK but causes other functions to fail at random some time later.

    Bills stack guard will prove the point one way or the other which is a "good thing".

    I'm surprised, I have never seen a micro-processor in which the stack grow upwards. No idea about minis and mainframes though.
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-06-19 16:29
    Instead of giving vmcog a starting high address and number of pages that grow down, why not pass vmcog the address of the start of a array variable and size of the array (VAR or DAT, not sure which is better)? Then when you compile the hub memory used by vmcog will be counted and show in the object info popup window.

    John abshier
  • jazzedjazzed Posts: 11,803
    edited 2010-06-19 16:37
    John Abshier said...
    Instead of giving vmcog a starting high address and number of pages that grow down, why not pass vmcog ...
    I wonder about this too. As it is I have to start the cog and then look at the pointer to see where I can put other data. It's a little awkward. I could calculate this, but what if the table sizes change at some point? Maybe the next major revision that supports read-only segments could support growing up from a base address?

    Thanks,
    --Steve

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Pages: Propeller JVM
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-19 16:53
    The reason it grows down is to easily adjust to different sized "host" Spin programs, and different working set sizes.

    No need to change the start address, just change the number of pages!

    The reason it is not mapped over an array is two fold:

    1) to optimize VMCOG, the pages MUST be page aligned in the hub. This allows storing only the upper address bits for each page, and avoids adding a "base offset"

    2) VMCOG is designed to be Spin independent. I can foresee ZOG (and other) eeprom images that only have enough Spin byte codes to start the boot VM.

    Frankly, I find the "start of last available page" (normally $7E00, but can be $7C00 under SphinxOS) and "number of pages in working set" easy to use.

    Note, the current TLB design allows for 512 pages in the working set on PropII smile.gif which is NOT an accident.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-19 20:18
    Ok, GuardDog proves it was not stack corruption!

    Please find attached a test archive with GuardDog and 10 pages that breakpoints right at the start - heater, could you try to see if you can find the reason?

    I have to spend the rest of the weekend working on a demo for UPEW, and while I may try one or two more tweaks, I won't have a lot of time to spend on VMCOG until after UPEW.

    Darn it!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • heaterheater Posts: 3,370
    edited 2010-06-20 14:10
    A lot of weirdness going on today.

    Firstly, after 24 hours away from Zog I return to find he now runs all the way through the fibos with 35 pages just fine. In fact I moved the working set to $7E00 and 36 pages works as well.

    So it looks like there is no problem with VMCOG and I have been wasting your time. I suspect now there is something iffy about my power supply.

    Secondly, we have a new problem with Zog and VMCog. The Dhrystone test runs through to completion but now not all the results that it prints at the end are correct. Look at Int_Comp, Enum_Comp and Ptr_Comp below.

    Thing is these results ARE correct when running from HUB.

    Anyway I have posted this version to the first page of the Zog thread. There are Dhrystone some timings shown for different numbers of pages.

    Oh, Bill, that fibo you have won't work. There has been a change or two in the Zog emulation to make it work better with VMCog since that version.

    Dhrystone Benchmark, Version 2.1 (Language: C)
    
    Program compiled without 'register' attribute
    
    Execution starts, 5000 runs through Dhrystone
    Execution ends
    
    Final values of the variables used in the benchmark:
    
    Int_Glob:            5
            should be:   5
    Bool_Glob:           1
            should be:   1
    Ch_1_Glob:           A
            should be:   A
    Ch_2_Glob:           B
            should be:   B
    Arr_1_Glob[noparse][[/noparse]8]:       7
            should be:   7
    Arr_2_Glob[noparse][[/noparse]8][noparse][[/noparse]7]:    5010
            should be:   Number_Of_Runs + 10
    Ptr_Glob->
      Ptr_Comp:          11
            should be:   (implementation-dependent)
      Discr:             0
            should be:   0
      Enum_Comp:         2
            should be:   2
      Int_Comp:          17
            should be:   17
      Str_Comp:          DHRYSTONE PROGRAM, SOME STRING
            should be:   DHRYSTONE PROGRAM, SOME STRING
    Next_Ptr_Glob->
      Ptr_Comp:          16
            should be:   (implementation-dependent), same as above
      Discr:             0
            should be:   0
      Enum_Comp:         2
            should be:   1
      Int_Comp:          17
            should be:   18
      Str_Comp:          DHRYSTONE PROGRAM, SOME STRING
            should be:   DHRYSTONE PROGRAM, SOME STRING
    Int_1_Loc:           5
            should be:   5
    Int_2_Loc:           13
            should be:   13
    Int_3_Loc:           7
            should be:   7
    Enum_Loc:            1
            should be:   1
    Str_1_Loc:           DHRYSTONE PROGRAM, 1'ST STRING
            should be:   DHRYSTONE PROGRAM, 1'ST STRING
    Str_2_Loc:           DHRYSTONE PROGRAM, 2'ND STRING
            should be:   DHRYSTONE PROGRAM, 2'ND STRING
    
    User time: 0
    Measured time too small to obtain meaningful results
    Please increase number of runs
    
    Microseconds for one run through Dhrystone: 0
    Dhrystones per Second:                      0
    VAX MIPS rating * 1000 = 0
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-20 16:13
    Thanks... very weird!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • heaterheater Posts: 3,370
    edited 2010-06-24 09:27
    An interesting ZOG/VMCOG test program attached.

    Prompted by crypto discussions going on here I compiled xxtea for Zog.
    This is the biggest Zog program so far as it uses the full size printf and so comes it at nearly 48KB.

    When running it repeatedly encrypts and decrypts a string and prints before and after results like so:

    All work and no play makes Jack a dull boy. 
    f850a5c5 8c68fc59 2e000f9a 70c8061a 368a25a1 33ef7ff5 d621f8c5 a731e86a 3d1c3268 13b41a88 8a40fec9 
    206c6c41 6b726f77 646e6120 206f6e20 79616c70 6b616d20 4a207365 206b6361 75642061 62206c6c 202e796f 
    All work and no play makes Jack a dull boy. 
    f850a5c5 8c68fc59 2e000f9a 70c8061a 368a25a1 33ef7ff5 d621f8c5 a731e86a 3d1c3268 13b41a88 8a40fec9 
    206c6c41 6b726f77 646e6120 206f6e20 79616c70 6b616d20 4a207365 206b6361 75642061 62206c6c 202e796f 
    All work and no play makes Jack a dull boy. 
    f850a5c5 8c68fc59 2e000f9a 70c8061a 368a25a1 33ef7ff5 d621f8c5 a731e86a 3d1c3268 13b41a88 8a40fec9 
    206c6c41 6b726f77 646e6120 206f6e20 79616c70 6b616d20 4a207365 206b6361 75642061 62206c6c 202e796f 
    All work and no play makes Jack a dull boy. 
    
    



    This is freaky to watch as it's constantly changing speed. From a couple of lines per second to 10s of seconds per line with a period of about a minute.

    With only 8 pages in the working set VMCog is working very hard to juggle all this code.

    This goes on for 10 minutes or so until it locks up.


    Edit: Every run of this results in a lock up at the same position in the 189th iteration.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.

    Post Edited (heater) : 6/24/2010 10:43:25 AM GMT
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-06-24 13:17
    Thanks! I think knowing about the 189th iteration will help me find the problem.

    Interesting test!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-07-13 17:13
    I will be resuming working on VMCOG this week; currently I am hip-deep in soldering/debugging my new boards [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-07-31 19:35
    VMCOG development has resumed; I fixed the bug that had be going nuts on PropCade [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-07-31 20:44
    I uploaded the latest version - this fixes the software issue on the new PropCade prototype, and adds:

    's' - read SPI RAM status register contents to VMDEBUG

    and supporting read_status(n) API call with supporting PASM code to VMDEBUG.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • heaterheater Posts: 3,370
    edited 2010-08-01 08:10
    Ill try and find a moment to pop that in to Zog. I have to get Zog working again with ext memory anyway.

    Things are moving slowly here. I smashed my spectacles and am not able to get hold of my old backup specs. I get a terrible headache squinting at my monitor for more than an hour. New specs. are arriving on Wednesday.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-01 13:22
    Thanks. I will be adding >64KB VM sizes this week [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-02 15:12
    I think the 64KB version of VMCOG is pretty stable now - so unless I get reports of some bugs that I can replicate, I am thinking of declaring it v1.0, and moving onto working on the large VM version.

    The "large" version will need to use one byte of hub memory for every potential virtual page - so if you want a 2MB VM (because you are running with hardware that adds that much backing store), VMCOG2 will use 4KB of hub memory to hold the "page present" table.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com
    My products: Morpheus / Mem+ / PropCade / FlexMem / VMCOG / Propteus / Proteus / SerPlug
    and 6.250MHz Crystals to run Propellers at 100MHz & 5.0" OEM TFT VGA LCD modules
    Las - Large model assembler Largos - upcoming nano operating system
  • Heater.Heater. Posts: 21,230
    edited 2010-08-15 13:28
    Bill, I've just managed to find a free day to get my latest Zog working with external RAM again.

    As a last step I fitted it out with your latest VMCOG (Jul31 v0.976) I had to update it's TriBlade code to my my latest version that was posted here on 18th June.

    Sadly the result is that my basic test prog which checks out basic console I/O and ends with a run of fibo() still does not get through the fibo(). With the older VMCog it does at least finish but with a wrong result.

    How should we proceed? I could just post the latest ZOG for you to tryout with SPI RAM or so. I need to tidy up the files a bit first.
  • jazzedjazzed Posts: 11,803
    edited 2010-08-15 14:50
    Heater. wrote: »
    How should we proceed? I could just post the latest ZOG for you to tryout with SPI RAM or so. I need to tidy up the files a bit first.
    I don't know about Bill, but I would be truly grateful if you post the latest ZOG code somewhere so I can try to use it with SDRAM :)

    Thanks,
    --Steve
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-16 06:44
    Argh!

    I start to do more debugging is how. I could not get anything done on the weekend - it was too hot in my lab.

    Please send me the latest fibo, so I can see if it finishes with SPI ram's.

    This week I am planning to add support for two SPI ram's on CPU1 of Morpheus, and FlexMem :)
    Heater. wrote: »
    Bill, I've just managed to find a free day to get my latest Zog working with external RAM again.

    As a last step I fitted it out with your latest VMCOG (Jul31 v0.976) I had to update it's TriBlade code to my my latest version that was posted here on 18th June.

    Sadly the result is that my basic test prog which checks out basic console I/O and ends with a run of fibo() still does not get through the fibo(). With the older VMCog it does at least finish but with a wrong result.

    How should we proceed? I could just post the latest ZOG for you to tryout with SPI RAM or so. I need to tidy up the files a bit first.
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-16 06:45
    I am following your work with SDRAM - well done!
    jazzed wrote: »
    I don't know about Bill, but I would be truly grateful if you post the latest ZOG code somewhere so I can try to use it with SDRAM :)

    Thanks,
    --Steve
  • Heater.Heater. Posts: 21,230
    edited 2010-08-17 10:36
    Zog V1.1 is posted now with operation from external RAM via VMCog working again.

    As delivered it runs the fibo test from TriBlade ext RAM using 20 pages of working set and VMCOG version 0.975. This runs correctly. Other configurations are not so happy:
    VMCog Version    Pages   Result
    -------------    -----   ------
    0.975            20      PASS
    0.975            10      FAIL, wrong result for fibo(25) and fibo(26)
    0.976            20      FAIL, crash out to break point/illegal op
    0.976            10      FAIL, crashes out to reboot!
    

    Bill, I had to refit your 0.976 with my latest TriBlade code as that had been lost somewhere. Both VMCog versions are included in todays Zog package.
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-17 10:56
    Thanks - this will let me see if 20 pages works with SPI ram, and if 10 fails.

    I am really puzzled as to *WHY* it would work with 20, and not with 10... very weird.
    Heater. wrote: »
    Zog V1.1 is posted now with operation from external RAM via VMCog working again.

    As delivered it runs the fibo test from TriBlade ext RAM using 20 pages of working set and VMCOG version 0.975. This runs correctly. Other configurations are not so happy:
    VMCog Version    Pages   Result
    -------------    -----   ------
    0.975            20      PASS
    0.975            10      FAIL, wrong result for fibo(25) and fibo(26)
    0.976            20      FAIL, crash out to break point/illegal op
    0.976            10      FAIL, crashes out to reboot!
    

    Bill, I had to refit your 0.976 with my latest TriBlade code as that had been lost somewhere. Both VMCog versions are included in todays Zog package.
  • jazzedjazzed Posts: 11,803
    edited 2010-08-17 22:41
    This is a long shot question :) Anybody seeing random fill/read errors at $1ff?
  • Heater.Heater. Posts: 21,230
    edited 2010-08-18 00:00
    Which test are you running?

    I've just tried a modified heater3 test which loops for ever. It has not failed anywhere yet. Like so:

    Testing $00010000 bytes
    Up count fill...
    Up count check...
    Down count fill...
    Down count check...
    Random fill...
    Random check...
    Zero fill...
    Checking 00 writing FF...
    Checking FF writing AA...
    Checking AA writing 55...
    Checking 55 writing 00...
    OK

    Works for vmcog versions 0.975 and 0.976.

    Curiouser and curiouser...
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-18 07:08
    Intresting.

    I've read, and re-read, the code *many* times, and I can't spot any multi-legged creatures... (ofcourse this does NOT mean they are not there).
    Heater. wrote: »
    Which test are you running?

    I've just tried a modified heater3 test which loops for ever. It has not failed anywhere yet. Like so:

    Testing $00010000 bytes
    Up count fill...
    Up count check...
    Down count fill...
    Down count check...
    Random fill...
    Random check...
    Zero fill...
    Checking 00 writing FF...
    Checking FF writing AA...
    Checking AA writing 55...
    Checking 55 writing 00...
    OK

    Works for vmcog versions 0.975 and 0.976.

    Curiouser and curiouser...
  • Heater.Heater. Posts: 21,230
    edited 2010-08-18 07:26
    So what do we have:

    1) Zog runs FIBO from HUB RAM OK.
    2) Zog runs FIBO OK from Ext RAM on TriBlade in at least one configuration.
    3) Zog fails to run FIBO from Ext RAM on TriBlade in many other configurations.
    4) The heater3 test has not been seen to fail yet.

    Now, the fact that Zog runs from HUB is irrelevant as the actual code used (for memory access) is different. So ignore 1)

    2) Seems to imply Zog does not have a problem.
    3) and 4) imply that the heater3 test is not thorough enough:) Or at least not simulating what Zog does with FIBO.

    What would help is if someone were running Zog and FIBO on a different Ext memory hardware. Then we could determine if the Problem is with VMCog logic, or VMCog TriBlade interface code, or something weird with my particular hardware.

    I have a problem running heter3 test for long periods as every time our refrigerator goes on/off it crashes out the USB serial connection, resetting the Prop and crashing BST.

    Just now they are rewiring the house so perhaps that electrical glitch will be gone soon.


    Bill: "I've read, and re-read, the code *many* times,"

    Often that is the problem. You end up reading what you "know" is there rather than what is actually there. Is there some way we can probe what is going on? Dump some useful variables or such as it runs. Might be slow but who cares.
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-08-18 08:22
    I'll try the fibo code (is it in the latest zip in the ZPU thread?) with various sizes on PropCade/SPI.

    I am in the middle of finishing qualifying the rev2 Morpheus and Mem+ PCB's, as part of that process I will make a VMCOG driver for the two SPI RAM's I can install on CPU#1 of Morpheus - and run FIBO there as well.

    I am tempted to add memory traces (ie log every read/write) however unless we find a case where it fails for a very small fibo (ie 3 or 4) it will take forever to run.

    I agree about re-reading a code; I may easily be missing something due to that.
    Heater. wrote: »
    So what do we have:

    1) Zog runs FIBO from HUB RAM OK.
    2) Zog runs FIBO OK from Ext RAM on TriBlade in at least one configuration.
    3) Zog fails to run FIBO from Ext RAM on TriBlade in many other configurations.
    4) The heater3 test has not been seen to fail yet.

    Now, the fact that Zog runs from HUB is irrelevant as the actual code used (for memory access) is different. So ignore 1)

    2) Seems to imply Zog does not have a problem.
    3) and 4) imply that the heater3 test is not thorough enough:) Or at least not simulating what Zog does with FIBO.

    What would help is if someone were running Zog and FIBO on a different Ext memory hardware. Then we could determine if the Problem is with VMCog logic, or VMCog TriBlade interface code, or something weird with my particular hardware.

    I have a problem running heter3 test for long periods as every time our refrigerator goes on/off it crashes out the USB serial connection, resetting the Prop and crashing BST.

    Just now they are rewiring the house so perhaps that electrical glitch will be gone soon.


    Bill: "I've read, and re-read, the code *many* times,"

    Often that is the problem. You end up reading what you "know" is there rather than what is actually there. Is there some way we can probe what is going on? Dump some useful variables or such as it runs. Might be slow but who cares.
  • Heater.Heater. Posts: 21,230
    edited 2010-08-18 08:31
    Bill, yep. You want zog_v1_2.zip from here http://forums.parallax.com/showpost.php?p=932090&postcount=355
Sign In or Register to comment.