This commit is contained in:
epilef
2017-03-08 09:27:39 -03:00
parent 26dc3504db
commit 9a850c28e4
10 changed files with 469 additions and 275 deletions

View File

@@ -21,10 +21,17 @@ function FilterWrapper_config(this_block)
this_block.addSimulinkOutport('d_o');
this_block.addSimulinkOutport('p_o');
d_o_port = this_block.port('d_o');
d_o_port.setType('UFix_1_0');
d_o_port.useHDLVector(false);
p_o_port = this_block.port('p_o');
p_o_port.setType('UFix_10_0');
p_o_port.useHDLVector(true);
% -----------------------------
if (this_block.inputTypesKnown)
% do input type checking, dynamic output type and generic setup in this code block.
@@ -52,9 +59,12 @@ function FilterWrapper_config(this_block)
% on input types, make the settings in the "inputTypesKnown" code block.
% The addGeneric function takes 3 parameters, generic name, type and constant value.
% Supported types are boolean, real, integer and string.
this_block.addGeneric('CLK_FREQ','integer','1000');
this_block.addGeneric('CLK_FREQ','integer','500');
this_block.addGeneric('DATA_RATE','integer','1');
this_block.addGeneric('SIMETRIC','boolean','TRUE');
this_block.addGeneric('CONSTANTS','array_of_integers','(-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7)');
% Add addtional source files as needed.
% |-------------
@@ -69,7 +79,7 @@ function FilterWrapper_config(this_block)
% this_block.addFile('');
% this_block.addFile('');
this_block.addFile('../FiltroHDL/array_functions.vhd');
this_block.addFile('../FiltroHDL/filter_pkg.vhd');
this_block.addFile('../FiltroHDL/Filter.vhd');
this_block.addFile('../FiltroHDL/FilterWrapper.vhd');