18

I've heard the term tacts when referring to some hardware capability, e.g. "tacts on one frame" or "tacts per second". I tried Googling this but surprisingly did not find anything relevant. What is the meaning of this term when used in the aforementioned contexts?

hippietrail
  • 6,646
  • 2
  • 21
  • 60
guest
  • 181
  • 3

5 Answers5

17

The word "такт" is routinely used in Russian to denote exactly "clock cycle" in digital electronics.

It always was and still is heavily used in the Russian ZX scene in the same meaning (e.g. counting clock cycles of Z80 CPU, etc.) and sometimes was (and is) leaking to the English texts written by native Russian speakers.

So "tact" could be recognized as a semantic loan from Russian.

user3840170
  • 23,072
  • 4
  • 91
  • 150
lvd
  • 10,382
  • 24
  • 62
  • According to google translate "такт = time/measure/beat," Sounds like an accurate answer to me! – LateralTerminal Nov 21 '17 at 17:26
  • 5
    It's the same in German: "Takt" is the German expression for "clock cycle". The original meaning of "Takt" is "musical meter/beat", e.g. "3/4 Takt", from Latin tactum. So I doubt it's a calque from Russian, Russian probably also imported it from Latin. Given that English doesn't borrow at lot of words from Russian, but does borrow a lot of musical terms ("Leitmotif") from German, my guess is that the borrowing happened along those lines. – dirkt Nov 22 '17 at 07:35
  • Of course it existed as a word well before 90ies :) But was it ever used in the meaning of "clock cycle" before? – lvd Nov 22 '17 at 07:47
  • I've just fixed my answer with the new term instead of "calque", which fits better. – lvd Nov 22 '17 at 09:44
  • 2
    In Romania, tact is coming from French and German where it was used in first in music, then for computers. The origin is from tactus in Latin. So it is used in the same context in many European countries, with the origin in Latin. It's not a semantic loan from Russian. – Mircea Vutcovici Oct 27 '22 at 20:05
12

Clock ticks as seen by the processor - e.g. a NOP instruction takes 4 tacts, or a frame takes 69888 tacts (on a 48K Spectrum). It's a fairly common usage of the term within computing circles (not just the Spectrum), being borrowed from the musical meaning.

Philip Kendall
  • 547
  • 2
  • 9
  • 15
    Could this be a British term? I'm an experienced American assembly language programmer, and have never heard of tacts. It sounds like you are describing what I have always heard called "clock cycles". – RichF Nov 19 '17 at 16:50
  • 6
    Speaking as a British person, I'm not aware of its use in any modern context. It's probably either historical, or possibly descended from Sinclair's particular documentation. Much like Commodore programmers talking about the 'kernal'. – Tommy Nov 19 '17 at 17:10
  • 7
    This term was fairly common in Russian-speaking computing circles in the eighties and nineties. It is obviously a borrowed (not-Russian) word, and I am unsure of the origin. – krokodil Nov 19 '17 at 19:17
  • 4
    Don't think you could call it fairly common usage within computing circles, Phil. I've heard those called instruction cycles, with clock cycles being the pulses from the crystal oscillator. Never heard of tacts in my time – TonyM Nov 19 '17 at 21:18
  • 1
    @krokodil Apparently it is from German. – Leo B. Nov 19 '17 at 22:20
  • 1
    "Z80 assembly language programming" by Lance A. Leventhal, Table 3-4, page 3-23 to 3-39 uses *"Clock Cycles"* (in the table headers). 1979 vintage, publisher Osborne/McGraw-Hill, ISBN 0-931988-21-7. – Peter Mortensen Nov 19 '17 at 22:29
  • 1
    Please can you edit the answer and substantiate it with multiple links to examples, Phil. It looks like most here have never heard of it. Thanks. Otherwise the credibility of the answer is in question. – TonyM Nov 19 '17 at 23:12
  • 3
    I've been in computing circles for many years and I've never heard anybody use the word "tacts" in this context before. I'm not questioning the whole answer though, only the bit about it being fairly common usage. – JeremyP Nov 20 '17 at 09:37
  • 6
    OK, seems like this wasn't as common as I thought it was; looks very much like I picked it up from the Russian scene in the late 90s / early 2000s. I'll edit at some point when I'm not at work ;-) – Philip Kendall Nov 20 '17 at 10:05
  • 2
    Yes такт is the right word in Russian to describe exactly this thing (also a beat in music, the stroke of a piston in an engine etc). I think it's a loanword from German, der Takt. – Omar and Lorraine Nov 21 '17 at 08:49
  • In some older British computing circles a clock-tick interval was called a 'beat', I'll try and dig up a reference later. – dave Nov 21 '19 at 13:08
  • Beat: see this description of the FP 6000. The operation of a simple order takes place in five phases or beats. I'm also fond of the use of "hesitation" for what happens during cycle-stealing. – dave Nov 22 '19 at 01:28
  • How old is the term? As a kid I used to program my Speccy in machine code and I never heard this term. I had a few friends who also did the same but we were in Australia, some distance from the Speccy homelands. – hippietrail Apr 22 '20 at 18:27
  • As well as "clock cycles" I recall the term "T states". I don't know if they're synonyms or if "T state" is related to the German and Russian terms but it might explain the "T" symbols in English language references that have been posted? – hippietrail Apr 22 '20 at 18:35
  • 1
    I've been indirectly involved in the western European scene since the C64 came out and I've never heard it, only 'clock cycles'. – Alan B Apr 23 '20 at 06:53
9
  1. Tact [T]

    This term is equivalent for CPU clock period and it is the smallest time chunk in CPU based computer timings. One level higher are the MC machine cycles (each MC is 1 or more tacts depends on MC type and CPU architecture). So if you see something like 10T that means it is time duration of 10 periods of CPU clock.

    This way of timing notation is independent on CPU frequency so you can compute duration of code universally and apply CPU clock on the final time ... It is used mostly for individual instruction timings. Some instructions have 2 times like 8/10T which means instruction can run in either 8T or 10T depending on something (like state of flags, condition, etc).

    Here some example instructions timing for Z80:

    opc      T0 T1 MC1   MC2   MC3   MC4   MC5   MC6   MC7   mnemonic
    
    B8       04 00 M1R 4 ... 0 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,B
    B9       04 00 M1R 4 ... 0 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,C
    BA       04 00 M1R 4 ... 0 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,D
    BB       04 00 M1R 4 ... 0 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,E
    BC       04 00 M1R 4 ... 0 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,H
    BD       04 00 M1R 4 ... 0 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,L
    BE       07 00 M1R 4 MRD 3 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,(HL)
    BF       04 00 M1R 4 ... 0 ... 0 ... 0 ... 0 ... 0 ... 0 CP A,A
    C0       11 05 M1R 5 MRD 3 MRD 3 ... 0 ... 0 ... 0 ... 0 RET NZ
    C1       10 00 M1R 4 MRD 3 MRD 3 ... 0 ... 0 ... 0 ... 0 POP BC
    C2L2H2   10 10 M1R 4 MRD 3 MRD 3 ... 0 ... 0 ... 0 ... 0 JP NZ,U16
    C3L1H1   10 00 M1R 4 MRD 3 MRD 3 ... 0 ... 0 ... 0 ... 0 JP U16
    C4L2H2   17 10 M1R 4 MRD 3 MRD 4 MWR 3 MWR 3 ... 0 ... 0 CALL NZ,U16
    C5       11 00 M1R 5 MWR 3 MWR 3 ... 0 ... 0 ... 0 ... 0 PUSH BC
    C6U2     07 00 M1R 4 MRD 3 ... 0 ... 0 ... 0 ... 0 ... 0 ADD A,U8
    C7       11 00 M1R 5 MWR 3 MWR 3 ... 0 ... 0 ... 0 ... 0 RST 00H
    C8       11 05 M1R 5 MRD 3 MRD 3 ... 0 ... 0 ... 0 ... 0 RET Z
    C9       10 00 M1R 4 MRD 3 MRD 3 ... 0 ... 0 ... 0 ... 0 RET
    CAL2H2   10 10 M1R 4 MRD 3 MRD 3 ... 0 ... 0 ... 0 ... 0 JP Z,U16
    
    opc:    operation code [hex]
            L1,H1,U1,S1 means first operand direct number or address
            L2,H2,U2,S2 means second operand direct number or address
            L3,H3,U3,S3 means third operand direct number or address
            H,L ... U16 high and low byte
            U   ... U8 unsigned byte
            S   ... S8 signed byte
    
    T0      normal instruction duration [T] always 2 decimal digits
    T1      instruction duration if condition not met [T] always 2 decimal digits
    
    MC1++   Machine cycle first is type,second is duration [T] always 1 decimal digit
            ...     unused
            M1R     M1 cycle
            MRD     memory read
            MWR     memory write
            IOR     IO read
            IOW     IO write
            NON     no external operation (internal computation)
            INT     interrupt cycle
    
    mnem    instruction text (mnemonic)
    
    • opc is used for the address in an array of pointers
    • mnemonic is used to select the proper function pointer, and operands type
    • T0 and T1 are used for instructions timing (this is enough for rough emulations)
    • MC1++ are used for correct MC timings (to implement correct hardware emulation and contentions timing)

    As you can see all the times are in [T] tacts.

  2. Tacts per frame

    On ZX computers the screen is outputted with 50 Hz frequency triggering interrupt each frame. The time between two interrupts in CPU clock tacts is referred as tacts per frame. This value is defined by model of ZX (type of ULA) and CPU clock frequency. It can be measured and used to determine type of ZX by reading IR register and approximation.

    This value is very important as all the stuff your code is doing must fit into it. The frame timing itself is a bit more complicated and can be used to achieve border effects or even multitech techniques.

    IIRC here are some actual values:

    69888T ZXS 48k
    70908T ZXS 128K
    80384T Didaktik M,Didaktik Kompakt
    
Spektre
  • 7,278
  • 16
  • 33
  • 2
    Do you have any official sources which use "tact"? At the moment, it seems this term was somewhat invented by the Russian / Eastern European scene rather than anything else. – Philip Kendall Nov 21 '17 at 09:35
  • 1
    @PhilipKendall Well I am from Eastern Europe (not Russia however) and the term is here a common knowledge (but you might be right as we did not have any official Western docs accessible at that time). Here an example of use in book asm and ZX spectrum. In English speaking community is sometimes therm tics used instead. – Spektre Nov 21 '17 at 15:34
  • 2
    Another common term for the same meaning in "T-states" (which IIRC comes from the official Z80 literature). I've always assumed when I see "T" in documents like the one you quote above that this is what it referred to. – Jules Nov 22 '17 at 09:22
  • @Jules I just was going to mention "T-states" too. I'd never heard of either "tacts" or "tics". I programmed machine code on a Spectrum in about 1983 when I was 15. I wasn't party of any "scene". I had an American Z80 book and a few British Spectrum programming books in Australia. – hippietrail Apr 22 '20 at 18:39
  • @hippietrail I am 100% sure I saw tics in english written stuff but it might have been for x86 platform instead of Z80 ... and not written by English authors ... – Spektre Apr 22 '20 at 20:16
  • @Spektre: Could be. I never got into x86 assembly. – hippietrail Apr 23 '20 at 04:32
  • @hippietrail well I gone through Z80 i8080 i8051 x86 and Atmell x51 clones and later ATMega168 and now for a quite few years AVR32 UC3 and does not look like I would go for something else as there is nothing better on the market (ARM and STM TI included) as that is the best chip for booth home and work apps due to non BGA package, enough RAM and Real USB 2.0 all in one package... I probed few times over the years but there is still no alternative I know of that is at least with the same parameters ... – Spektre Apr 23 '20 at 06:31
7

The much more commonly used term for the same thing outside Eastern Europe might be T-State, which is (without the hyphen) used by the original Zilog manuals - Another term is Instruction Cycle, which commonly notes the minimal instruction timing of a Z80, which consists of four T-states.

Takt is also used in German, but here we commonly use it as a synonym for "clock".

tofro
  • 34,832
  • 4
  • 89
  • 170
2

A "tact" is surely a foreign word for what in English would be called a "tick" (of a clock).

I know this is an old question now, but I was quite surprised to read down and see English translations and metaphors as a "clock cycle", a "time", a "measure", a "beat", a "musical meter", a "phase", even a "piston stroke"! Oddly there was not even any mention of a "pendulum swing", which is the most obvious mechanical manifestation.

Even @PhilipKendall who came closest, had to say "Clock ticks as seen by the processor", vaguely implying that there may be "clock ticks" other than those seen by the processor, or some other way to see "clock ticks" in this context - in other words suggesting that a "tact" may be different or more specific than "tick" - but not being clear about it.

There's only one "clock" that could mean anything here - it's that part of the machinery of a microprocessor, that provides the fundamental driving pulse of energy, and which triggers the transition of the processor between the states defined as part of its design (including intermediary states, in the case of multi-cycle instructions).

Steve
  • 787
  • 4
  • 6
  • In the case of 'beat' it's not just a translation or an ahistorical metaphor - the original design documents for some British computers use that exact term to describe the operation of the thing they're building. With respect to the "as seen..." part: the clock is in principle generated somewhere and is conveyed to the processor logic. The beat (or tact) is what the processor does during each clock interval; the distinction seems reasonable to make. – dave Jan 02 '23 at 13:23
  • @another-dave, agreed, "beat" is a reasonable enough word, just not as reasonable a translation as "tick". But your explanation for "as seen..." I don't think is very clear. A processor design defines a set of resting states - states that are held whilst the driving pulse is not supplied. A design also specifies how every state transitions to the next when a pulse is supplied. A tick is a transition from one to the next (caused by supplying that driving pulse). The clock, itself, can tick, but I don't see what distinction exists between a clock-tick, processor-tick, and a processor-beat. – Steve Jan 02 '23 at 15:00
  • I don't think there was an intent to distinguish a clock tick from a processor tick; rather, I read it as 'what the processor does on a clock tick'. But at this point I'm merely guessing as to what someone else meant. – dave Jan 02 '23 at 16:00