Dear DSPC Team,
I'm using the MATLAB API, but when I open an AWD file and build it, I get a build error.
awe_init;
GSYS = load_awd(awd_path);
GSYS.SYS = build(GSYS.SYS);
The error message is as follows:
>> build(GSYS.SYS)
エラー: awe_module/prebuild
AWE ERROR
Routing error at top-level system output pin 'SYS_out'
Module's input pin is not compatible with this number of input channels.
Wire properties:
numChannels: 1
blockSize: 32
sampleRate: 48000
dataType: 'fract32'
isComplex: 0Pin properties:
numChannelsRange: 2
blockSizeRange: []
sampleRateRange: []
dataTypeRange: {'float' 'int' 'fract32'}
isComplexRange: 0
As this error message suggests, there is indeed a difference in the number of channels in the wire property and the pin property in this AWD file.
However, when built from AWE Designer, the number of channels for SYS_out is automatically corrected, so there are no build errors.
The description of build.m in the MATLAB API mentions that prebuild.m is called to propagate pin information, but why do build errors occur?
When ‘Propagate Changes’ is executed in AWE Designer, the number of channels for SYS_out is corrected.
So I think implementing this operation with the MATLAB API could be a solution, but I can’t find a MATLAB API that performs this.
Please give me some advice.
Beat regards,
Makoto
3:06pm
Hi Makoto-san,
I'm contacting you directly to get more information.
Gary
9:33pm
Thanks for contacting me.
I upload the AWD file in which the phenomenon occurs. (builderror_sample.awd)
Please check it out.
1:27pm
I'm not entirely sure what the underlying issue is, but here's what I did in AWE 8.D.2.6 Pro.
>> GSYS=load_awd('builderror_sample.awd');
>> build(GSYS.SYS)
Error using awe_module/prebuild
AWE ERROR:Wiring error at the top-level system
AWE ERROR:System output pin 'SYS_out' type does not validate
Module's input pin is not compatible with this number of input channels.
Error in awe_subsystem/new_pcserver_build
Error in awe_module/build
>> prebuild(GSYS.SYS)
Error using awe_module/prebuild
AWE ERROR:Wiring error at the top-level system
AWE ERROR:System output pin 'SYS_out' type does not validate
Module's input pin is not compatible with this number of input channels.
>> check_connections(GSYS.SYS)
ans =
-1
================
Note that check_connections() came back with -1, which indicates some sort of failure.
I redrew the layout from scratch, saved it to a new file (attached) without propagating or running it first, and it seems to work OK.
>> GSYS=load_awd('build_error_fresh.awd');
>> SYSX=GSYS.SYS
= NewClass // Newly created subsystem
SYS_toFloat: [TypeConversion]
SYS_deint: [Deinterleave]
SYS_inter: [Interleave]
SYS_toFract: [TypeConversion]
Add1: [Adder]
SYS_inter1: [Interleave]
>> build(SYSX)
= NewClass // Newly created subsystem
SYS_toFloat: [TypeConversion]
SYS_deint: [Deinterleave]
SYS_inter1: [Interleave]
SYS_inter: [Interleave]
Add1: [Adder]
SYS_toFract: [TypeConversion]
>> check_connections(SYSX)
ans =
1
========
So, mine passed the "check_connections()" test, while yours did not.
I exported both layouts to AWJ and compared them in WinMerge. In yours, I am seeing something a little strange with channel names on one wire.
Mine:
"outputPin": [
{
"name": "SYS_out",
"type": {
"numChannels": 1,
"blockSize": 32,
"sampleRate": 48000,
"dataType": "fract32",
"isComplex": 0,
"numChannelsRange": 2
},
"position": {
"x": 1152,
"y": 211.2,
"width": 57.599999999999994,
"height": 19.2
},
"textInfo": {
"points": 8
}
}
],
Yours:
"outputPin": [
{
"name": "SYS_out",
"type": {
"numChannels": 1,
"blockSize": 32,
"sampleRate": 48000,
"dataType": "fract32",
"isComplex": 0,
"numChannelsRange": 2
},
"position": {
"x": 864,
"y": 211.2,
"width": 57.599999999999994,
"height": 19.2
},
"textInfo": {
"points": 8
},
"channelNames": [
"sum",
"sum",
"sum",
"",
"sum",
"sum"
]
}
],
======
The other differences are just down to module position, module naming, etc.
Which version of AWE Designer did you create this layout with?
Did you edit channel names?
Thanks,
Gary
2:01am
Thank you for investigating. The versions I am using are as follows:
When I used the AWD file you attached, no build error occurred in my environment.
However, when I modify the attached AWD file as follows, the issue occurs:
Could you please check on your side as well?
4:12pm
Hi Makoto-san,
I was able to reproduce your observation. However if I propagate changes before saving the file, then the build command from MATLAB works OK. So, to be sure, "propagate changes" before saving the AWD. I will review this with the team.
Thanks,
Gary