Macrocell options (WIP)¶
The design of the ATF15xx macrocell is remarkably complicated; the combination of backwards compatibility, cost optimization, ad-hoc evolution, and pressure to add more routing options has resulted in a circuit that is almost biological in nature. The amount of macrocell edge cases that bring out bugs in the vendor toolchain seems to demonstrate that it is challenging to use even with first-party documentation. Nevertheless, with the right approach, even this macrocell can be painlessly understood.
The ATF15xx macrocell appears to have been designed by strictly following two rules:
Never route a product term to more than one destination.
Never let a fuse combination become redundant.
Rule (1) requires that, even though a product term may be routed through multiple muxes/decoders, these components (and by extension the fuses that drive them) must act together to prevent the product term from being connected to more than one possible destination at once. E.g. there must be no configuration where PT4
drives CLK
and CE
simultaneously.
Rule (2) requires that, when any redundancies happen to arise from the layout of the macrocell routing paths, the fuse combinations that encode the redundant configurations must be repurposed for a new capability, without particular regard to orthogonality, and even at the cost of eliminating some rarely needed but otherwise reasonable configurations. E.g. the fuse that controls the fast registered input, dfast_mux
, is physically shared with the fuse that controls the output multiplexer, o_mux
.
Fun fact
Both of these rules are violated in exactly one obscure corner case, specific to each rule.
In reality, these “rules” could well have been a natural consequence of conserving NVM cells and/or routability and not something that was followed explicitly. Regardless, the macrocell design is a lot easier to understand from this perspective.
Overview¶
Todo
write this
PT1/PT2 routing group¶
Todo
write this
Configuration |
Routing |
|||||
---|---|---|---|---|---|---|
pt1_mux |
pt2_mux |
ST.I1 |
ST.I2 |
y1 |
y2 |
yf |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configuration |
Routing |
||||||
---|---|---|---|---|---|---|---|
xor_a_mux 1 |
xor_b_mux |
cas_mux 1 |
xor_invert 2 |
XT.A |
XT.B |
MC.CASOUT |
MC.FLB |
|
|
|
|
|
|
|
¬ |
|
|
|
|
|
|
|
¬ |
|
|
|
|
|
|
|
¬ |
|
|
|
|
|
|
|
¬ |
|
|
|
|
|
|
|
¬ |
|
|
|
|
|
|
|
¬ |
|
|
|
|
|
|
|
¬ |
|
|
|
|
|
|
|
|
PT3 routing group¶
Todo
write this
Configuration |
Routing |
||
---|---|---|---|
pt3_mux |
gclr_mux |
ST.I3 |
FF.AR |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PT4 routing group¶
Todo
write this
Configuration |
Routing |
||||
---|---|---|---|---|---|
pt4_mux |
pt4_func |
gclk_mux |
ST.I4 |
FF.CLK |
FF.CE |
|
|
|
|
|
|
|
|
— |
|
|
|
|
|
|
|
|
|
|
|
— |
|
|
|
PT5 routing group¶
Todo
write this
Configuration |
Routing |
||||
---|---|---|---|---|---|
pt5_mux |
pt5_func |
oe_mux |
ST.I5 |
FF.AS |
IO.EN |
|
— |
|
|
|
|
|
— |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
D/Q routing group¶
Todo
write this
Configuration |
Routing |
|||
---|---|---|---|---|
d_mux |
o_mux 4 |
dfast_mux 4 |
FF.D |
IO.A |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FF/latch configuration¶
Todo
write this