Hi,
Can values of a struct be statically initialized in a module .xdc file? For example, I've got the following module:
module MyModule
{
struct s{
Bits16 Spare0;
Bits16 Spare1;
Bits16 Num1;
Bits16 Num2;
};
instance:
config s MyStruct = {0xFFFF, 0, 0, 0};
internal:
struct Instance_State
{
s MyStruct;
}
} // module MyModule
I'd like to be able to do something like obj.MyStruct.Spare0 = params.MyStruct.Spare0 in the MyModule.xs file and have the default value be 0xFFFF if not set to something else in the .cfg file. Is that the correct way to initialize the values for MyStruct? I keep getting errors as follows regarding the 'config s MyStruct = ...' line:
mismatched input '0xFFFF' expecting RCUR
mismatched input ',' expecting SEMI
no viable alternative at input ','
Also, do the values declared in the .xdc file for structs effect the default values for MyModule_params variables when dynamically creating instances?
Nick