Constraint Check - MAYBE - biquadCascade

Technical questions regarding the XTC tools and programming with XMOS.
voodoosound
Active Member
Posts: 63
Joined: Sat Oct 15, 2011 8:53 pm

Constraint Check - MAYBE - biquadCascade

Post by voodoosound »

Hi everyone,

i use the biquadCascade from sc_dsp_filter like this:

Code: Select all

for (int i=0;i<number_of_fifos;i+=2)
{
	unsigned sample;
	sample = media_output_fifo_pull_sample(ofifos[i], timestamp);
	samples_output <: (unsigned) biquadCascade(bs_l, (signed) sample);
}

for (int i=1;i<number_of_fifos;i+=2)
{
	unsigned sample;
	sample = media_output_fifo_pull_sample(ofifos[i], timestamp);
	samples_output <: (unsigned) biquadCascade(bs_r, (signed) sample);
}
and i get those building output:

Code: Select all

Constraint check for "stdcore[0]" (node "0", core 0):
  Stack available:   0x00007638,   used: 0x00002304 .  OKAY
  Threads available:          8,   used:          6+.  MAYBE
  Timers available:          10,   used:          6+.  MAYBE
  Chanends available:        32,   used:         21+.  MAYBE
    Constraints checks PASSED WITH CAVEATS.

since the biquad is not working yet and i only get those constraints when i use the biquadCascade, i assumed that these things are correlated.

but how can i get rid of this uncertainty?

regards
CK


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

Fix biquadAsm.s so that where it now says

Code: Select all

    .linkset biquadAsm.nstackwords,NWORDS
it instead says

Code: Select all

    .linkset biquadAsm.nstackwords,NWORDS
    .linkset biquadAsm.maxthreads,1
    .linkset biquadAsm.maxtimers,0
    .linkset biquadAsm.maxchanends,0
and perhaps you want to add

Code: Select all

    .linkset biquadAsm.locnochandec,1
    .linkset biquadAsm.locnoside,1
(Note: I haven't checked that any of these values are correct, but
they probably are. Check anyway :-) )
voodoosound
Active Member
Posts: 63
Joined: Sat Oct 15, 2011 8:53 pm

Post by voodoosound »

Thanks for your help, but that didnt work so far...

with those values it didnt work, but they look ok...

what does that mean?

Code: Select all

    .linkset biquadAsm.locnochandec,1
    .linkset biquadAsm.locnoside,1
User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

Oh, you need to make those variables global as well, using .globl
like the stack words thing already is.

For documentation, see http://www.xmos.com/make-assembly-progr ... os-xs1-abi.
voodoosound
Active Member
Posts: 63
Joined: Sat Oct 15, 2011 8:53 pm

Post by voodoosound »

Thanks, that helped!