Added PORT register check in TDF validation script
This commit is contained in:
@@ -489,14 +489,22 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
|||||||
$failures[] = 'PORT peripheral module not found.';
|
$failures[] = 'PORT peripheral module not found.';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$portModule = $this->modulesByName['port'];
|
||||||
foreach ($portPeripheralModule->instancesMappedByName as $portName => $portInstance) {
|
foreach ($portPeripheralModule->instancesMappedByName as $portName => $portInstance) {
|
||||||
if (
|
if (strlen($portName) === 5 && strpos($portName, "port") === 0) {
|
||||||
strlen($portName) == 5
|
$portSuffix = substr($portName, strlen($portName) - 1, 1);
|
||||||
&& strpos($portName, "port") === 0
|
if (empty($portInstance->signals)) {
|
||||||
&& empty($portInstance->signals)
|
|
||||||
) {
|
|
||||||
$failures[] = 'No signals defined for port ' . $portInstance->name . ' in PORT peripheral module.';
|
$failures[] = 'No signals defined for port ' . $portInstance->name . ' in PORT peripheral module.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($portModule->registerGroupsMappedByName['port' . $portSuffix])) {
|
||||||
|
|
||||||
|
if (empty($portModule->registerGroupsMappedByName['port']->registersMappedByName['dir'])) {
|
||||||
|
$failures[] = 'Could not find PORT register group in PORT module, for port '
|
||||||
|
. $portName . ', using suffix ' . $portSuffix;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user