1
function [x,y,typ]=CLOCK_f(job,arg1,arg2)
8
[x,y,typ]=standard_inputs(arg1)
10
[x,y,typ]=standard_outputs(arg1)
12
[x,y]=standard_origin(arg1)
16
xx=arg1(3)(8)(path)// get the evtdly block
23
[ok,dt,t0,label]=getvalue('Set Clock block parameters',..
24
['Period';'Init time'],list('vec',1,'vec',1),label)
27
message('period must be positive')
35
arg1(3)(8)(path)=xx// Update
39
if ~and([t0_old dt_old]==[t0 dt]) then
41
newpar(size(newpar)+1)=path// Notify modification
43
if t0_old<>t0 then needcompile=2,else needcompile=0,end
49
list([0,0],[2,2],%t,[],[],[],[],0,..
51
['wd=xget(''wdim'').*[1.016,1.12];';
52
'thick=xget(''thickness'');xset(''thickness'',2);';
54
'rx=sz(1)*p/2;ry=sz(2)/2;';
55
'xarcs([orig(1)+0.05*sz(1);';
56
'orig(2)+0.95*sz(2);';
60
' 360*64],scs_color(5));';
61
'xset(''thickness'',1);';
62
'xx=[orig(1)+rx orig(1)+rx;';
63
' orig(1)+rx orig(1)+rx+0.6*rx*cos(%pi/6)];';
64
'yy=[orig(2)+ry orig(2)+ry ;';
65
' orig(2)+1.8*ry orig(2)+ry+0.6*ry*sin(%pi/6)];';
66
'xsegs(xx,yy,scs_color(10));';
67
'xset(''thickness'',thick);'],[])),..
68
list('csuper',[],[],[],1,[],' ',..
69
list(list([600,400,0,0],'foo',[],[]),..
70
list('Block',list([399,162],[20,20],%t,'1',[],[],6,[],[]),..
71
list('output',[],[],1,[],[],[],[],1,'d',[],[%f,%f],' ',list()),' ','CLKOUT_f'),..
72
list('Block',list([320,232],[40,40],%t,['0.1';'0.1'],[],[],7,4,..
74
'txt=[''Delay'';string(dt)];';
75
'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');']),..
76
list('evtdly',[],[],1,1,[],[],0.1,[],'d',0.1,[%f,%f],' ',list()),' ','EVTDLY_f'),..
77
list('Link',[340;340;380.71066],[226.28571;172;172],'drawlink',' ',[0,0],[5,-1],[3,1],..
79
list('Block',list([380.71066;172],[1,1],%t,' ',[],[],4,[6;7]),..
80
list('lsplit',[],[],1,[1;1],[],[],[],[],'d',[-1,-1],[%t,%f],' ',list()),' ','CLKSPLIT_f'),..
81
list('Link',[380.71066;399],[172;172],'drawlink',' ',[0,0],[5,-1],[5,1],[2,1]),..
82
list('Link',[380.71066;380.71066;340;340],[172;301.9943;301.9943;277.71429],'drawlink',' ',..
83
[0,0],[5,-1],[5,2],[3,1])),[],'h',[],[%f,%f]),' ','CLOCK_f')