AnsweredAssumed Answered

sport simulation problem

Question asked by idq on Mar 26, 2010
Latest reply on Mar 30, 2010 by barrygi
Guys,
I am attempting to simulate a project which needs audio input on SPORT0 and audio output on SPORT2
I have set up "streams" to point to and from .dat files but when I hit run the data from the files doesn't turn up in the RX0A register as expected.
streams setup is:
source target (device) -> destination target (device)
FILE(testInput.dat,Hexidecimal,Rewind,Circular) -> SPORT0A
SPORT2A -> FILE(testOutput.dat,Hexidecimal,Rewind)
The content of the testInput file is:
01234567
12345678
23456789
3456789A
456789AB
etc...
The values which turn up in the RX0A are:
0x00000000
0x80000000
0x00000000
0x80000000
0x00000000
etc...
I am running VDSP++ 5.0 update 7 on windows 7 (professional) and am simulating a 21161n sharc.
Also, the simulation runs incredibly slowly (5s for "96kHz" sample) even thought to computer I'm using is new, is there any way to speed it up or is that just how it works.
Many thanks,
Iain
Code below hopefully shows the important bits...
-------------------------------------------------------------CODE SEGMENTS-------------------------------------------------
BootRoutine:
ustat1 = 0x31001               // Value To Set SPORT Clocks To 25MHz (CLKDIV = 1, FSDIV = 31)
dm(DIV0) = ustat1;
dm(DIV2) = ustat1;
// Clear Sports
ustat1 = 0;
dm(SPCTL0) = ustat1;
dm(SPCTL2) = ustat1;
// SPORT0 -> Activate Channels A&B, Internal clk/frame, Receive, 32bits, I2S Mode, Enable DMA, Enable Chaining, Active Low Frame Sync, External Clock, FS Is Locked To BOTH Channels
ustat1 = FSR|IFS|ICLK|SPEN_A|SLEN32|OPMODE|LFIRST|FS_BOTH;
dm(SPCTL0) = ustat1;
// SPORT2 -> Activate Channels A&B, Internal clk/frame, Transmit, 32bits, I2S Mode, Enable DMA, Enable Chaining, Active Low Frame Sync, External Clock, FS Is Locked To BOTH Channels
ustat1 = FSR|IFS|ICLK|SPEN_A|DDIR|SLEN32|OPMODE|LFIRST|FS_BOTH;
dm(SPCTL2) = ustat1;
bit set imask SP0I;                         // Initiate IRQ0 Interrrupt (Audio In)
BootRoutine.end:
AudioProcInt:
r0 = dm(RX0A);
dm(TX2A) = r0;
rti;
AudioProcInt.end:
-----------------------------------------------------------------------------------------------------------------------------

Outcomes