duh validate assumes that ports are an object with keys. However, ports can be objects or an array of verbose objects.
This will result in duh validate rejecting ports described in the verbose syntax because, I think, this is trying to index with a string into an array.
E.g., the following fails:
{
"component":{
"vendor":"Vendor",
"library":"Library",
"name":"Name",
"version":"0.0.1",
"busInterfaces":[
{
"name":"name",
"interfaceMode":"master",
"busType":{
"vendor":"Vendor",
"library":"Library",
"name":"Name",
"version":"0.0.1"
},
"associations":[
],
"abstractionTypes":[
{
"viewRef":"RTLview",
"portMaps":{
"FOO":[
"out"
]
}
}
]
}
],
"addressSpaces":[
],
"memoryMaps":[
],
"model":{
"views":[
],
"ports":[
{
"name":"out",
"wire":{
"direction":"in",
"width":8,
"description":"the input",
"isClock":false
}
}
]
},
"fileSets":{
"Hdl":[
]
}
}
}
error: name:FOO mapped to not existing port: out
While the following, equivalent description passes:
{
"component":{
"vendor":"Vendor",
"library":"Library",
"name":"Name",
"version":"0.0.1",
"busInterfaces":[
{
"name":"name",
"interfaceMode":"master",
"busType":{
"vendor":"Vendor",
"library":"Library",
"name":"Name",
"version":"0.0.1"
},
"associations":[
],
"abstractionTypes":[
{
"viewRef":"RTLview",
"portMaps":{
"FOO":[
"out"
]
}
}
]
}
],
"addressSpaces":[
],
"memoryMaps":[
],
"model":{
"views":[
],
"ports":{
"out": "8"
}
},
"fileSets":{
"Hdl":[
]
}
}
}
duh validateassumes that ports are an object with keys. However, ports can be objects or an array of verbose objects.This will result in
duh validaterejecting ports described in the verbose syntax because, I think, this is trying to index with a string into an array.E.g., the following fails:
While the following, equivalent description passes: