- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Parameterized subsample/supersample
Page Start Prev 1 Next End
Parameterized subsample/supersample
Parameterized subsample/supersample
Oct-14-20 13:17:48
Hi,
I noticed that subsampling and supersampling factors in the subsample and supersample functions must be final integer parameters instead of just integer parameters.
For example the below code: as it is it runs fine, but without either of the two final keywords, the compiler refuses, saying:
[1] 15:10:51 Translation Error
pre-optimization module clockPartitioning (simulation) failed.
The code:
Code:
model test_sampling
/*Define the clock structure*/
final parameter Integer AD_oversampling = 20;
final parameter Integer mpx_factor = 2;
Clock Clk_row = Clock(1, 6250000) "Base row clock = 6.25MHz.";
Clock Clk_AD = superSample(Clk_row, AD_oversampling) "AD converter samples each row signal 20x.";
Clock Clk_frame = subSample(Clk_row, mpx_factor) "Number of rows per frame (=oversampling factor).";
initial equation
equation
end test_sampling;
I never saw this documented. The examples are all with fixed numbers.
Is this intentional, missing documentation or a bug?
At the least, the error message is non-specific.
Best regards,
Paul
Page Start Prev 1 Next End
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Parameterized subsample/supersample
There are 0 guests and 0 other users also viewing this topic