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

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

19899101103104160

Comments

  • There are no interrupts being used at this stage, in fact, there is nothing at all unusual about it as I am trying to keep it simple and functional. You can try the files yourself if you click on my Forth logo and then the Dropbox link. Select P2 then V27 for taqoz.spin which is the basic kernel that starts up at 921600 baud. There is no need to load EXTEND and EASYFILE in the Forth folder if you just want to see it stop responding to console input after about 8 minutes.
  • jmgjmg Posts: 15,140
    It seems to be kinda proportional, about 8 mins at 80MHZ but closer to 50 mins at 20MHZ ! But either way, with any V27, it crashes :(
    Even if some counter failed to carry correctly at highest bits (being the longest delays), that's going to give a false time, but not an actual crash.
    Wonder if that's a 'warming time' ? can you try some forced air cooling, and does it vary with time of day ?

    How much code is looping for the test case ?
    Is that HUB or COG exec ?
    Can you run a couple of COGs just as heartbeats, at the same time, to see if the Clock system gets disturbed ?


    Any sources of radiation nearby ? ;)
  • jmgjmg Posts: 15,140
    ozpropdev wrote: »
    @Peter,@Chip
    I've been running my collection of code on both P123-A9 and BeMicro CV-A9 with V27.
    I'm not seeing any lockups at 80MHz with 8 cogs running and lots of cordic,hub etc activity.
    One program is 250k and loads first time every time.
    I'll keep throwing code at them and see what turns up.

    Can you run Peter's test code, to see if another site can verify similar failures ?

  • @Peter
    I've tried TAQOZ.spin2 on my Bemicro CV-A9 board with V27z and checked 6 times every 10 minutes for a response and no lock ups occurred.
    Seems Ok on my board.
    TAQOZ#   ok
    
    I'll try it next on the P123_A9 board.
  • ozpropdev wrote: »
    @Peter
    I've tried TAQOZ.spin2 on my Bemicro CV-A9 board with V27z and checked 6 times every 10 minutes for a response and no lock ups occurred.
    Seems Ok on my board.
    TAQOZ#   ok
    
    I'll try it next on the P123_A9 board.
    This is getting weirder and weirder as I have checked this over and over again on two different CVA9 boards with the same result but no problems with V26. My CVA9 is plugged into a motherboard with two SD card slots and other things so I will monitor the current perhaps but there shouldn't be any real difference between V26 & V27. I am running 12V into 5V 1.5A switching regs.
  • cgraceycgracey Posts: 14,131
    Peter, can you get your whole test setup running from the same AC plug strip? If there are any ground loops, something like an air conditioner turning on/off elsewhere can cause resets. I know it sounds silly and doesn't fully explain why one version would work and the new one doesn't, but there might be something delicate going on.
  • jmgjmg Posts: 15,140
    ozpropdev wrote: »
    @Peter
    I've tried TAQOZ.spin2 on my Bemicro CV-A9 board with V27z and checked 6 times every 10 minutes for a response and no lock ups occurred.
    Seems Ok on my board.
    TAQOZ#   ok
    
    I'll try it next on the P123_A9 board.
    This is getting weirder and weirder as I have checked this over and over again on two different CVA9 boards with the same result but no problems with V26. ...

    Hmmm, I wonder what else is different ?
    Do these all have the same speed grade FPGA ? (& same CV-A9 design rev numbers ? )
    Is the serial link the same (on board) or different (off board ?)

    Is the serial code using WAIT for timing ?
    If that somehow skips, could that give the appearance of a lockup ?
  • I'm using a propplug and powering the board from USB.
    Board marked as BeMicro CV-A9 PCB Rev. B.
    FPGA part is 5CEFA9F23C8N
  • RaymanRayman Posts: 13,767
    Maybe disconnect propplug after programming?
  • @Peter
    When your A9 locks up are the 8 cog leds still lit?
  • cgraceycgracey Posts: 14,131
    Sorry I haven't been on this lock-up problem more. Right now I'm trying to get the ESD circuits worked out.

    Diodes are great because they turn on almost instantaneously. FETs are much slower and have much more capacitance to overcome. What would be optimal to make would be an SCR, but it looks like a compact design would require exceptions to the design rules. I know they have developed these, but ESD designs are almost always proprietary for smaller processes. I will try to make an SCR tomorrow using available PNP and NPN devices.

    Here is what an SCR-based ESD clamp looks like:

    550 x 322 - 132K
  • Since I've been concentrating on TAQOZ itself I haven't been bothering playing with V27 since V26 is stable and doesn't lockup. Why does V27 lockup only with me? No idea but I will try out it out again after I upgrade TAQOZ and then check it again with V27. Hardware shouldn't be a problem but I will monitor the supply and current as well as checking the LEDs.

    I was musing that English and Forth have far more in common than say Spanish and Forth. How so? Well in Forth we supply the values before the word that it applies to. So for instance in English if we had a car that was fast and was red we would say "fast red car". So both fast and red are attributes or values that apply to car and normally I express code this way by having fast and red return with values to be processed by the action word "car". In Spanish we would say "coche rojo rápido" or car red fast which is similar to say C etc in that you could say Car(red,fast). Hmmn, interesting, don't you think?

    Chip, how does this SCR based ESD handle latch-up? Are these N-well diodes or do OnSemi have the more compact polysilicon diode capability?
  • Heater.Heater. Posts: 21,230
    I think you have it backwards.

    "car" is not an action it's an object. An action might be "drive". As in "Drive the car fast" Which in many programming languages ends up looking like "drive(fast)" or perhaps "car.drive(fast)". It's action then parameter. As in English.

    Your example "fast red car" is declarative. Which is also like declarations in C and other languages. "unsigned int car;".

    More mathematically, in English we might say "multiply 7 and 42" which of course comes out like the typical programming language function statement mul(7, 42). Or we might say "calculate 7 times 42" which is just the usual operator style "7 * 42".





  • Heater. wrote: »
    I think you have it backwards.

    "car" is not an action it's an object. An action might be "drive". As in "Drive the car fast" Which in many programming languages ends up looking like "drive(fast)" or perhaps "car.drive(fast)". It's action then parameter. As in English.

    Your example "fast red car" is declarative. Which is also like declarations in C and other languages. "unsigned int car;".

    More mathematically, in English we might say "multiply 7 and 42" which of course comes out like the typical programming language function statement mul(7, 42). Or we might say "calculate 7 times 42" which is just the usual operator style "7 * 42".

    Ha! gotcha Heater, language bait gets you every time ;)


  • Heater.Heater. Posts: 21,230
    edited 2017-11-18 17:09
    Ouch! Peter, you got me. Hook line and sinker.

    And I have been biting my lip, trying to stay our of languages wars on the net for many months now. Especially Forth wars here. Not only that but editor wars, operating system wars, tab vs space wars, goto wars, semi-colon wars, etc.

    Problem is after many years of programming in many different languages I have pretty much come to hate them all!

    Obvious answer is to create my own language. I was thinking of basing it on "goto" and calling it GOTO. Just to annoy people. I mean, what other construct to you need in a HLL? Sadly I find somebody beat me to it: https://esolangs.org/wiki/GOTO++




  • RaymanRayman Posts: 13,767
    edited 2017-11-18 18:33
    What's going on with input on highest pins?

    INB used to work on pin #55, for example, and now it doesn't...

    I don't know when this happened, but V10 works and V27 doesn't...
    V23 also has this issue...
  • cgraceycgracey Posts: 14,131
    Rayman, you are using a DE2-115, right? I think I made some changes in the past and didn't know that anybody would notice. If you need those things put back, tell me, please.
  • RaymanRayman Posts: 13,767
    edited 2017-11-18 20:51
    I'm on P123-A9
    I guess it's OK as long as you know about it...
    Don't want this in "final silicon"
  • cgraceycgracey Posts: 14,131
    Rayman wrote: »
    I'm on P123-A9
    I guess it's OK as long as you know about it...
    Don't want this in "final silicon"

    Hmmmmm.... Prop123-A9 should have all pins working. So, you're saying they don't?
  • RaymanRayman Posts: 13,767
    edited 2017-11-18 21:17
    I'm not sure the very top pins ever worked as input.
    But, #55 is new. Works with V10 still...

    Maybe pins reserved for booting won't work as input somehow?
  • RaymanRayman Posts: 13,767
    I'm trying to port some FSRW code from V10 to V27...
    That pin issue was driving me crazy, couldn't figure out why it wasn't working...

    Anyway, I think I have another issue...
    Looks like RET used to return along with C and Z values it had before return.
    Now, RET won't bring back Z even if wz is specified.
    Is this correct?
  • ozpropdevozpropdev Posts: 2,791
    edited 2017-11-18 22:03
    @Rayman
    P55 is assigned to the pushbutton "PB1" on the P123-A9 board

    Edit: and the header will still work as an output.
  • RaymanRayman Posts: 13,767
    Is there an easy way to get C and Z set inside a subroutine call back to main routine after the RET?
  • Rayman wrote: »
    Is there an easy way to get C and Z set inside a subroutine call back to main routine after the RET?
    	modcz	_set,_set wcz
    
  • ozpropdevozpropdev Posts: 2,791
    edited 2017-11-18 23:41
    @Chip,@Rayman
    I think I've found the issue with the ret instruction.

    Running this code below on P123-A9 with V27 I can add "nop padding" before the ret instruction to change its behaviour.
    dat	org
    
    	getct	pa
    	testb	pa,#24 wz
    	drvz	#32
    	call	#there
    	drvz	#33
    	jmp	#0
    
    there	testbn	pa,#24 wz
    
    	long	0[8]	'nop padding here changes behavour???
    			'values of 0 and 8 don't restore z flag
    			'and 24,32,48,56,72,80,96,104 hang code.
    			'all other values up to 103 are Ok. (tested up to 104)
    	ret	wz
    
    There seems to be a pattern there.

    Edit: V26 same as V27.

  • cgraceycgracey Posts: 14,131
    edited 2017-11-18 23:41
    Oh, boy! This is a serious problem. I will look at this tonight when I'm back in the shop. Sorry this has popped up.
  • cgraceycgracey Posts: 14,131
    edited 2017-11-18 23:44
    Can anyone check what happens on the DE2-115 that has four cogs? Does it have this return/flag problem?
  • cgracey wrote: »
    Can anyone check what happens on the DE2-115 that has four cogs? Does it have this return/flag problem?
    Yes, DE2-115 has the same problem.


  • RaymanRayman Posts: 13,767
    Thanks, that looks like a way...
    But, I only find this in spreadsheet:
    MODCZ #cz {WC/WZ/WCZ} Modify C/Z according to cccc and zzzz. C = cccc[{C,Z}], Z = zzzz[{C,Z}].

    Looks like c and z are nibbles that are some kind of functions of current C and Z?

    ozpropdev wrote: »
    Rayman wrote: »
    Is there an easy way to get C and Z set inside a subroutine call back to main routine after the RET?
    	modcz	_set,_set wcz
    

  • @Rayman
    ---------------
    MODCZ constants
    ---------------
    
    _CLR                    =       %0000
    _NC_AND_NZ              =       %0001
    _NZ_AND_NC              =       %0001
    _GT                     =       %0001
    _NC_AND_Z               =       %0010
    _Z_AND_NC               =       %0010
    _NC                     =       %0011
    _GE                     =       %0011
    _C_AND_NZ               =       %0100
    _NZ_AND_C               =       %0100
    _NZ                     =       %0101
    _NE                     =       %0101
    _C_NE_Z                 =       %0110
    _Z_NE_C                 =       %0110
    _NC_OR_NZ               =       %0111
    _NZ_OR_NC               =       %0111
    _C_AND_Z                =       %1000
    _Z_AND_C                =       %1000
    _C_EQ_Z                 =       %1001
    _Z_EQ_C                 =       %1001
    _Z                      =       %1010
    _E                      =       %1010
    _NC_OR_Z                =       %1011
    _Z_OR_NC                =       %1011
    _C                      =       %1100
    _LT                     =       %1100
    _C_OR_NZ                =       %1101
    _NZ_OR_C                =       %1101
    _C_OR_Z                 =       %1110
    _Z_OR_C                 =       %1110
    _LE                     =       %1110
    _SET                    =       %1111
    
    
    Examples:
    
    MODCZ   _CLR, _Z_OR_C   WCZ     'C = 0, Z |= C
    MODCZ   _NZ,0           WC      'C = !Z
    MODCZ   0,_SET          WZ      'Z = 1
    


Sign In or Register to comment.