@@ -83,6 +83,34 @@ algorithm
8383 end match;
8484end clockPartitioning;
8585
86+ public function synchronousFeatures
87+ input BackendDAE . BackendDAE inDAE;
88+ output BackendDAE . BackendDAE outDAE;
89+ protected
90+ BackendDAE . EqSystems systs, contSysts, clockedSysts;
91+ BackendDAE . Shared shared ;
92+ algorithm
93+ (clockedSysts, contSysts) := List . splitOnTrue(inDAE. eqs, BackendDAEUtil . isClockedSyst);
94+
95+ if listLength(clockedSysts) > 0 then
96+ shared := inDAE. shared ;
97+
98+ (clockedSysts, shared ) := treatClockedStates(clockedSysts, shared );
99+
100+ systs := listAppend(contSysts, clockedSysts);
101+ outDAE := BackendDAE . DAE (systs, shared );
102+
103+ if Flags . isSet(Flags . DUMP_SYNCHRONOUS ) then
104+ print("synchronous features post-phase: synchronousFeatures \n\n " );
105+ BackendDump . dumpEqSystems(systs, "clock partitioning" );
106+ BackendDump . dumpBasePartitions(shared . partitionsInfo. basePartitions, "Base clocks" );
107+ BackendDump . dumpSubPartitions(shared . partitionsInfo. subPartitions, "Sub clocks" );
108+ end if ;
109+ else
110+ outDAE := inDAE;
111+ end if ;
112+ end synchronousFeatures;
113+
86114public function contPartitioning
87115 input BackendDAE . BackendDAE inDAE;
88116 output BackendDAE . BackendDAE outDAE;
@@ -124,15 +152,14 @@ algorithm
124152
125153 (clockedSysts, shared ) := subClockPartitioning1(clockedSysts, shared , holdComps);
126154
127- (clockedSysts, shared ) := treatClockedStates(clockedSysts, shared );
128-
129155 unpartRemEqs := createBoolClockWhenClauses(shared , unpartRemEqs);
130156 shared . removedEqs := BackendEquation . addEquations(unpartRemEqs, shared . removedEqs);
131157
132158 systs := listAppend(contSysts, clockedSysts);
133159 outDAE := BackendDAE . DAE (systs, shared );
134160
135161 if Flags . isSet(Flags . DUMP_SYNCHRONOUS ) then
162+ print("synchronous features pre-phase: synchronousFeatures \n\n " );
136163 BackendDump . dumpEqSystems(systs, "clock partitioning" );
137164 BackendDump . dumpBasePartitions(shared . partitionsInfo. basePartitions, "Base clocks" );
138165 BackendDump . dumpSubPartitions(shared . partitionsInfo. subPartitions, "Sub clocks" );
0 commit comments