Page 1 of 1

32-bit port shift register

Posted: Mon Jan 15, 2018 12:08 pm
by eez-open
I'd like to learn more about 32-bit port shift register capability that is mentioned in e.g. XMOS Programming Guide (Chapter 6.11). It is not clear does each port has 32-bit wide/long shift register or that assume that declaring buffered port as 32 wide is applicable only to 32-bit hardware port, and consequently consume 32 pins. I'd like to serialize 16-bit wide data to 1-bit port. Is that possible or not?
Many thanks in advance.

Re: 32-bit port shift register

Posted: Mon Jan 15, 2018 2:50 pm
by CousinItt
Hi eez-open,

yes, you can use the shift register for 1-, 4-, 8- or 16-bit ports.

See the xmos documents Introduction to XS1 ports and XS1-Ports-Specification for more info.

Re: 32-bit port shift register

Posted: Mon Jan 15, 2018 4:29 pm
by eez-open
Great, thanks a lot. So for 32-bit shift register I need to declare :32. Does it mean that I can also declare 16-bit as :16, or shift register is always 32-bit wide (I didn't read a complete article that you suggested yet).

Re: 32-bit port shift register

Posted: Mon Jan 15, 2018 7:46 pm
by CousinItt
I don't think you can have a buffer for a 32-bit port - sorry, maybe I should have made that more clear.

Buffering for 16-bit and 8-bit ports only support 32-bit transfer widths (between the application and the buffered port).

4-bit ports can have 8- or 32-bit transfers widths, and 1-bit ports can have 4-, 8- or 32-bit transfer widths.

This is all covered in sections 3 and 4 of Introduction to XS1 ports. Take a look.

Re: 32-bit port shift register

Posted: Mon Jan 15, 2018 7:56 pm
by eez-open
Hm, yes I found that. 32-bit is too wide, but it should be possible to do that in two pass with 8-bit. I'd like to load two 8-bit serial-in-parallel-out registers ('595 type) using single 1-bit port for data.