Shop OBEX P1 Docs P2 Docs Learn Events
COG/LUT exec,streamer and interrupts acting weird [SOLVED] - Page 2 — Parallax Forums

COG/LUT exec,streamer and interrupts acting weird [SOLVED]

2»

Comments

  • Chip
    Further testing reveals CALLPA/PB have the same issue as CALLD.
    If I manually encode the instructions they work fine.
    It seems all these rel9 issues are linked.
  • cgraceycgracey Posts: 14,133
    ozpropdev wrote: »
    Chip
    Further testing reveals CALLPA/PB have the same issue as CALLD.
    If I manually encode the instructions they work fine.
    It seems all these rel9 issues are linked.

    The ROM booter uses CALLPA. The rel9 stuff was what I worked on recently. I don't know what happened. I'll be back into that soon. Just testing the test chip now.
  • cgracey wrote: »
    The ROM booter uses CALLPA. The rel9 stuff was what I worked on recently. I don't know what happened. I'll be back into that soon. Just testing the test chip now.

    The issue is a backward reference error.
    The following example works fine when forward referencing but not backward referencing.
    I notice the Rom Booter CALLPA's are all forward referencing.
    dat	org
    	
    		or	dirb,##$ffff
    		jmp	#mytest1
    
    leds1		setword	outb,pa,#0	
    		ret
    
    mytest1		callpa	#$5a,#leds1	'leds1 fails - backward reference
    me		jmp	#me		'leds2 works -  forward reference
    
    
    leds2		setword	outb,pa,#0
    		ret
    




  • cgraceycgracey Posts: 14,133
    ozpropdev wrote: »
    cgracey wrote: »
    The ROM booter uses CALLPA. The rel9 stuff was what I worked on recently. I don't know what happened. I'll be back into that soon. Just testing the test chip now.

    The issue is a backward reference error.
    The following example works fine when forward referencing but not backward referencing.
    I notice the Rom Booter CALLPA's are all forward referencing.
    dat	org
    	
    		or	dirb,##$ffff
    		jmp	#mytest1
    
    leds1		setword	outb,pa,#0	
    		ret
    
    mytest1		callpa	#$5a,#leds1	'leds1 fails - backward reference
    me		jmp	#me		'leds2 works -  forward reference
    
    
    leds2		setword	outb,pa,#0
    		ret
    




    Ok. That makes sense. I will fix this on Monday. Sorry about the trouble. That section is going to get revamped.
  • Chip
    Only forward jumps seem to work on the "Jxxx/JNxxx S/#" instruction too.
    Pnut seems to be calculating the correct relative offset as if it's a rel9 instruction.
    Maybe the glitch is in the verilog code?
Sign In or Register to comment.