TAQOZ - Tachyon Forth for the P2 BOOT ROM

1262728293032»

Comments

  • jmgjmg Posts: 14,015
    hinv wrote: »
    I wasn't thinking of expanding the ROM, but just putting as much as possible of the newer TAQOZ into rom (prioritized, of course, by likely need) and load the lesser needed from SD, I2C, SPI, or whatever.
    That's already been done.
    hinv wrote: »
    This semiconductor fabrication is a bit out of my league, but I would think that updating ROM for a new batch of chips would be pretty trivial.
    All changes have a cost and a risk, so unless there are explicit ROM bugs found, it is unlikely Parallax would change the ROM,
    The issue currently under investigation, may not even involve a ROM layer change.

  • IIRC the ROM is not a mask layer, but built from biased transistors and was one of the first parts to be frozen, well ahead of the Verilog. Chip did mention the cost to change and it wasn’t trivial.
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • I need some help with changing the Clock speed from TAQOZ again.
    I had this working before (page 16 of this thread; last Dec)

    What I need is to be able to change clock speed when using the ROM version of TAQOZ.

    What worked before was to boot, then paste the EXTEND file and then type:
    230400 CONBAUD P2-ES CRUISE

    That used to work.
    Now it does not recognize the "P2-ES" word and then CRUISE mangles my terminal connection.
    The "P2-ES" word was an important word to make this work but I don't even see it in the EXTEND file at all.

    I downloaded the EXTEND file from the P2-->Forth folder on Peter's dropbox but I get the same problem.

    Clearly things have changed and my files are out of date.
    What file do I need?

    Jason
  • I copied the original extensions across to the TAQOZ/Forth folder as "TAQOZ 1V0 ROM EXTEND.FTH". Just paste this in with maybe a small line delay. The code has been attached as a .TXT for reference.

    Here's a test on P2D2r3
    Cold start
    ----------------------------------------------------------------
      Parallax P2  .:.:--TAQOZ--:.:.  V1.0--142          180530-0135
    ----------------------------------------------------------------
    ----------------------------------------------------------------  ok
    ----------------------------------------------------------------  ok
    TAQOZ#   ok
    TAQOZ#   ok
    TAQOZ#   ok
    TAQOZ#   ok
    TAQOZ# TAQOZ   Parallax P2  .:.:--TAQOZ--:.:.  V1.0--142          180530-0135
     209                             
    210 lines and 834 bytes compiled,  with 0 errors in 1,046ms  ok
    TAQOZ#   ok
    TAQOZ# 230400 CONBAUD  25,000,000 XIN CRUISE  ok
    TAQOZ#   ok
    TAQOZ# .CLK 180MHz ok
    TAQOZ# fibos 
    fibo(1) = 458 cycles = 2,544ns @180MHz result =1
    fibo(6) = 778 cycles = 4,322ns @180MHz result =8
    fibo(11) = 1,098 cycles = 6,100ns @180MHz result =89
    fibo(16) = 1,418 cycles = 7,877ns @180MHz result =987
    fibo(21) = 1,738 cycles = 9,655ns @180MHz result =10946
    fibo(26) = 2,058 cycles = 11,433ns @180MHz result =121393
    fibo(31) = 2,378 cycles = 13,211ns @180MHz result =1346269
    fibo(36) = 2,698 cycles = 14,988ns @180MHz result =14930352
    fibo(41) = 3,018 cycles = 16,766ns @180MHz result =165580141
    fibo(46) = 3,338 cycles = 18,544ns @180MHz result =1836311903 ok
    TAQOZ# 
    


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
  • I copied the original extensions across to the TAQOZ/Forth folder as "TAQOZ 1V0 ROM EXTEND.FTH". Just paste this in with maybe a small line delay. The code has been attached as a .TXT for reference.

    Awesome ! Thanks again Peter!
    I will try this tonight ;-)

    J
  • Peter JakackiPeter Jakacki Posts: 8,725
    edited 2019-10-21 - 02:33:20
    Well once again I get sidetracked as I was going to have the new filesystem methods to replace EASYFILE done by now. However, in the meantime I have added reporting like I have for P1 although I will expand on what I have at present no doubt including more detailed information about connected hardware.
    TAQOZ# sysinfo --- 
    KERNEL            Parallax P2  *TAQOZ* Extensible Firmware  V2.2 'CHIP' 200MHz 191021-0900
    MODULES:
      *EASYNET*     WIZnet NETWORK SERVERS 160707.1500 
      *W5500*       WIZNET W5500 driver for TAQOZ V1.0 191007 
      *TEXT*        VGA BMP TEXT 190800-0000
      *BMV*         BMV VIDEO PLAYER 190800-0000
      *WAVE*        WAVE AUDIO FILE PLAYER 190800-0000
      *BMP*         BMP FILE VIEWER 190800-0000
      *AV*          AUDIO & VIDEO DRIVERS 190614-0000 
      *ASMEX*       PASM2 instruction exerciser 191014-0000
      *SPIRAM*      LY68L6400 8MB SPI RAM ACCESS 191020-0000
      *DECOMPILER*  A decompiler for TAQOZ 190825-0000
      *RTC*         RV-3028 RTC DATE and TIME 190800-0000
      *I2C*         I2C BUS DRIVER 191000-0000
      *DISK*        SD DISK REPORTING & FORMATTING TOOLS 190800-0000
      *EASYFILE*    SD CARD and FAT32 with VIRTUAL MEMORY  190800-0000
      *SMARTPINS*   SMARTPIN FUNCTIONS and drive modes 190800-0000
      *P2CLOCK*     P2 CLOCK CONTROL 190800-0000
    MEMORY MAP
      CODE:         $0000_8596 34,198 bytes
      WORDS:        $0000_BD3D 11,540 bytes
      DATA:         $0007_E17A 378 bytes
      64K FREE:                14,247 bytes
    DEVICES
      SD CARD       SANDISK   SD SL08G REV$80 #588053344 DATE:2016/2
      SPI FLASH     $EF40_1400 #525908677058773111
    I2C DEVICES     $A4 $C0 
      RV3028 RTC    2166/66/65 ... 00:00:18 ok
    TAQOZ# 
    
    EDIT: updated sysinfo report
    BTW, "64K FREE" refers to the free memory in the first 64K which I have constrained TAQOZ to including VGA palette and file buffers etc so that screen memory starts at $1.0000

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
  • @Peter Jakacki
    Hi Peter

    I’m playing more with servos and had a few odd observations and a few questions.

    Right now I’m trying to get the SMALLEST movement possible from a Parallax Feedback 360 servo.
    Here are the words I have defined:

    : STOP 745 10000 360 pwm ; -Stop the servo by setting it to it's center Deadzone
    : B 1 DO I 2 + DROP LOOP ; -delay loop
    : M 10000 360 pwm ; -Move servo
    : TWITCH 730 M 25000 B STOP ; -make smallest movement

    Here are the values for M that change the servos movement:
    300 - 639 Fast CW
    640 - 732 Slow CW
    733 - 761 STOPPED (Dead band)
    762 - 855 Slow CCW
    860 - 1260 Fast CCW

    Also, I’m running the servo at 7 volts.
    The servo is under NO physical load.

    There are THREE odd observations I had that all relate to TAQOZ somehow.

    1) I tried a test where I defined M as the following:
    : M 10000 360 pwm 1 us STOP ;

    Using “us” as a delay filled the screen with an endless stream of dots and TAQOZ was no longer responding. I had to reset the board to continue.
    What did I bork ??
    As you can see from my code, I defined “B” to be a simple delay instead of using “us” for now.
    Is there a better way to do a delay?

    2) While testing my “TWITCH” word, I would paste it multiple times into the console.
    I had the unexpected result of it working “most” of the time. There did not seam to be any pattern.
    HOWEVER, when I put the code in a loop, it seemed to work every time and move the same distance everytime.
    Is this an interpreter glitch??

    3) Here’s another oddity when pasting code multiple times into the console.
    Here is the console after I pasted the EXTEND code:

    207
    208
    209
    210 lines and 834 bytes compiled, with 0 errors in 967ms ok
    TAQOZ# 230400 CONBAUD P2-ES CRUISE ok
    TAQOZ# ok
    TAQOZ# ¯ ??? ok
    TAQOZ# : STOP 745 10000 360 pwm ; ok
    TAQOZ# : B 1 DO I 2 + DROP LOOP ; ok
    TAQOZ# : M 10000 360 pwm ; ok
    TAQOZ# : twitch 730 M 25000 B STOP ; ok
    TAQOZ# 16 pin ok
    TAQOZ# mute ok
    TAQOZ# 16 pin ok
    TAQOZ# stop ok
    TAQOZ# 10 0 do I twitch loop ok
    TAQOZ# 10 0 do I twitch loop ok
    TAQOZ# 10 0 do I twitch loop ok
    TAQOZ# 10 0 do I twitch loop


    You will notice that there is no “OK” after the last line.
    The servo wasn’t moving.
    The terminal program and the P2-ES Tx LED did respond when pressing keys but the TAQOZ console remained unresponsive.

    I would love to hear any thoughts you might have on these items :-)

    J
  • @thej
    SEE is your friend, use it.
    TAQOZ# SEE us
    E681: pub us
    1814: 1472     CLKMHZ
    1816: 00BF     W*
    1818: F9E5     485   $01E5 
    181A: 007B     -
    181C: 0E94     WAIT
    181E: 004D     EXIT
          12 bytes 
    
    From this you can see that if you go too low then the calculation overhead forces the unsigned wait parameter to become negative or very large. The practical limit here is around 5us or more but you can always use WAIT for a controlled delay rather than loops.
    TAQOZ# LAP 500 WAIT LAP .LAP --- 610 cycles= 3,050ns @200MHz ok
    

    Your PWM prescaler and frame time seems to be around 18ms so your B delay addresses that by not trying to update more often then that but there's also the servo response time to take into consideration, just how long does it take the servo to start and finish when giving a new value. These are things you need to try out and are either covered in the specifications or they are things you need to measure under controlled conditions.

    I will try to look at your post in more detail later as I need to fly out the door.



    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
  • Peter JakackiPeter Jakacki Posts: 8,725
    edited 2019-10-29 - 11:14:22
    @thej - just got back in and tried your code. Seems there is a problem.
    TAQOZ# .s --- 
     DATA STACK (0) ok
    TAQOZ# 10 0 do I twitch loop ---  ok
    TAQOZ# .s --- 
     DATA STACK (10)
    1   $0000_0009   9
    2   $0000_0008   8
    3   $0000_0007   7
    4   $0000_0006   6
    5   $0000_0005   5
    6   $0000_0004   4
    7   $0000_0003   3
    8   $0000_0002   2
    9   $0000_0001   1
    10   $0000_0000   0 ok
    TAQOZ#
    
    Repeating that each time will leave more and more garbage on the stack until eventually it crashes something. You are passing I to "twitch" which doesn't use up any external parameters. Putting twitch in a loop is giving the servo time to "twitch" but only sending out a single twitch pulse and resetting it is expecting a bit much from any motor or servo. The problem is that you told it to "stop" straight after that twitch pulse. The loop though was going "twitch, wait 20ms, STOP, no delay (so effectively canceling stop) and twitch again etc"

    Best thing is not to have STOP in there at all so that you could test it properly twitching back and forth like this:
    10 FOR twitch 200 ms STOP 200 ms NEXT
    

    BTW, FOR NEXT traditionally was just used as a simple loop without an index etc but TAQOZ implements a default starting index of 0 and increments that as if it were a "0 DO" loop. It's also possible to mix many of the DO LOOP and FOR NEXT compatible words together too. The other thing is that the interactive line is always compiled, just like a definition, so it will always work the same way at the same speed.

    EDIT: I decided to recode the microsecond routine as hubexec and when the P2 clock speed is changed it directly modifies an instruction there to suit. Now you can type "1 us".
    TAQOZ# LAP 1 us LAP .LAP --- 250 cycles= 1,000ns @250MHz ok
    TAQOZ# LAP 10 us LAP .LAP --- 2,498 cycles= 9,992ns @250MHz ok
    




    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
  • thejthej Posts: 217
    edited 2019-10-30 - 00:09:33
    Nice update to the us code :-)

    Curious question for you.
    When I use Lap to time "20 ms" I don't get 20 ms as a duration.
    Is it coded for a specific clock speed?

    lap 20 ms lap .lap 1,600,474 cycles = 8,891,522ns @180MHz ok

    Remember that I am using the ROM version with ROM Extend file.

    J
  • Peter JakackiPeter Jakacki Posts: 8,725
    edited 2019-10-30 - 14:24:20
    @thej - while the limited ROM version can be extended it is mainly useful as a hardware debugging tool. It is just as easy to load in a full version of TAQOZ. I will add a quick TAQOZ binary link to my sig to make that easier.

    Here is the latest TAQOZ binary, just rename it to _BOOT_P2.BIX etc and load it up onto the SD card and it will boot automatically running at 200MHz at 115200 baud default. You can change your settings easily at runtime.
    This is how it should greet you on reset (there's a short delay in there in case you just plugged it in and the USB is still connecting.
    Parallax P2  *TAQOZ* Extensible Firmware  V2.2 'CHIP' 200MHz 191021-0900
    
    KERNEL            Parallax P2  *TAQOZ* Extensible Firmware  V2.2 'CHIP' 200MHz 191021-0900
    MODULES:
      *MANDELBROT*  MANDELBROT VGA DEMO 190800-0000 
      *TEXT*        VGA BMP TEXT 190800-0000
      *BMV*         BMV VIDEO PLAYER 190800-0000
      *WAVE*        WAVE AUDIO FILE PLAYER 190800-0000
      *BMP*         BMP FILE VIEWER 190800-0000
      *AV*          AUDIO & VIDEO DRIVERS 190614-0000 
      *ASMEX*       PASM2 instruction exerciser 191014-0000
      *SPIRAM*      LY68L6400 8MB SPI RAM ACCESS 191020-0000
      *DECOMPILER*  A decompiler for TAQOZ 190825-0000
      *RTC*         RV-3028 RTC DATE and TIME 190800-0000
      *I2C*         I2C BUS DRIVER 191000-0000
      *DISK*        SD DISK REPORTING & FORMATTING TOOLS 190800-0000
      *EASYFILE*    SD CARD and FAT32 with VIRTUAL MEMORY  190800-0000
      *SMARTPINS*   SMARTPIN FUNCTIONS and drive modes 190800-0000
      *P2CLOCK*     P2 CLOCK CONTROL 190800-0000
      *SPIFLASH*
    MEMORY MAP
      CODE:         $0000_7062 28,770 bytes
      WORDS:        $0000_C4F4 9,578 bytes
      DATA:         $0000_EFA4 301 bytes
      64K FREE:                21,650 bytes
    DEVICES
      SD CARD       SANDISK   SD SC64G REV$80 #35190404 DATE:2018/10
    I2C DEVICES
    -------------------------------------------------------------------------------
    TAQOZ# 
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
  • @thej - while the limited ROM version can be extended it is mainly useful as a hardware debugging tool. It is just as easy to load in a full version of TAQOZ. I will add a quick TAQOZ binary link to my sig to make that easier.Here is the latest TAQOZ binary, just rename it to _BOOT_P2.BIX etc and load it up onto the SD card...

    Should this work with the Rev 1 chips? Does not for me...


    dgately
    Livermore, CA (50 miles SE of San Francisco)
  • @dgately
    I'll be trying this tonight with my P2-ES board. I'll let you know how it goes.

    J
  • Peter JakackiPeter Jakacki Posts: 8,725
    edited 2019-10-31 - 00:16:24
    Ok, I checked on my original eval board and the SD doesn't like to mount properly so I fixed it to 100MHz which you can change after boot from the terminal. The RevB eval board works fine but that has to do with an improved layout for the SD. The funny thing is that I had it working fine at one time so I will need to check "what I didn't change" :)

    Use this new binary which I double-checked for the eval board and it boots up at 115.2k baud although I prefer 3Mbd myself. Just remove the .ROM suffix which was added to keep the forum bot happy. The VGA is streamed differently with the RevB silicon.
    I added a final definition manually to indicate that this is the P2ES-EVAL board when it boots up and displays the system info.
    Parallax P2  *TAQOZ* Extensible Firmware  V2.2 'CHIP' 100MHz 191021-0900
    
    KERNEL            Parallax P2  *TAQOZ* Extensible Firmware  V2.2 'CHIP' 100MHz 191021-0900
    MODULES:
      *P2ES-EVAL*
      *ASMEX*       PASM2 instruction exerciser 191014-0000
      *SPIRAM*      LY68L6400 8MB SPI RAM ACCESS 191020-0000
      *DECOMPILER*  A decompiler for TAQOZ 190825-0000
      *RTC*         RV-3028 RTC DATE and TIME 190800-0000
      *I2C*         I2C BUS DRIVER 191000-0000
      *DISK*        SD DISK REPORTING & FORMATTING TOOLS 190800-0000
      *EASYFILE*    SD CARD and FAT32 with VIRTUAL MEMORY  190800-0000
      *SMARTPINS*   SMARTPIN FUNCTIONS and drive modes 190800-0000
      *P2CLOCK*     P2 CLOCK CONTROL 190800-0000
      *SPIFLASH*
    MEMORY MAP
      CODE:         $0000_58CE 22,734 bytes
      WORDS:        $0000_CD75 7,401 bytes
      DATA:         $0000_EF13 156 bytes
      64K FREE:                29,863 bytes
    DEVICES
      SD CARD       SANDISK   SD SC64G REV$80 #35190404 DATE:2018/10
    I2C DEVICES
    -------------------------------------------------------------------------------
    TAQOZ#  ---  ok
    TAQOZ# 
    
    CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7.1 | VT102 | Offline | ttyUSB0                                                                     
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
  • Works great Peter !!!
    ...and 20 ms does indeed equal... 20ms :-)

    J
  • thej wrote: »
    Works great Peter !!!
    ...and 20 ms does indeed equal... 20ms :-)

    J

    Yes, works for me, as well!

    Thanks,
    dgately

    Livermore, CA (50 miles SE of San Francisco)
  • If you connect your VGA on P0 it should display a random VGA pattern. I meant to load AV.FTH into that binary but you can always just copy and paste the file yourself and then type "BACKUP BIX" to quickly backup to the .BIX file although mostly I save to the MBR using "BU" as a shortcut.

    Once loaded you can divert the console output to the VGA using the "VGA" word and use "CON" to divert back to the console.
    Use VIEW <filename> to view 640x480 BMP files, and you can also play 16-bit WAV files over the audio output. On one of my links I even have bitmap demo videos that you can copy onto the SD card and have it play in full screen, QVGA, or both. Don't forget that you can change the P2 clock simply by typing "200 P2MHZ" and once again if you want to lock that in you should do a backup.


    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
  • I've updated the binary for TAQOZ RELOADED (vs TAQOZ ROM) on the P2EVAL RevA and it now includes all the audio and video stuff as well along with a game of breakout for VGA.
    Click the link in my sig (which I double checked)

    The default sysclock is 300MHz and the serial coms starts up at a slow 115200 baud for compatibility (I like 3Mbd). In case you don't have sound try typing EVAL as that sets up P6,7 for audio out (you can backup this config if you want).

    BTW, for some strange reason I seem to have trouble releasing the SD's data out line even though I've tried all the extra clocks etc. This is preventing the SPI Flash from working although the P2D2 has an isolation resistor for this reason.
    Parallax P2  *TAQOZ* Extensible Firmware  V2.2 'CHIP' 300MHz 191021-0900
    
    KERNEL            Parallax P2  *TAQOZ* Extensible Firmware  V2.2 'CHIP' 300MHz 191021-0900
    MODULES:
      *P2ES-EVAL*
      *BREAKOUT*    BREAKOUT FOR THE P2 - 190606
      *TEXT*        VGA BMP TEXT 190800-0000
      *BMV*         BMV VIDEO PLAYER 190800-0000
      *WAVE*        WAVE AUDIO FILE PLAYER 190800-0000
      *BMP*         BMP FILE VIEWER 190800-0000
      *AV*          AUDIO & VIDEO DRIVERS 190614-0000 
      *ASMEX*       PASM2 instruction exerciser 191014-0000
      *SPIRAM*      LY68L6400 8MB SPI RAM ACCESS 191020-0000
      *DECOMPILER*  A decompiler for TAQOZ 190825-0000
      *RTC*         RV-3028 RTC DATE and TIME 190800-0000
      *I2C*         I2C BUS DRIVER 191000-0000
      *DISK*        SD DISK REPORTING & FORMATTING TOOLS 190800-0000
      *EASYFILE*    SD CARD and FAT32 with VIRTUAL MEMORY  190800-0000
      *SMARTPINS*   SMARTPIN FUNCTIONS and drive modes 190800-0000
      *P2CLOCK*     P2 CLOCK CONTROL 190800-0000
      *EXTEND*      Primary kernel extensions 191102-0000
      *SPIFLASH*
    MEMORY MAP
      CODE:         $0000_742A 29,738 bytes
      WORDS:        $0000_C380 9,950 bytes
      DATA:         $0000_EFB8 321 bytes
      64K FREE:                20,310 bytes
    DEVICES
      SD CARD       SANDISK   SD SC64G REV$80 #35190404 DATE:2018/10
    I2C DEVICES
    -------------------------------------------------------------------------------
    TAQOZ#
    

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    P2 --- The LOT --- TAQOZ INTRO & LINKS --- P2 SHORTFORM DATASHEET --- TAQOZ RELOADED - 64kB binary with room to spare
    P1 --- Latest Tachyon with EASYFILE --- Tachyon Forth News Blog --- More
    paypal.png PayPal me
    Brisbane, Australia
Sign In or Register to comment.