06-27-2015 03:02 PM
I am designing a general purpose block in system generator. I pass the user parameters to the block through masking it. Some user parameters can change the block configuration. The input port data type, width and rate can also affect the block configuration.
The problem is that these values (input port data type, width and rate) are subject to change. So I should read them dynamically, then change the block configuration through programming the "Initialization Commands" field. But unfortunately there is no straight way to read the input port information.
There are some methods in for example the "Black Box". these are:
input_width = this_block.port('din').width;
input_rate = this_block.port('din').rate;
But these methods are not applicable to a masked subsystem.
I have tried other ways also. You can find them below. None of them worked.
Does anybody know how can I solve this problem?
Other ways I tried:
ts = Simulink.Block.getSampleTimes([gcb '/Input'])
06-28-2015 09:53 PM
Today we rely on Simulink to perform parameterization of your designs in two ways:
To truly make the HDL Netlist that is generated from SysGen parameterizable, we would have to implement some of this capability in the HDL netlist itself by:
06-29-2015 11:53 PM
Thanks Balkris for your help.
But still the problem is unsolved.
I have seen this topic around on the internet and none of them have been answered properly. You can find them in the following links: