Hi everyone,
after evaluating several approaches to schedule activities on a commonly shared bus (see and ) I finally landed in a comfortably deterministic solution, i.e. Synchronous Time Division Multiplexing.
Each access to the bus (transaction) is scheduled by a bus master, I have N slaves with a specific number of transactions with a certain periodicity over a fixed period T. How do I slice T in order not to have transactions overlapping?
I'm pretty sure there's a mathematical formula to get this number and so far I've only came to something like the following:
s = sum(T*n_i) / T = sum(n_i)
where:
s = time slice T = period sum() = summation operator n_i = periodicity over T for slave i (n_i is a rationale number)
Unfortunately in the above formula there's no trace of the need to have non-overlapping transactions. In the following example it seems the amount of transactions are sufficient, but 'periodicity' information has been somehow smeared due to the absence of non-overlapping requirement in the formula:
n_i = 1, 2, 3, 4 => s = 10
T---|---|---|---|---|---|---|---|---|---T | 1 | 2 | 3 | 4 | 2 | 4 | 3 | 4 | 3 | 4 |
Ideally, in order to maintain the periodicity information I'd need to do the following:
T---|---|---|---|---|---|---|---|---|---|---|---T | 1 | | | | | | | | | | | | | 2 | | | | | | 2 | | | | | | | 3 | | | | 3 | | | | 3 | | | | | 4 | | | 4 | | | 4 | | | 4 | | | Meaining that I need to have as many slots as to accommodate the maximum amount of slaves at the same time, so the above formula becomes:
s = N * sum(n_i)
where: N = maximum value for i (i.e. number of slaves)
Main drawback of this approach is the amount of 'empty slots'. But actually you can see that the amount of divisions has increased and indeed in order to keep the periodicity I should change the summation operatore with the LCD (least common divisor), hence:
s = N * LCD(n_i)
Does this all make sense?
Any idea or direction for a more formal approach? I'm sure there must be a ton of info out there, but I'm incapable to correctly formulate the right query to my favourite friend!
Al