Newer
Older
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
%!PS-Adobe-2.0 EPSF-1.2
%%Creator: Alessandro Rubini
%%Title: sdb-repo_url
%%BoundingBox: 0 0 200 80
%%EndComments
/S {dup ==} def
/S2 {2 copy == ==} def
/S3 {3 copy == == ==} def
/S4 {4 copy == == == ==} def
/minx 0 def
/miny 0 def
/maxx 200 def
/maxy 80 def
0 setlinecap 1 setlinejoin
/centerstring { % fontname width string -- fontsize
gsave
3 2 roll findfont setfont % width string
dup 3 1 roll % string width string
stringwidth pop div dup 3 1 roll % scale string scale
dup neg 0 exch rmoveto % scale string scale
currentfont exch scalefont setfont % scale string
show
grestore
} def
/centeratsize { % x y string --
gsave
3 1 roll moveto
dup stringwidth pop 2 div neg 0 rmoveto show
grestore
} def
/grid {
gsave
.8 .8 .8 setrgbcolor
.2 setlinewidth
% vertical lines
minx 10 maxx {
dup
miny moveto maxy lineto stroke
} for
% horizontal lines
miny 10 maxy {
dup
minx exch moveto maxx exch lineto stroke
} for
} def
%grid
0 0 moveto
30 10 translate
10 15 scale
% make a 4-byte word, with ticks inside
/word { % r g b fillr fillg fillb x y --
gsave
translate
.08 setlinewidth
1 setlinejoin
1 setlinecap
setrgbcolor
0 0 moveto 4 0 rlineto 0 1 rlineto -4 0 rlineto closepath fill
setrgbcolor
0 0 moveto 4 0 rlineto 0 1 rlineto -4 0 rlineto closepath stroke
1 0 moveto 0 .1 rlineto stroke
2 0 moveto 0 .25 rlineto stroke
3 0 moveto 0 .1 rlineto stroke
grestore
} def
% only the border, but same arguments as above
/short { % r g b fillr fillg fillb x y --
gsave
translate
.08 setlinewidth
1 setlinejoin
1 setlinecap
setrgbcolor
setrgbcolor
0 0 moveto 2 0 rlineto 0 1 rlineto -2 0 rlineto closepath stroke
grestore
} def
% only the border, but same arguments as above
/byte { % r g b fillr fillg fillb x y --
gsave
translate
.08 setlinewidth
1 setlinejoin
1 setlinecap
setrgbcolor
setrgbcolor
0 0 moveto 1 0 rlineto 0 1 rlineto -1 0 rlineto closepath stroke
grestore
} def
%%%%%%%%%%%%%%%%%%%%%%%%%%%
/colempty {.7 .7 .7 1 1 1} def
/colred {.8 .4 .4 1 .8 .8} def
/colblu {.4 .4 .8 .8 .8 1} def
/colgre {.4 .8 .4 .8 1 .8} def
/Helvetica-Bold findfont .7 scalefont setfont
-2.5 0.2 moveto (0x30) show
-2.5 1.2 moveto (0x20) show
-2.5 2.2 moveto (0x10) show
-2.5 3.2 moveto (0x00) show
/Courier-Bold findfont .7 scalefont setfont
/name { % x y wid string --
/s exch def
/wid exch def
/y exch def
gsave
wid 2 div add y .4 add %translate 1.5 0 scale 0 0
s
centeratsize
grestore
} def
/frame {
0 4 12 {
/xf exch def
0 1 3 {
/yf exch def
colempty xf yf word
} for
} for
} def
/prod {
frame
colblu 8 2 word
colblu 12 2 word
0 4 12 {
/xf exch def
0 1 1 {
/yf exch def
colblu xf yf word
} for
} for
colblu 15 0 byte
0 0 .6 setrgbcolor
8 2 8 (....vendor_id....) name
0 1 4 (device_id) name
4 1 4 (version) name
8 1 4 (..date..) name
12 1 4 (..name..) name
0 0 15 (...............name...............) name
15 0 1 (T) name
} def
/comp {
prod
0 .4 0 setrgbcolor
colgre 8 3 word
colgre 12 3 word
colgre 0 2 word
colgre 4 2 word
8 3 8 (...addr_first...) name
0 2 8 (...addr_last...) name
} def
/inter {
comp
colempty 4 3 short
colempty 6 3 byte
colempty 7 3 byte
.2 .2 .2 setrgbcolor
0 3 4 (magic) name
4 3 2 (nrec) name
6 3 1 (V) name
7 3 1 (B) name
} def
/dev {
comp
colempty 0 3 short
colempty 2 3 byte
colempty 3 3 byte
.2 .2 .2 setrgbcolor
0 3 2 (class) name
2 3 1 (A) name
3 3 1 (a) name
4 3 4 (bus-spec) name
} def
/bridge {
comp
.2 .2 .2 setrgbcolor
0 3 8 (......child......) name
} def
/integr {
prod
.2 .2 .2 setrgbcolor
0 3 16 (..............reserved..............) name
0 2 8 (....reserved....) name
} def
/repourl {
frame
.2 .2 .2 setrgbcolor
0 3 16 (..............repo_url..............) name
0 2 16 (..............repo_url..............) name
0 1 16 (..............repo_url..............) name
0 0 15 (..............repo_url............) name
colempty 15 0 byte
15 0 1 (T) name
} def
/synthesis {
frame
% overwrite the frame with a different color for line 1
colgray1 0 3 word
colgray1 4 3 word
colgray1 8 3 word
colgray1 12 3 word
colgray1 0 1 word
colgray1 4 1 word
colgray2 8 1 word
colgray1 12 1 word
.2 .2 .2 setrgbcolor
0 3 16 (..............syn_name..............) name
0 2 16 (.............commit_id.............) name
0 1 8 (tool_name) name
8 1 4 (tool_ver) name
12 1 4 (date) name
0 0 15 (..............user_name..........) name
colempty 15 0 byte
15 0 1 (T) name
} def
/empty {
frame
.2 .2 .2 setrgbcolor
0 3 16 (..............reserved..............) name
0 2 16 (..............reserved..............) name
0 1 16 (..............reserved..............) name
0 0 15 (..............reserved............) name
colempty 15 0 byte
15 0 1 (T) name
} def
repourl
showpage