File: s_port_names.sci

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (66 lines) | stat: -rw-r--r-- 1,613 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
function s_port_names(sbloc)
// Copyright INRIA
IDENTIFICATION=15
graphics=sbloc(2);
model=sbloc(3);


x=model(8)
etiquettes_in = []
etiquettes_out = []
etiquettes_clkin = []
etiquettes_clkout = []
font=xget('font')

xset('font',options('ID')(2)(1),options('ID')(2)(2))
inp=[],outp=[],cinp=[],coutp=[]
for k=2:size(x)
  o=x(k);
  if o(1)=='Block' then
    modelb=o(3);
    if size(modelb) >= IDENTIFICATION then
      ident = modelb(IDENTIFICATION);
    else
      ident = emptystr();
    end
    if ident<>emptystr()&ident<>[] then
      select o(5)
      case 'IN_f' then
	inp=[inp modelb(9)];
	etiquettes_in = [etiquettes_in; ident];
      case 'OUT_f' then
	outp=[outp modelb(9)];
	etiquettes_out = [etiquettes_out; ident];
      case 'CLKIN_f' then
	cinp=[cinp modelb(9)];
	etiquettes_clkin = [etiquettes_clkin; ident];
      case 'CLKINV_f' then
	cinp=[cinp modelb(9)];
	etiquettes_clkin = [etiquettes_clkin; ident];
      case 'CLKOUT_f' then
	coutp=[coutp modelb(9)];
	etiquettes_clkout = [etiquettes_clkout; ident];
      case 'CLKOUTV_f' then
	coutp=[coutp modelb(9)];
	etiquettes_clkout = [etiquettes_clkout; ident];
      end
    end
  end
end
if inp<>[] then
  [tmp,n_in]=sort(-inp)
  standard_etiquette(sbloc, etiquettes_in(n_in), 'in')
end
if outp<>[] then
  [tmp,n_out]=sort(-outp)
  standard_etiquette(sbloc, etiquettes_out(n_out), 'out')
end
if cinp<>[] then
  [tmp,n_cin]=sort(-cinp)
  standard_etiquette(sbloc, etiquettes_clkin(n_cin), 'clkin')
end
if coutp<>[] then
  [tmp,n_cout]=sort(-coutp)
  standard_etiquette(sbloc, etiquettes_clkout(n_cout), 'clkout')
end
xset('font',font(1),font(2))