[Next] [Previous] [Up] [Top]

7.0 Appendix: Generated Code

7.1 S-56X Wormhole Generated Assembly Code


;User: pino
;Date: Mon Apr 19 11:13:06 1993
;Target: S-56XWH
;Universe: tonewh3
	org p:
	ori	#03,mr	;disable interrupts
	include `/home/ohm1/users/messer/ptolemy/lib/cg56/intequlc.asm'
	include `/home/ohm1/users/messer/ptolemy/lib/cg56/ioequlc.asm'
	include `/home/ohm1/users/messer/ptolemy/lib/cg56/s56xwh.asm'
;initialization code from star wormHole3.tonewh31.tonewh3.Tone1 (class CG56Tone)
;initialization for state wormHole3.tonewh31.tonewh3.Tone1.state1
	org	y:1
	dc	0.0
;initialization for state wormHole3.tonewh31.tonewh3.Tone1.state2
	org	x:8
	dc	0.0626666167821521
	org p:
;initialization code from star wormHole3.tonewh31.tonewh3.UpSample1 (class CG56UpSample)
	move	#0,r1
	move	#0.0,a
	rep	#4
	move	a,x:(r1)+
;initialization code from star wormHole3.tonewh31.tonewh3.DownSample1 (class CG56DownSample)
;initialization code from star wormHole3.tonewh31.tonewh3.Fork.output=31 (class AnyAsmFork)
	andi	#$fc,mr	;enable interrupts
LOOP_0
;code from star wormHole3.tonewh31.tonewh3.Tone1 (class CG56Tone)
	move	x:8,x1
	move	y:1,a
	move	#0.992114701314478,x0
	mac	-x1,x0,a	x1,x:4
	neg	a
	mac	x1,x0,a		x1,y:1
	move	a,x:8
;code from star wormHole3.tonewh31.tonewh3.Fork.output=31 (class AnyAsmFork)
;code from star wormHole3.tonewh31.tonewh3.UpSample1 (class CG56UpSample)
	move	x:4,x0
	move	x0,x:0
;code from star wormHole3.tonewh31.tonewh3.Tone1 (class CG56Tone)
	move	x:8,x1
	move	y:1,a
	move	#0.992114701314478,x0
	mac	-x1,x0,a	x1,x:5
	neg	a
	mac	x1,x0,a		x1,y:1
	move	a,x:8
;code from star wormHole3.tonewh31.tonewh3.Fork.output=31 (class AnyAsmFork)
;code from star wormHole3.tonewh31.tonewh3.UpSample1 (class CG56UpSample)
	move	x:5,x0
	move	x0,x:2
;code from star wormHole3.tonewh31.tonewh3.DownSample1 (class CG56DownSample)
	move	x:4,x0
	move	x0,x:9
; Output worm code for output#2
initial_wait_1
	move	y:WordCnt,a	; get word count
	tst 	a
	jeq	initial_wait_1
	jclr	#m_dma,x:m_hsr,initial_wait_1
	move #4,r0	;read starting location address
	do	a,WHL_2
wait_3	jclr	#m_htde,x:m_hsr,wait_3	;wait for host port available
	movep	x:(r0)+,x:m_htx
WHL_2	nop
	move	#0,a
	move	a,y:WordCnt
	nop
; Output worm code for output
initial_wait_4
	move	y:WordCnt,a	; get word count
	tst 	a
	jeq	initial_wait_4
	jclr	#m_dma,x:m_hsr,initial_wait_4
wait_5	jclr	#m_htde,x:m_hsr,wait_5	;wait for host port avail
	movep	x:9,x:m_htx
	move	#0,a
	move	a,y:WordCnt
	nop
; Output worm code for output
initial_wait_6
	move	y:WordCnt,a	; get word count
	tst 	a
	jeq	initial_wait_6
	jclr	#m_dma,x:m_hsr,initial_wait_6
	move #0,r0	;read starting location address
	do	a,WHL_7
wait_8	jclr	#m_htde,x:m_hsr,wait_8	;wait for host port available
	movep	x:(r0)+,x:m_htx
WHL_7	nop
	move	#0,a
	move	a,y:WordCnt
	nop
	jmp	LOOP_0
	jmp	ERROR
; --------------------- Symmetric memory map: 
; --------------------- x memory map: 
; Loc 0, length 4, port wormHole3.tonewh31.tonewh3.UpSample1(output), type ANYTYPE
; Loc 4, length 2, port wormHole3.tonewh31.tonewh3.Fork.output=31(input), type ANYTYPE
; Loc 6, length 2, port wormHole3.tonewh31.tonewh3.Fork.output=31(output#2), type ANYTYPE
; Loc 8, length 1, state wormHole3.tonewh31.tonewh3.Tone1(state2), type FIX
; Loc 9, length 1, port wormHole3.tonewh31.tonewh3.DownSample1(output), type ANYTYPE
; --------------------- y memory map: 
; Loc 1, length 1, state wormHole3.tonewh31.tonewh3.Tone1(state1), type FIX


Software Synthesis for Single-Processor DSP Systems Using Ptolemy - 04 SEP 94

[Next] [Previous] [Up] [Top]