-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcram_draw.asv
More file actions
executable file
·35 lines (24 loc) · 1015 Bytes
/
Copy pathcram_draw.asv
File metadata and controls
executable file
·35 lines (24 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function cram_draw(numInputs, pathToBlock)
%
% xBlock;
% numInputs=1;
% calledByInit=1;
for(i= 1:numInputs)
blockTemp=xInport(strcat('in', num2str(i-1)));
iDataIn{i} = xInport(strcat('in', num2str(i-1)));
concatIn{i} = xSignal;
end
oOut = xOutport('out');
if(numInputs > 1)
sConcatOut = xConcat(concatIn, 'concat', extendPath(pathToBlock, 'concat'));
oOut.bind(sConcatOut);
for(i = 1:numInputs)
blockName = strcat('reinterpret',
sReinterpretOut = xReinterpret(iDataIn{i}, 1, 'Unsigned', 1, 0, blockName, extendPath(pathToBlock, blockName));
= xBlock('Reinterpret', struct('force_arith_type', 'on', 'arith_type', 'Unsigned', 'force_bin_pt', 'on', 'bin_pt', 0) ...
, {iDataIn.(strcat('s',num2str(i)))}, {concatIn{i}});
end
else
blockTemp = xBlock('Reinterpret', struct('force_arith_type', 'on', 'arith_type', 'Unsigned', 'force_bin_pt', 'on', 'bin_pt', 0) ...
, {iDataIn.s1}, {oOut});
end