%% $RCSfile: sdspdotp.tlc,v $ %% $Revision: 1.3 $ %% $Date: 1999/03/24 14:54:24 $ %% %% Don Orofino %% December 5, 1997 %% Copyright (c) 1995-1999 The MathWorks, Inc. All Rights Reserved. %% %% Abstract: Dot product block target file. %implements sdspdotp "C" %% Function: Outputs ========================================================== %% %function Outputs(block, system) Output /* % Block: % */ { %% %% Block performs a multiply-accumulate operation %% %assign uport = LibBlockInputSignal(0, "", "", 0) %assign vport = LibBlockInputSignal(1, "", "", 0) %% real_T s = 0.0; %% %% Loop roll over input port elements: %% %assign rollVars = ["U"] %roll sigIdx = RollRegions, lcv = RollThreshold, block, "Roller", \ rollVars %% Multiply and accumulate: %assign uport = LibBlockInputSignal(0, "", lcv, sigIdx) %assign vport = LibBlockInputSignal(1, "", lcv, sigIdx) %% s += % * %; %endroll % = s; } %endfunction %% [EOF] sdspdotp.tlc