Temporal refinement of synchronous programs is a desirable transformation in many design flows, in particular, to combine modules that work at different levels of abstraction. In synchronous languages, this refinement can be represented in the programs by means of sub-clocks. While this introduction leads to convenient temporal refinement techniques, it significantly complicates the classic causality and reincarnation problems that have to be handled in compilers for imperative synchronous languages. In this paper, we first generalize previous solutions to schizophrenia problems of determining and replicating affected code parts to multiple clocks. Second, our compilation algorithm extracts data dependencies between different clock domains and inserts explicit appropriate synchronization in the intermediate format. Finally, we illustrate the feasibility of our approach with the help of a running example and show the usage by a hardware translation.
展开▼