blob: 1c1e5146fa7dc7b8196164b722bf1dbb3c6fc534 [file] [log] [blame]
package templates.m2m.hw
import com.google.inject.Inject
import com.inchron.realtime.root.model.Model
import org.eclipse.app4mc.amalthea.model.FrequencyDomain
import org.eclipse.app4mc.amalthea.model.HWModel
import templates.AbstractAmaltheaInchronTransformer
class HWTransformer extends AbstractAmaltheaInchronTransformer {
@Inject HWStructure_SystemTransformer hwStructure_SystemTransformer
@Inject FrequencyDomainTransformer frequencyDomainTransformer
def transfromHWModel(HWModel amltHWModel, Model inchronModel) {
this.inchronModel = inchronModel
amltHWModel.domains.forEach [ domain |
if (domain instanceof FrequencyDomain) {
var inchronClock = frequencyDomainTransformer.createClock(domain as FrequencyDomain)
inchronModel.clocks.add(inchronClock)
}
]
hwStructure_SystemTransformer.transformHWSystem(amltHWModel, inchronModel)
}
}