The JTAG was intended for boundary scan, but it is often also used for configuration, debug, programming, and so on. It is a standard, so the pins are:
- TCK: JTAG clock
- TMS: the mode/select signal
- TDI: JTAG data in
- TDO: JTAG data out
- nTRST: the optional JTAG reset
You usually connect the components in series, one TDO goes to the next chip's TDI, in a chain. Then TMS, TCK and nTRST goes to all. This is the most common topology but there are other ways too.
Scan chain, now, is a whole different beast. These are used inhouse by the maker. So you often have:
- SCANMODE: enters scan mode
- SCANEN: selects scan shift
- SI: scan data in
- SO: scan data out
- SCLK: scan clock
These pins usually do not show up in the documentation as they are handled before the chip goes to the customers. Only SCANMODE it is recommended to be a real pin. So, let's say it is a CPU, perhaps you use the UART pins for the scanin and scanout, a SPI clock as scan clock and so on. For scan mode then you just put it as a reserved pin on the package or perhaps even leave it as an non-bonded pad (floating inside the package). Some companies also make SCANMODE be a reserved JTAG command to save pins. The Genus manual has a suggestion to share scanin with TDI and scanout with TDO, but that is just one of the many ways to set this up. Being the test method is not published, you can find all kinds of ways.
This is a basic setup though, often a chip might have multiple scan chains to split up the chain, depending on how large is the design. The largest one I have dealt with had 17 pairs of SI and SO. The other pins were shared. But this is still assuming you have an old technology (perhaps over 110nm) and slow clock (under 20MHz). When this is not the case you might have to add more features:
- if you are using a more advanced node, you might need at-speed testing, where your internal clock is used to do the scan launch/capture pulses
- perhaps scan chain compression
- perhaps have multiple clocks or enables
- and so on
And then you might have other pins, like opcg_enable, compress_enable etc. Some people just go ahead and put the extra pins in a jtag interface too, so you wind up using the jtag to setup features and then the tester does the scan chain test.