Skip to content
Snippets Groups Projects
Commit ab1186d1 authored by Ngoc Minh Trang Vu's avatar Ngoc Minh Trang Vu Committed by Federico Felici
Browse files

restrict SCDsignal datatype

parent 2cd927d9
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,8 @@ classdef SCDsignal
function type = datatype(obj)
type = class(obj.Value);
assert(ismember(type,{'single', 'boolean', 'int8','int16','int32'}),...
sprintf('DataType %s is not supported in SCDalgo', type))
end
function str = struct(obj)
......@@ -79,8 +81,8 @@ classdef SCDsignal
function Name = BusName(obj)
% Returns the bus name for this signal
type = class(obj.Value);
siz = size(obj.Value);
type = obj.datatype;
siz = obj.datasize;
assert(numel(siz)==2,'3 or larger dimensional data not supported')
if all(siz == 1)
sizestr = '_Scalar';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment