[WIP] Use an accumulator in fabric_doc_update

Ground work for RYW.
[WIP] Module for RYW clocks
[WIP] Generate clocks on request

Typed from memory cause I'm a dummy and forgot to push the code I'd
written before.
[WIP] compilation fixes