Shop OBEX P1 Docs P2 Docs Learn Events
Prop2 FPGA files!!! - Updated 2 June 2018 - Final Version 32i - Page 141 — Parallax Forums

Prop2 FPGA files!!! - Updated 2 June 2018 - Final Version 32i

1138139141143144160

Comments

  • jmgjmg Posts: 15,140
    The moment I power up my FPGA I just type the two autobaud characters "> " + ESC ($3E,$20,$1B) and I am up and running in TAQOZ
    Does it need that trailing space ?
    Autobaud needs just '>' ?

    David mentions `I typed ">" to auto baud and then ESC to get into TAQOZ`

  • David Betz wrote: »
    The FPGA config is locked in after programming so you only ever have to do this once. But you do need to cycle power first time after configuration though. Your terminal can toggle DTR which will generate a reset through the PropPlug or ^G from PNut will reset the P2.

    The moment I power up my FPGA I just type the two autobaud characters "> " + ESC ($3E,$20,$1B) and I am up and running in TAQOZ
    I got it working and I think I figured out that one of the buttons on the Prop123-A9 board resets the P2. Now I'll wait for a TAQOZ document before doing any more playing. I can guess simple Forth commands but I won't be able to do anything with the P2 hardware without more docs.

    I will add some simple examples right now to get you started.


  • Cluso99Cluso99 Posts: 18,066
    Yes, the autobaud requires two characters ">" followed by " " (space).

    You can then optionally type "Prop_Chk 0 0 0 0 " and you will get the version number from the booter.

    Type <esc> to go to TAQOZ or <ctl-D> to go to Monitor.
    From Monitor to TAQOZ type <esc><cr> (sorry the <cr> is required)
    From TAQOZ to Monitor type <ctl-D>

    For me, it's easier to just use a Thread to describe the Monitor and SD features. It can be moved to a site later.
  • Is it normal for all cogs to be running in TAQOZ?
  • ozpropdev wrote: »
    Is it normal for all cogs to be running in TAQOZ?
    It was easier to set them up with the TAQOZ kernel in each unused cog with cogs 1..7 running an idle loop that pauses for 10ms and checks to see if it has received a task. You can stop cog 7 with "7 COGSTOP" or type "8 1 DO I COGSTOP LOOP" or "1 7 ADO I COGSTOP LOOP" to stop all other cogs.
  • Cluso99Cluso99 Posts: 18,066
    Wow Peter,
    Just noticed you used up almost all of ROM!
    I just put in my patches and went from $FFF20 to $FFF40
  • Umm patches? Are things still fluid?
  • Cluso99 wrote: »
    Wow Peter,
    Just noticed you used up almost all of ROM!
    I just put in my patches and went from $FFF20 to $FFF40

    I noticed that Chip must have added some code too but TAQOZ gets copied to lower RAM so it doesn't matter if we overwrite the last 1k (or more) with debug routines. I only have the dictionary sitting there anyway which is only read on a cold start and moved into another area in lower RAM.


    @Tubular - we have an FPGA and PNut version which allows us to load up 1MB up to the hub ROM for testing so I have that loaded up on another FPGA board for that purpose.
    You can though release Write Protect (actually, I don't think it is set at the moment) and write to the hub ROM.
    TAQOZ# $FFC00 $400 DUMPAW 
    0F.FC00: ON$..ALLOT...org^..bytes|..wordsx..longst..byte...word...long...resl..[C]p..GRAB:..NFA'Z..CPA^..CFAj..\6..---6..(N..{h..}o..IFND
    0F.FC80: EFd..IFDEF\..IDLE:...VER...TAQOZ...TERM...AUTO`..SPIRD...SPIRDL...SPIWB...SPIWR...SPICE...SPIWC...SPIWW...SPIWS...SPIPINS...SPIR
    0F.FD00: X...SPITXE...SPITX...CLKIN...CLKOUT...CLOCK...WSLED...WAIT...CLKDIVT..RCSLOWb..HUBSET...WPJ..WEF..CLKHZ...CLKMHZ$..BUFFERS0..ROM
    0F.FD80: 6..IRQVEC<..PTRA...PTRB...DIRA...DIRB...OUTA...OUTB...INA...INB...ERROR$..SFPINS2..SF?T..SFWE:..SFINS@..SFWDP..SFRDSf..SFSIDt..S
    0F.FE00: FJID...SFER4...SFER32...SFER64...SFERASE...SFWRPG...BACKUP...RESTORE...SFRDS...SFWRS...SFC@...SFW@$..SF@*..SF8...SF...SDBUF...sd
    0F.FE80: pinsF..!SDL..SD?...CMD...ACMD...csdf..cidx..SDWR~..SDRDS&..FLUSH...SECTOR...SDRD...SDRDS&..SDADRx..SD@...SD!...SDC@...SDC!...SDW
    0F.FF00: @...SD...END....................................................................................................................
    0F.FF80: ................................................................................................................................ ok
    TAQOZ# WE $FFC00 $400 '?' FILL  ok
    TAQOZ# $FFC00 $400 DUMPAW 
    0F.FC00: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    0F.FC80: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    0F.FD00: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    0F.FD80: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    0F.FE00: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    0F.FE80: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    0F.FF00: ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
    0F.FF80: ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ok
    TAQOZ#
    

  • David Betz wrote: »
    The FPGA config is locked in after programming so you only ever have to do this once. But you do need to cycle power first time after configuration though. Your terminal can toggle DTR which will generate a reset through the PropPlug or ^G from PNut will reset the P2.

    The moment I power up my FPGA I just type the two autobaud characters "> " + ESC ($3E,$20,$1B) and I am up and running in TAQOZ
    I got it working and I think I figured out that one of the buttons on the Prop123-A9 board resets the P2. Now I'll wait for a TAQOZ document before doing any more playing. I can guess simple Forth commands but I won't be able to do anything with the P2 hardware without more docs.

    I will add some simple examples right now to get you started.

    Examples would be nice. Also, is there a doc that describes the hardware on the Prop123-A9 board? In other words, what onboard hardware is connected to P2 pins if any? In particular, is there a P2 pin connected to any of the LEDs or buttons?

  • @David
    P32-P47 Green leds GRN0 - GRN15
    P55 = PB1
    P56 = PB2
    P57 = PB3
    


  • On the Prop123-A9, latest image, the buttons PB3..1 connect to pin P55..57. PB0 is used as a reset button.
    The red leds indicate which cogs are running. I guess you could use them as indicators by starting/stopping cogs.

    I don't know if the WS2812B's are connected, I suspect not. I'm not sure what the green leds are connected to.
  • Nice! I now have an LED blinking. I'm going to need to spend some time with the TAQOZ doc so I can learn how to do something more interesting.
  • cgraceycgracey Posts: 14,133
    A new set of FPGA images for the Prop123-A9 and BeMicro-A9 boards is at the top of this thread. These contain Cluso99's SD booting and monitor, and Peter Jakacki's TAQOZ forth.
  • Cluso99Cluso99 Posts: 18,066
    Chip,
    The BeMicroCV-A9 needs to be a *.jic file please.
  • cgraceycgracey Posts: 14,133
    edited 2018-05-19 08:58
    Cluso99 wrote: »
    Chip,
    The BeMicroCV-A9 needs to be a *.jic file please.

    Whoops! Just rename it. It is a .jic. I'll update it, anyway. Thanks.

    ...Okay. I renamed the file and updated the .zip.
  • Cluso99Cluso99 Posts: 18,066
    edited 2018-05-19 09:13
    Thanks Chip,
    All working as expected. I cannot try Flash and haven't tried any pullups other than the SD card which is internal.

    If SD present, then if boot/file not found, it runs your serial.
  • cgraceycgracey Posts: 14,133
    Cluso99 wrote: »
    Thanks Chip,
    All working as expected. I cannot try Flash and haven't tried any pullups other than the SD card which is internal.

    If SD present, then if boot/file not found, it runs your serial.

    Sounds good. I've tried the pull-ups/pull-down here and they all work as planned.
  • Cluso99Cluso99 Posts: 18,066
    Great news.

    As per todays call, the following additions are tested and ready for the next round (more to come)...

    Cmd_X New command "X" identical to "L" except the listing is in longs (hex) instead of bytes. Note endian switch.
    Cmd_G *FC000G<cr> uses hubset ##$1000_0000 to reset the P2 after a delay1ms
    Headings removed
    P2-MONITOR V1.0
    *100.180x
      100- F40E8E00 5D647A50 5D647850 AD65FE28  '....Pzd]Pxd](.e.'
      104- AB040000 FD647659 FB4C7603 3D900664  '....Yvd..vL.d..='
      108- FD90041C FD63EC58 FD643C1F FD63EC50  '....X.c..<d.P.c.'
      10C- FD652C1F 0D73EC40 F607EC08 FD647A59  '.,e.@.s.....Yzd.'
      110- F027EE18 FD647A58 F037EE01 FD64765A  '..'.Xzd...7.Zvd.'
      114- FD647859 FD647858 0B6FEDFB FCDC0808  'Yxd.Xxd...o.....'
    
  • A question for @Cluso99, @"Peter Jakacki", and/or @cgracey about the boot ROM. I just added some checking to fastspin for flags not being set in instructions like cmp (it's something I forget a lot), and got two warnings from ROM_137PBJ,spin2:
    ROM_137PBJ.spin2:247: warning: instruction cmp used without flags being set
    ROM_137PBJ.spin2:1019: warning: instruction cmp used without flags being set
    
    Looking at the code the lines are:
    line 247: 
    .v	_ret_	cmp	0,#0			'bottom byte used as a counter
    
    line 1019:
    .illegal        cmp     replyR1,          #$05          ' $05(illegal cmd) ?
      if_ne         jmp     #@fail08                        ' <>$01/$05 (not idle/illegal)
    
    Line 247 looks like a slightly tricky but legal re-use of _ret_ to save a long, so the warning there is probably spurious.
    Line 1019 looks suspicious though; should that cmp have a "wz" on it to be used by the following "if_ne"?

    Eric
  • Cluso99Cluso99 Posts: 18,066
    Yep, line 1019 is an error. Thanks for picking this up.
    I often forget the # on JMP/call/djnz etc. a warning would be nice here also. There is one case near Cmd_G where this is legit. It's commented to ensure it's this way.
    When Brad wrote bst there was a warning option for the JMP/call/djnz and it picked up a few bugs in ZiCog.
  • Updated my Prop123-A9 to P2v32f and having a blast exploring the monitor and TAQOZ -- great work guys!

    I've been trying to get SD card boot going but so far, no joy. If I read the notes correctly, the pin connections should be:

    61 - CSn with external pull-up (10k)?
    60 - CLK
    59 - DO
    58 - DI

    The SD card (1GB) is formatted FAT32 with a single P2 .obj file named _BOOT_P2.BIX in the root dir. No load at boot, and using the monitor "R _BOOT_P2.BIX" cmd results in a "!" response. Does anyone with a Prop123-A9 have SD boot up and running?
  • Cluso99Cluso99 Posts: 18,066
    No Garry,
    P61=SD_CLK
    P60=SD_SCn (card has its own internal pullup)

    Note the swap with Flash.
  • cgraceycgracey Posts: 14,133
    garryj wrote: »
    Updated my Prop123-A9 to P2v32f and having a blast exploring the monitor and TAQOZ -- great work guys!

    I've been trying to get SD card boot going but so far, no joy. If I read the notes correctly, the pin connections should be:

    61 - CSn with external pull-up (10k)?
    60 - CLK
    59 - DO
    58 - DI

    The SD card (1GB) is formatted FAT32 with a single P2 .obj file named _BOOT_P2.BIX in the root dir. No load at boot, and using the monitor "R _BOOT_P2.BIX" cmd results in a "!" response. Does anyone with a Prop123-A9 have SD boot up and running?

    Garry, Cluso forgot to mention that P59=DI and P58=DO for both SPI and SD.

    I just updated the booter documention at the end of the Google Doc with two tables that show resistor settings and SPI/SD hookups:

  • Cluso99 wrote: »
    No Garry,
    P61=SD_CLK
    P60=SD_SCn (card has its own internal pullup)

    Note the swap with Flash.

    Thanks! Besides having clk/cs wrong, I had an open pin->SD_DO connection :surprise:

    Still no joy on the file load though. The file doesn't load/run at startup, but I can start the monitor. When I try the "R_BOOT_P2.BIX" command it hangs. I ran your "SD Test & Debugger v121a" program and its output showed MBR and DIR data that looked OK, so I'm not quite sure where to go from here. What's your usual procedure for preparing an SD card for use? It's a 1GB microSD with a single partition sized at ~500MB and FAT32 file system with the default 4KB cluster size. The P2 object file is the correct size (19,136 bytes), the data is contiguous, and was written from offset 0x102c00 to 0x1076c0 (sectors 2,070 to 2,107).
  • Cluso99Cluso99 Posts: 18,066
    Garry,
    I will dig out some of my old tests to try the card and see what is happening.
  • Cluso99Cluso99 Posts: 18,066
    Chip,
    Autobaud is not working at 4800 baud and below. Probably a timeout preventing it working as switching back to 9600 and above and entering "> " and Ctl-D works.
    Not sure if you want it to work below 9600.
  • Cluso99Cluso99 Posts: 18,066
    pnut
    I had a typo and pnut compiled it
    if_n call #_HubTxString
  • Cluso99Cluso99 Posts: 18,066
    Garry (and all)

    Here is a little demo to call some of the ROM routines.
    It's purpose if for Garry to try and find why his SD card is not working.

    Garry, compile and download this program using pnut. If your SD had been working and there was valid boot code, this program would not run. So you would need to insert the SD card after the "Demo.." message while the program stalls waiting for operator input. Once you hit enter, the program will try the SD card and report a couple of status points reached. Let me know where it fails please, and I will break it down some more.

    All. The demo shows how to initialise and run a few of the Monitor Serial routines and also call the SD high level routines which is able to load and run a file from SD.

    Tip: To avoid loading SD on power up, don't have files "_BOOT_P2.BIX" and "_BOOT_P2.BIY" on your SD card. This Demo will try to load a file "_BOOT_P2.BIZ" on the SD. You can test this works from the monitor using the run command.
  • Cluso99 wrote: »
    Garry (and all)

    Garry, compile and download this program using pnut. If your SD had been working and there was valid boot code, this program would not run. So you would need to insert the SD card after the "Demo.." message while the program stalls waiting for operator input. Once you hit enter, the program will try the SD card and report a couple of status points reached. Let me know where it fails please, and I will break it down some more.
    Renamed the file to run to "_BOOT_P2.BIZ".
    At the "Demo..." prompt I insert the SDCard then Enter and get:
    Init passed
    MBR  passed
    DIR  passed
    
    No further messages appear, so it looks like something may be going awry in the monitor #readFILE routine, as I assume that "File failed" should be output if the call had returned with an error status?
Sign In or Register to comment.