IN port parameters

Technical questions regarding the XTC tools and programming with XMOS.
JohnR
Experienced Member
Posts: 93
Joined: Fri Dec 11, 2009 1:39 pm

IN port parameters

Post by JohnR »

Hi,

The code below is generated by the compiler in creating an IN port, in this case named 'start'

Code: Select all

          ldw       r0, dp[start] 
          setc      res[r0], 0x8
          ldc       r1, 0x6
          setclk    res[r0], r1
Is there any documentation that defines the value 0x6 that is provided to the clock resource.

Thanks in advance,

John


User avatar
paul
XCore Addict
Posts: 169
Joined: Fri Jan 08, 2010 12:13 am

Post by paul »

0x6 is just the number of the clock block. This is discussed on page 25 of the XS1 Architecture document - see http://www.xmos.com/system/files/xs1_en.pdf

[ We have noted the error - "A clock c which is to use a port p as its clock source can be connected to it by executing a SETCLK c, p instruction." which should read
"A clock c which is to use a port p as its clock source can be connected to it by executing a SETCLK p, c instruction." ]
Paul

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.