Completely puzzled over buffered ports

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Completely puzzled over buffered ports

Post by Interactive_Matter »

Hi,

I am completely puzzled over buffered port. The Programming XC Handbook gives a lot of hints and http://github.xcore.com/doc_tips_and_tr ... reams.html is also quite helpfull.
But somehow neither of them (combined with random source code) can really answer my problem.

What I understood so far, correct me if I am wrong:

Code: Select all

buffered out port:32 jtag_pin_TCK  = XS1_PORT_1D;
defines (with the clock and so on) a buffered 32 bit port which is serialzed with the clock on a 1 bit port.
This is all configured by

Code: Select all

init() {
  configure_clock_rate(tck_clk, 100, 10);
  configure_out_port(jtag_pin_TCK, tck_clk, 0xffffffff);

  configure_clock_src(jtag_clk, jtag_pin_TCK);
  configure_out_port(jtag_pin_TDI, jtag_clk, 0);
  configure_in_port(jtag_pin_TDO, jtag_clk);
  configure_out_port(jtag_pin_TMS, jtag_clk, 0);
  start_clock(tck_clk);
  start_clock(jtag_clk);
}
Is this just possible with one bit ports?
What if I got a 8 bit port (e.g. XS1_PORT_8A) and want to clock out multiple values parallel. Is it best to redefine it as 1 bit ports (and which would that be for the example 8A, or where do I find this information)??
The output values are 16 bit. So either lots of 16 bit ports serialized to on bit ports or is it possible to have a 128 bit port serialized to an 8 bit port?


User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Post by Folknology »

Is this just possible with one bit ports?
No it works with all port widths 1,4,8 and 16
What if I got a 8 bit port (e.g. XS1_PORT_8A) and want to clock out multiple values parallel. Is it best to redefine it as 1 bit ports (and which would that be for the example 8A, or where do I find this information)??
If you defined the buffered port:32 using 8A and clocked it it would output 4 successive Bytes on that port every 4 clock cycles.
The output values are 16 bit. So either lots of 16 bit ports serialized to on bit ports or is it possible to have a 128 bit port serialized to an 8 bit port?
I assume 32 is the limit as the natural XS1 register size.


checkout the ports doc
regards
Al
User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Post by Interactive_Matter »

Thanks!

That not only answers my question, but also is the answer I wanted to hear.
It is a bit confusing with all the various documents everywhere.
@XMOS can't you just create wiki pages for all the documentation & hints you got in your PDFs an on github. Then we can discuss edit, reorganize, link and rework it there. Documentation should be a living entity!

Marcus
User avatar
jason
XCore Expert
Posts: 577
Joined: Tue Sep 08, 2009 5:15 pm

Post by jason »

This topic has been split in to two due to the separate topic of copyright being discussed. This can be found here: http://www.xcore.com/forum/viewtopic.php?f=10&t=1091