FIJISettingsCanvas.pm 32.6 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#-------------------------------------------------------------------------------
#  University of Applied Sciences Technikum Wien
#
#  Department of Embedded Systems
#  http://embsys.technikum-wien.at
#
#  Josef Ressel Center for Verification of Embedded Computing Systems
#  http://vecs.technikum-wien.at
#
#-------------------------------------------------------------------------------
#  Description:
#  FIJI Settings Graphical View
#-------------------------------------------------------------------------------

Christian Fibich's avatar
Christian Fibich committed
15
16
17
18
19
## @file FIJISettingsCanvas.pm
# @brief Contains class \ref Tk::FIJISettingsCanvas

## @class Tk::FIJISettingsCanvas
# @brief FIJI Settings Graphical View
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package Tk::FIJISettingsCanvas;

use strict;
use warnings;

use Log::Log4perl qw(get_logger);
use Scalar::Util 'blessed';
use Tk;
use Tk::Balloon;
use Tie::Watch;

use Tk::widgets qw(Canvas);
use base qw(Tk::Derived Tk::Canvas);

Construct Tk::Widget 'FIJISettingsCanvas';

36
#
37
# Constant coordinates
38
#
39
40
41
42
43
use constant {
    DIAG_BASE_X => 20,
    DIAG_BASE_Y => 20,
    DIAG_PAD_X  => 30,
    DIAG_PAD_Y  => 30,
Christian Fibich's avatar
Christian Fibich committed
44
45
46
47
    FIC_WIDTH   => 80,
    FIC_HEIGHT  => 80,
    DUT_WIDTH   => 120,
    DUT_HEIGHT  => 80,
48
49
50
51
    FIU_WIDTH   => 20,
    FIU_HEIGHT  => 20,
};
use constant {
Christian Fibich's avatar
Christian Fibich committed
52
53
    FIC_BASE_X   => 5.3 * DIAG_BASE_X,
    FIC_BASE_Y   => DIAG_BASE_Y,
54
55
    FIC_DUT_PADX => FIC_WIDTH / 2,
    FIC_DUT_PADY => FIC_HEIGHT / 4,
Christian Fibich's avatar
Christian Fibich committed
56
    FIU_SPACE_X  => (DUT_WIDTH / 3),
57
58
59
60
61
62
63
64
65
66
};
use constant {
    DUT_BASE_X => FIC_BASE_X + FIC_WIDTH + FIC_DUT_PADX,
    DUT_BASE_Y => FIC_BASE_Y + FIC_HEIGHT + FIC_DUT_PADY,
};
use constant {
    FIU0_BASE_X => DUT_BASE_X + FIU_WIDTH / 2,
    FIU0_BASE_Y => FIC_BASE_Y + 0.75 * FIC_HEIGHT - FIU_HEIGHT / 2,
};
use constant {
Christian Fibich's avatar
Christian Fibich committed
67
68
69
70
    FIU1_BASE_X     => FIU0_BASE_X + FIU_SPACE_X,
    FIU1_BASE_Y     => FIU0_BASE_Y,
    FIU2_BASE_X     => FIU0_BASE_X + 2 * FIU_SPACE_X,
    FIU2_BASE_Y     => FIU0_BASE_Y,
71
72
73
    FIU_DV_BASE_Y   => FIU0_BASE_Y - 0.8 * FIU_HEIGHT,
    FIU_LFSR_BASE_Y => FIU0_BASE_Y - 1.2 * FIU_HEIGHT,
};
74
75

sub Populate {
76
    my $logger = get_logger("");
Christian Fibich's avatar
Christian Fibich committed
77
    my ($self, $args) = @_;
78
    my $settings_ref = delete $args->{'-settings_ref'};
79
80

    $self->SUPER::Populate($args);
Christian Fibich's avatar
Christian Fibich committed
81
82
    $self->SUPER::configure(-width  => DUT_BASE_X + DUT_WIDTH + DIAG_PAD_X);
    $self->SUPER::configure(-height => DUT_BASE_Y + DUT_HEIGHT + DIAG_PAD_Y);
83
    $self->SUPER::configure(-scrollregion => [ 0,0,DUT_BASE_X + DUT_WIDTH + DIAG_PAD_X,DUT_BASE_Y + DUT_HEIGHT + DIAG_PAD_Y]);
84
85
86
87

    $self->{'balloon'} = $self->Balloon();
    $self->_draw;

Christian Fibich's avatar
Christian Fibich committed
88
    $self->ConfigSpecs(-settings_ref => [qw/METHOD settings_ref   settings_ref/, undef],);
89

Christian Fibich's avatar
Christian Fibich committed
90
    if (ref($$settings_ref) eq "FIJI::Settings") {
91
92
93
94
95
96
97
98
        $self->{'settings_ref'} = $settings_ref;
        $self->update();
    } else {
        my $msg = "Option -settings_ref must be a reference to FIJI Settings";
        $logger->error($msg);
        return $msg;
    }
    return $self;
99
100
101
}

sub settings_ref {
102
    my $logger = get_logger("");
Christian Fibich's avatar
Christian Fibich committed
103
    my ($self, $settings_ref) = @_;
104

Christian Fibich's avatar
Christian Fibich committed
105
106
107
108
109
110
111
112
113
    if (defined $settings_ref) {
        if (ref($$settings_ref) eq "FIJI::Settings") {
            $self->{'settings_ref'} = $settings_ref;
            $self->update();
        } else {
            my $msg = "Option -settings_ref must be a reference to FIJI Settings";
            $logger->error($msg);
            return $msg;
        }
114
    }
Christian Fibich's avatar
Christian Fibich committed
115
    return $self->{'settings_ref'};
116
117
118
119
120
121
122
123
}

# This subroutine creates all canvas objects
# The update subroutine hides/shows the individual objects according to the
# current FIJI Settings
sub _draw() {
    my ($self) = @_;

124
125
126
    my $canvas_elements = {

        FIC => {
Christian Fibich's avatar
Christian Fibich committed
127
128
129
            box => $self->createRectangle(FIC_BASE_X, FIC_BASE_Y,
                FIC_BASE_X + FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT, -fill => "grey"
            ),
130
            text => $self->createText(FIC_BASE_X + FIC_WIDTH / 2, FIC_BASE_Y + FIC_HEIGHT / 2, -text => "Fault\nInjection\nController\n(FIC)", -justify => "center"),
131
132
133
        },

        DUT => {
Christian Fibich's avatar
Christian Fibich committed
134
135
136
137
            box => $self->createRectangle(DUT_BASE_X, DUT_BASE_Y,
                DUT_BASE_X + DUT_WIDTH, DUT_BASE_Y + DUT_HEIGHT, -fill => "grey"
            ),

138
            text => $self->createText(DUT_BASE_X + DUT_WIDTH / 2, DUT_BASE_Y + DUT_HEIGHT / 2, -text => "Instrumented\nNetlist of DUT", -justify => "center"),
Christian Fibich's avatar
Christian Fibich committed
139

140
            input => $self->createLine(
141
                DUT_BASE_X + 0.5 * DUT_WIDTH - 5, DUT_BASE_Y + DUT_HEIGHT,
Christian Fibich's avatar
Christian Fibich committed
142
                DUT_BASE_X + 0.5 * DUT_WIDTH - 5, DUT_BASE_Y + DUT_HEIGHT + 20, -arrow => "first", -width => 2
143
            ),
Christian Fibich's avatar
Christian Fibich committed
144

145
            output => $self->createLine(
146
                DUT_BASE_X + 0.5 * DUT_WIDTH + 5, DUT_BASE_Y + DUT_HEIGHT,
Christian Fibich's avatar
Christian Fibich committed
147
                DUT_BASE_X + 0.5 * DUT_WIDTH + 5, DUT_BASE_Y + DUT_HEIGHT + 20, -arrow => "last", -width => 2
148
            ),
149
150
151
        },

        clock => {
Christian Fibich's avatar
Christian Fibich committed
152
153
154
155
156
157
158
            line => $self->createLine(
                FIC_BASE_X + 0.80 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT,
                FIC_BASE_X + 0.80 * FIC_WIDTH, DUT_BASE_Y + DUT_HEIGHT * 0.20,
                DUT_BASE_X, DUT_BASE_Y + DUT_HEIGHT * 0.20, -arrow => "first"
            ),

            text => $self->createText(FIC_BASE_X + 0.80 * FIC_WIDTH * 1.05, DUT_BASE_Y + DUT_HEIGHT * 0.20, -text => "Clock", -anchor => "sw"),
159
160
161
        },

        host_interface => {
162
163
            tx_line => $self->createLine(DIAG_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.7,
                FIC_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.7, -arrow => "first"
Christian Fibich's avatar
Christian Fibich committed
164
            ),
165

166
167
            rx_line => $self->createLine(DIAG_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.95,
                FIC_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.95, -arrow => "last"
Christian Fibich's avatar
Christian Fibich committed
168
            ),
169

170
171
            tx_text => $self->createText(DIAG_BASE_X * 1.05, FIC_BASE_Y + FIC_HEIGHT * 0.7, -text => "TX", -anchor => "sw"),
            rx_text => $self->createText(DIAG_BASE_X * 1.05, FIC_BASE_Y + FIC_HEIGHT * 0.95, -text => "RX", -anchor => "sw"),
172
173
174
175
        },

        FIU => {
            '0' => {
Christian Fibich's avatar
Christian Fibich committed
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
                lfsrtxt => $self->createText(FIC_BASE_X + FIC_WIDTH * 1.05, FIU_LFSR_BASE_Y, -anchor => "sw"),
                main    => $self->createRectangle(FIU0_BASE_X,              FIU0_BASE_Y,
                    FIU0_BASE_X + FIU_WIDTH, FIU0_BASE_Y + FIU_HEIGHT, -fill => "grey"
                ),
                txt => $self->createText(FIU0_BASE_X + FIU_WIDTH / 2, FIU0_BASE_Y + FIU_HEIGHT / 2, -text => "0"),

                d => $self->createLine(
                    FIC_BASE_X + FIC_WIDTH, FIU0_BASE_Y + FIU_HEIGHT / 2,
                    FIU0_BASE_X, FIU0_BASE_Y + FIU_HEIGHT / 2, -arrow => "last"
                ),

                dv => $self->createLine(
                    FIC_BASE_X + FIC_WIDTH,      FIU_DV_BASE_Y,
                    FIU0_BASE_X + FIU_WIDTH / 3, FIU_DV_BASE_Y,
                    FIU0_BASE_X + FIU_WIDTH / 3, FIU0_BASE_Y, -arrow => "last"
                ),

193
                lfsr => $self->createLine(
194
195
                    FIC_BASE_X + FIC_WIDTH,          FIU_LFSR_BASE_Y,
                    FIU0_BASE_X + 2 * FIU_WIDTH / 3, FIU_LFSR_BASE_Y,
Christian Fibich's avatar
Christian Fibich committed
196
197
198
199
200
201
202
203
204
205
206
                    FIU0_BASE_X + 2 * FIU_WIDTH / 3, FIU0_BASE_Y, -width => 2, -arrow => "last"
                ),

                con_i => $self->createLine(
                    FIU0_BASE_X + FIU_WIDTH / 3, FIU0_BASE_Y + FIU_HEIGHT,
                    FIU0_BASE_X + FIU_WIDTH / 3, DUT_BASE_Y,
                    -arrow => "first"
                ),
                con_o => $self->createLine(
                    FIU0_BASE_X + 2 * FIU_WIDTH / 3, FIU0_BASE_Y + FIU_HEIGHT,
                    FIU0_BASE_X + 2 * FIU_WIDTH / 3, DUT_BASE_Y,
207
208
                    -arrow => "last"
                ),
209
210
            },
            '1' => {
211
                main => $self->createRectangle(
Christian Fibich's avatar
Christian Fibich committed
212
213
                    FIU1_BASE_X, FIU1_BASE_Y,

214
                    FIU1_BASE_X + FIU_WIDTH, FIU1_BASE_Y + FIU_HEIGHT,
215
                    -fill => "grey",
Christian Fibich's avatar
Christian Fibich committed
216
217
218
219
220
221
222
223
224
225
226
227
228
                    -dash => [2, 4]
                ),
                txt => $self->createText(FIU1_BASE_X + FIU_WIDTH / 2, FIU1_BASE_Y + FIU_HEIGHT / 2, -text => "1"),
                d   => $self->createLine(
                    FIU0_BASE_X + FIU_WIDTH,
                    FIU1_BASE_Y + FIU_HEIGHT / 2,
                    FIU1_BASE_X, FIU1_BASE_Y + FIU_HEIGHT / 2, -arrow => "last"
                ),
                dv => $self->createLine(
                    FIU0_BASE_X + FIU_WIDTH / 3, FIU_DV_BASE_Y,
                    FIU1_BASE_X + FIU_WIDTH / 3, FIU_DV_BASE_Y,
                    FIU1_BASE_X + FIU_WIDTH / 3, FIU1_BASE_Y,
                    -arrow => "last"
229
230
                ),
                lfsr => $self->createLine(
231
232
233
                    FIU0_BASE_X + 2 * FIU_WIDTH / 3, FIU_LFSR_BASE_Y,
                    FIU1_BASE_X + 2 * FIU_WIDTH / 3, FIU_LFSR_BASE_Y,
                    FIU1_BASE_X + 2 * FIU_WIDTH / 3, FIU1_BASE_Y,
Christian Fibich's avatar
Christian Fibich committed
234

235
236
237
                    -width => 2,
                    -arrow => "last"
                ),
Christian Fibich's avatar
Christian Fibich committed
238
239
240
241
242
243
244
245
246
247
                con_i => $self->createLine(
                    FIU1_BASE_X + FIU_WIDTH / 3, FIU1_BASE_Y + FIU_HEIGHT,
                    FIU1_BASE_X + FIU_WIDTH / 3, DUT_BASE_Y,
                    -arrow => "first"
                ),
                con_o => $self->createLine(
                    FIU1_BASE_X + 2 * FIU_WIDTH / 3, FIU1_BASE_Y + FIU_HEIGHT,
                    FIU1_BASE_X + 2 * FIU_WIDTH / 3, DUT_BASE_Y,
                    -arrow => "last"
                ),
248
249
            },
            '2' => {
Christian Fibich's avatar
Christian Fibich committed
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
                main => $self->createRectangle(FIU2_BASE_X, FIU2_BASE_Y,
                    FIU2_BASE_X + FIU_WIDTH, FIU2_BASE_Y + FIU_HEIGHT,
                    -fill => "grey"
                ),
                txt => $self->createText(FIU2_BASE_X + FIU_WIDTH / 2, FIU2_BASE_Y + FIU_HEIGHT / 2),
                d   => $self->createLine(
                    FIU1_BASE_X + FIU_WIDTH, FIU1_BASE_Y + FIU_HEIGHT / 2,
                    FIU2_BASE_X, FIU2_BASE_Y + FIU_HEIGHT / 2, -arrow => "last"
                ),
                dv => $self->createLine(
                    FIU0_BASE_X + FIU_WIDTH / 3, FIU_DV_BASE_Y,
                    FIU2_BASE_X + FIU_WIDTH / 3, FIU_DV_BASE_Y,
                    FIU2_BASE_X + FIU_WIDTH / 3, FIU2_BASE_Y,
                    -arrow => "last"
                ),
265
                lfsr => $self->createLine(
266
267
268
                    FIU0_BASE_X + 2 * FIU_WIDTH / 3, FIU_LFSR_BASE_Y,
                    FIU2_BASE_X + 2 * FIU_WIDTH / 3, FIU_LFSR_BASE_Y,
                    FIU2_BASE_X + 2 * FIU_WIDTH / 3, FIU2_BASE_Y,
269
270
271
                    -width => 2,
                    -arrow => "last"
                ),
Christian Fibich's avatar
Christian Fibich committed
272
273
274
275
276
277
278
279
280
281
                con_i => $self->createLine(
                    FIU2_BASE_X + FIU_WIDTH / 3, FIU2_BASE_Y + FIU_HEIGHT,
                    FIU2_BASE_X + FIU_WIDTH / 3, DUT_BASE_Y,
                    -arrow => "first"
                ),
                con_o => $self->createLine(
                    FIU2_BASE_X + 2 * FIU_WIDTH / 3, FIU2_BASE_Y + FIU_HEIGHT,
                    FIU2_BASE_X + 2 * FIU_WIDTH / 3, DUT_BASE_Y,
                    -arrow => "last"
                ),
282
283
284
285
286
            },
        },

        fiu_frame => {
            '0' => {
Christian Fibich's avatar
Christian Fibich committed
287
288
289
290
291
292
                txt => $self->createText(FIU0_BASE_X + FIU_WIDTH + 10, FIU0_BASE_Y + FIU_HEIGHT / 2, -text => "FIU", -anchor => "w"),
                frm => $self->createRectangle(
                    FIU0_BASE_X - 5,             FIU0_BASE_Y - 5,
                    FIU0_BASE_X + FIU_WIDTH + 5, FIU0_BASE_Y + FIU_HEIGHT + 5,
                    -dash => [4, 2]
                ),
293
294
            },
            '1' => {
Christian Fibich's avatar
Christian Fibich committed
295
296
297
298
299
300
                txt => $self->createText(FIU1_BASE_X + FIU_WIDTH + 10, FIU1_BASE_Y + FIU_HEIGHT / 2, -text => "FIUs", -anchor => "w"),
                frm => $self->createRectangle(
                    FIU0_BASE_X - 5,             FIU1_BASE_Y - 5,
                    FIU1_BASE_X + FIU_WIDTH + 5, FIU1_BASE_Y + FIU_HEIGHT + 5,
                    -dash => [4, 2]
                ),
301
            },
302
303
            '2',
            => {
Christian Fibich's avatar
Christian Fibich committed
304
305
306
307
308
309
310
                txt => $self->createText(FIU2_BASE_X + FIU_WIDTH + 10, FIU2_BASE_Y + FIU_HEIGHT / 2, -text => "FIUs", -anchor => "w"),
                frm => $self->createRectangle(
                    FIU0_BASE_X - 5,             FIU0_BASE_Y - 5,
                    FIU2_BASE_X + FIU_WIDTH + 5, FIU2_BASE_Y + FIU_HEIGHT + 5,
                    -dash => [4, 2]
                ),
               }
311
312
313
        },

        internal_reset => {
Christian Fibich's avatar
Christian Fibich committed
314
315
316
317
318
            line => $self->createLine(
                FIC_BASE_X + 0.60 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT + 5,
                FIC_BASE_X + 0.60 * FIC_WIDTH, DUT_BASE_Y + DUT_HEIGHT * 0.40,
                DUT_BASE_X - 5,                DUT_BASE_Y + DUT_HEIGHT * 0.40
            ),
319

Christian Fibich's avatar
Christian Fibich committed
320
321
322
323
            FIC2DUT_final_line => $self->createLine(
                DUT_BASE_X - 5, DUT_BASE_Y + DUT_HEIGHT * 0.40,
                DUT_BASE_X, DUT_BASE_Y + DUT_HEIGHT * 0.40, -arrow => "last"
            ),
324

Christian Fibich's avatar
Christian Fibich committed
325
326
327
328
            DUT2FIC_final_line => $self->createLine(
                FIC_BASE_X + 0.60 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT + 5,
                FIC_BASE_X + 0.60 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT, -arrow => "last"
            ),
329

Christian Fibich's avatar
Christian Fibich committed
330
            text => $self->createText(FIC_BASE_X + 0.60 * FIC_WIDTH * 1.05, DUT_BASE_Y + DUT_HEIGHT * 0.40, -text => "Int. Reset", -anchor => "sw"),
331

Christian Fibich's avatar
Christian Fibich committed
332
333
334
335
336
337
338
339
            FIC2DUT_inverter_symbol => $self->createOval(
                DUT_BASE_X - 5, DUT_BASE_Y + DUT_HEIGHT * 0.40 - 2.5,
                DUT_BASE_X, DUT_BASE_Y + DUT_HEIGHT * 0.40 + 2.5, -fill => "white"
            ),
            DUT2FIC_inverter_symbol => $self->createOval(
                FIC_BASE_X + 0.60 * FIC_WIDTH - 2.5, FIC_BASE_Y + FIC_HEIGHT + 5,
                FIC_BASE_X + 0.60 * FIC_WIDTH + 2.5, FIC_BASE_Y + FIC_HEIGHT, -fill => "white"
            ),
340
341
342
        },

        internal_trigger => {
Christian Fibich's avatar
Christian Fibich committed
343
344
345
346
347
            line => $self->createLine(
                FIC_BASE_X + 0.40 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT + 5,
                FIC_BASE_X + 0.40 * FIC_WIDTH, DUT_BASE_Y + DUT_HEIGHT * 0.60,
                DUT_BASE_X, DUT_BASE_Y + DUT_HEIGHT * 0.60, -arrow => "first"
            ),
348

Christian Fibich's avatar
Christian Fibich committed
349
350
351
352
            final_line => $self->createLine(
                FIC_BASE_X + 0.40 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT,
                FIC_BASE_X + 0.40 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT + 5, -arrow => "first"
            ),
353

Christian Fibich's avatar
Christian Fibich committed
354
355
356
357
358
            text            => $self->createText(FIC_BASE_X + 0.40 * FIC_WIDTH * 1.05, DUT_BASE_Y + DUT_HEIGHT * 0.60, -text => "Int. Trigger", -anchor => "sw"),
            inverter_symbol => $self->createOval(
                FIC_BASE_X + 0.40 * FIC_WIDTH - 2.5, FIC_BASE_Y + FIC_HEIGHT,
                FIC_BASE_X + 0.40 * FIC_WIDTH + 2.5, FIC_BASE_Y + FIC_HEIGHT + 5, -fill => "white"
            ),
359
360
361
        },

        fault_detect => {
Christian Fibich's avatar
Christian Fibich committed
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
            line => $self->createLine(
                FIC_BASE_X + 0.20 * FIC_WIDTH, FIC_BASE_Y + FIC_HEIGHT,
                FIC_BASE_X + 0.20 * FIC_WIDTH, DUT_BASE_Y + DUT_HEIGHT * 0.80,
                DUT_BASE_X - 7.5, DUT_BASE_Y + DUT_HEIGHT * 0.80, -arrow => "first"
            ),
            final_line_1 => $self->createLine(
                DUT_BASE_X - 7.5, DUT_BASE_Y + DUT_HEIGHT * 0.80,
                DUT_BASE_X,       DUT_BASE_Y + DUT_HEIGHT * 0.80
            ),
            inverter_symbol_1 => $self->createOval(
                DUT_BASE_X - 5, DUT_BASE_Y + DUT_HEIGHT * 0.80 - 2.5,
                DUT_BASE_X, DUT_BASE_Y + DUT_HEIGHT * 0.80 + 2.5, -fill => "white"
            ),
            final_line_2 => $self->createLine(
                DUT_BASE_X - 7.5, DUT_BASE_Y + DUT_HEIGHT * 0.80,
                DUT_BASE_X - 7.5, DUT_BASE_Y + DUT_HEIGHT * 0.80 + 10, DUT_BASE_X, DUT_BASE_Y + DUT_HEIGHT * 0.80 + 10
            ),
            inverter_symbol_2 => $self->createOval(
                DUT_BASE_X - 5, DUT_BASE_Y + DUT_HEIGHT * 0.80 + 7.5,
                DUT_BASE_X, DUT_BASE_Y + DUT_HEIGHT * 0.80 + 12.5, -fill => "white"
            ),
            text => $self->createText(FIC_BASE_X + 0.20 * FIC_WIDTH * 1.05, DUT_BASE_Y + DUT_HEIGHT * 0.80, -anchor => "sw"),
384
385
386
        },

        external_reset => {
Christian Fibich's avatar
Christian Fibich committed
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
            line => $self->createLine(DIAG_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.2,
                FIC_BASE_X - 5, FIC_BASE_Y + FIC_HEIGHT * 0.2, -arrow => "last"
            ),

            final_line => $self->createLine(
                FIC_BASE_X - 5, FIC_BASE_Y + FIC_HEIGHT * 0.2,
                FIC_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.2, -arrow => "last"
            ),

            text => $self->createText(DIAG_BASE_X * 1.05, FIC_BASE_Y + FIC_HEIGHT * 0.2, -text => "External reset", -anchor => "sw"),

            inverter_symbol => $self->createOval(
                FIC_BASE_X - 5, FIC_BASE_Y + FIC_HEIGHT * 0.2 - 2.5,
                FIC_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.2 + 2.5, -fill => "white"
            ),
402
403
        },
        external_trigger => {
404
405
            line => $self->createLine(DIAG_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.45,
                FIC_BASE_X - 5, FIC_BASE_Y + FIC_HEIGHT * 0.45, -arrow => "last"
Christian Fibich's avatar
Christian Fibich committed
406
407
408
            ),

            final_line => $self->createLine(
409
410
                FIC_BASE_X - 5, FIC_BASE_Y + FIC_HEIGHT * 0.45,
                FIC_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.45, -arrow => "last"
Christian Fibich's avatar
Christian Fibich committed
411
412
            ),

413
            text => $self->createText(DIAG_BASE_X * 1.05, FIC_BASE_Y + FIC_HEIGHT * 0.45, -text => "External trigger", -anchor => "sw"),
Christian Fibich's avatar
Christian Fibich committed
414
415

            inverter_symbol => $self->createOval(
416
417
                FIC_BASE_X - 5, FIC_BASE_Y + FIC_HEIGHT * 0.45 - 2.5,
                FIC_BASE_X, FIC_BASE_Y + FIC_HEIGHT * 0.45 + 2.5, -fill => "white"
Christian Fibich's avatar
Christian Fibich committed
418
            ),
419
420
        }
    };
421

422
    $self->{'canvas_elements'} = $canvas_elements;
423
424
425
426
427
428

}

sub update {
    my $self = shift;

Christian Fibich's avatar
Christian Fibich committed
429
430
    my $fiu_num    = @{${$self->{'settings_ref'}}->{'fius'}};
    my $design_ref = ${$self->{'settings_ref'}}->{'design'};
431
432
433
434
435

    # This is the hash used by the Balloon widget for showing Tooltips
    # The keys will be the returned ID when creating Canvas objects
    my $tooltips = {};

436
    my $canvas_elements           = $self->{'canvas_elements'};
437
438
439
440
441
442
443
444
445
446
    my $fiu_elements              = $canvas_elements->{'FIU'};
    my $fiu_frame_elements        = $canvas_elements->{'fiu_frame'};
    my $internal_reset_elements   = $canvas_elements->{'internal_reset'};
    my $internal_trigger_elements = $canvas_elements->{'internal_trigger'};
    my $fault_detect_elements     = $canvas_elements->{'fault_detect'};
    my $external_reset_elements   = $canvas_elements->{'external_reset'};
    my $external_trigger_elements = $canvas_elements->{'external_trigger'};
    my $fic_elements              = $canvas_elements->{'FIC'};
    my $clock_elements            = $canvas_elements->{'clock'};
    my $host_interface_elements   = $canvas_elements->{'host_interface'};
447
448
449
450
451

    #---------------------------------------------------------------------------
    # FIUS
    #---------------------------------------------------------------------------

Christian Fibich's avatar
Christian Fibich committed
452
    $self->itemconfigure($fiu_elements->{'0'}->{'lfsrtxt'}, -text => "LFSR [" . ($design_ref->{'LFSR_WIDTH'} - 1) . ":0]");
453

454
    # Make all FIU-related elements invisible
Christian Fibich's avatar
Christian Fibich committed
455
456
457
458
    for my $i (keys(%{$fiu_elements})) {
        $tooltips->{$fiu_elements->{$i}->{'main'}} = undef;
        for my $k (keys(%{$fiu_elements->{$i}})) {
            $self->itemconfigure($fiu_elements->{$i}->{$k}, -state => "hidden");
459
        }
Christian Fibich's avatar
Christian Fibich committed
460
461
        for my $k (keys(%{$fiu_frame_elements->{$i}})) {
            $self->itemconfigure($fiu_frame_elements->{$i}->{$k}, -state => "hidden");
462
463
464
        }
    }

465
    # Show leftmost FIU box, configure net name
Christian Fibich's avatar
Christian Fibich committed
466
467
468
469
470
    if ($fiu_num > 0) {
        for my $k (keys(%{$fiu_elements->{'0'}})) {
            $self->itemconfigure($fiu_elements->{'0'}->{$k}, -state => "normal");
            if (defined @{${$self->{'settings_ref'}}->{'fius'}}[0]->{'FIU_NET_NAME'}) {
                $tooltips->{$fiu_elements->{'0'}->{$k}} = "Net: " . @{${$self->{'settings_ref'}}->{'fius'}}[0]->{'FIU_NET_NAME'};
Christian Fibich's avatar
Christian Fibich committed
471
            } else {
Christian Fibich's avatar
Christian Fibich committed
472
                $tooltips->{$fiu_elements->{'0'}->{$k}} = "Net: Undefined";
Christian Fibich's avatar
Christian Fibich committed
473
            }
474
475
476
        }
    }

477
    # Show middle FIU box
Christian Fibich's avatar
Christian Fibich committed
478
479
480
    if ($fiu_num > 1) {
        for my $k (keys(%{$fiu_elements->{'1'}})) {
            $self->itemconfigure($fiu_elements->{'1'}->{$k}, -state => "normal");
481
482
        }

Christian Fibich's avatar
Christian Fibich committed
483
        if ($fiu_num > 3) {
484

485
            # Middle FIU Box = placeholder for inbetween FIUs
Christian Fibich's avatar
Christian Fibich committed
486
487
488
489
            my $helptxt = "FIUs 1 ... " . ($fiu_num - 2);
            for (my $fi = 1 ; $fi < $fiu_num - 1 ; $fi++) {
                if (defined @{${$self->{'settings_ref'}}->{'fius'}}[$fi]->{'FIU_NET_NAME'}) {
                    $helptxt .= "\n    $fi: Net: " . @{${$self->{'settings_ref'}}->{'fius'}}[$fi]->{'FIU_NET_NAME'};
Christian Fibich's avatar
Christian Fibich committed
490
                } else {
491
                    $helptxt .= "\n    $fi: Net: Undefined";
Christian Fibich's avatar
Christian Fibich committed
492
493
                }
            }
494

495
            # add tooltip, dash all elements which can be dashed
Christian Fibich's avatar
Christian Fibich committed
496
497
498
            for my $k (keys(%{$fiu_elements->{'1'}})) {
                $tooltips->{$fiu_elements->{'1'}->{$k}} = $helptxt;
                eval { $self->itemconfigure($fiu_elements->{'1'}->{$k}, -dash => [1, 2]); };
499
            }
Christian Fibich's avatar
Christian Fibich committed
500
            $self->itemconfigure($fiu_elements->{'1'}->{'txt'}, -text => "");
501
        } else {
502

503
            # Middle FIU Box = FIU with index '1'
Christian Fibich's avatar
Christian Fibich committed
504
505
506
            for my $k (keys(%{$fiu_elements->{'1'}})) {
                if (defined @{${$self->{'settings_ref'}}->{'fius'}}[1]->{'FIU_NET_NAME'}) {
                    $tooltips->{$fiu_elements->{'1'}->{$k}} = "Net: " . @{${$self->{'settings_ref'}}->{'fius'}}[1]->{'FIU_NET_NAME'};
Christian Fibich's avatar
Christian Fibich committed
507
                } else {
Christian Fibich's avatar
Christian Fibich committed
508
                    $tooltips->{$fiu_elements->{'1'}->{$k}} = "Net: Undefined";
Christian Fibich's avatar
Christian Fibich committed
509
                }
510

511
                # undash all elements which could be dashed
Christian Fibich's avatar
Christian Fibich committed
512
                eval { $self->itemconfigure($fiu_elements->{'1'}->{$k}, -dash => []); };
513
            }
Christian Fibich's avatar
Christian Fibich committed
514
            $self->itemconfigure($fiu_elements->{'1'}->{'txt'}, -text => "1");
515
516
517
        }
    }

518
    # Show rightmost FIU box
Christian Fibich's avatar
Christian Fibich committed
519
520
521
522
    if ($fiu_num > 2) {
        for my $k (keys(%{$fiu_elements->{'2'}})) {
            if (defined @{${$self->{'settings_ref'}}->{'fius'}}[$fiu_num - 1]->{'FIU_NET_NAME'}) {
                $tooltips->{$fiu_elements->{'2'}->{$k}} = "Net: " . @{${$self->{'settings_ref'}}->{'fius'}}[$fiu_num - 1]->{'FIU_NET_NAME'};
Christian Fibich's avatar
Christian Fibich committed
523
            } else {
Christian Fibich's avatar
Christian Fibich committed
524
                $tooltips->{$fiu_elements->{'2'}->{$k}} = "Net: Undefined";
Christian Fibich's avatar
Christian Fibich committed
525
            }
Christian Fibich's avatar
Christian Fibich committed
526
            $self->itemconfigure($fiu_elements->{'2'}->{$k}, -state => "normal");
527
        }
Christian Fibich's avatar
Christian Fibich committed
528
        $self->itemconfigure($fiu_elements->{'2'}->{'txt'}, -text => ($fiu_num - 1));
529
    }
530

531
    # Show dashed frame around all enabled FIUs & text "FIUs"
Christian Fibich's avatar
Christian Fibich committed
532
533
    if ($fiu_num > 0) {
        my $i = ($fiu_num < 3) ? $fiu_num - 1 : 2;
534

Christian Fibich's avatar
Christian Fibich committed
535
536
        for my $k (keys(%{$fiu_frame_elements->{$i}})) {
            $self->itemconfigure($fiu_frame_elements->{$i}->{$k}, -state => "normal");
537
538
539
540
        }
    }

    #---------------------------------------------------------------------------
Christian Fibich's avatar
Christian Fibich committed
541
    # FIC <-> DUT
542
543
    #---------------------------------------------------------------------------

544
545
546
547
548
    #
    # Internal reset
    #

    # show line & text if enabled
549
    $self->itemconfigure($internal_reset_elements->{'line'}, -state => ($design_ref->{'RST_DUT_OUT_EN'} == 1 || $design_ref->{'RST_DUT_IN_EN'} == 1) ? "normal" : "hidden");
550

551
    $self->itemconfigure($internal_reset_elements->{'text'}, -state => ($design_ref->{'RST_DUT_OUT_EN'} == 1 || $design_ref->{'RST_DUT_IN_EN'} == 1) ? "normal" : "hidden");
552
553

    # decide arrow direction if inverting
554
    $self->itemconfigure(
555
556
          $internal_reset_elements->{'line'}, -arrow => ($design_ref->{'RST_DUT_OUT_EN'} && $design_ref->{'RST_DUT_OUT_ACT'} == 0) ? "first"
        : ($design_ref->{'RST_DUT_IN_EN'} && $design_ref->{'RST_DUT_IN_ACT'} == 0) ? "last"
Christian Fibich's avatar
Christian Fibich committed
557
        :                                                                                   "none"
558
    );
559
560

    # if not inverting or direction DUT->FIC, show line segment next to DUT
561
    $self->itemconfigure($internal_reset_elements->{'FIC2DUT_final_line'}, -state => (($design_ref->{'RST_DUT_IN_EN'} == 1 && $design_ref->{'RST_DUT_IN_ACT'} == 1) || $design_ref->{'RST_DUT_OUT_EN'} == 1) ? "normal" : "hidden");
562

563
    # show arrow accordingly
564
    $self->itemconfigure($internal_reset_elements->{'FIC2DUT_final_line'}, -arrow => ($design_ref->{'RST_DUT_IN_EN'} == 1 && $design_ref->{'RST_DUT_IN_ACT'} == 1) ? "last" : "none");
565
566

    # if inverting and direction FIC->DUT, show inverter symbol
567
    $self->itemconfigure($internal_reset_elements->{'FIC2DUT_inverter_symbol'}, -state => ($design_ref->{'RST_DUT_IN_EN'} == 1 && $design_ref->{'RST_DUT_IN_ACT'} == 0) ? "normal" : "hidden");
568
569

    # if not inverting or direction FIC->DUT, show line segment next to FIC
570
    $self->itemconfigure($internal_reset_elements->{'DUT2FIC_final_line'}, -arrow => ($design_ref->{'RST_DUT_OUT_EN'} == 1 && $design_ref->{'RST_DUT_OUT_ACT'} == 1) ? "last" : "none");
571
572

    # show arrow accordingly
573
    $self->itemconfigure($internal_reset_elements->{'DUT2FIC_final_line'}, -state => (($design_ref->{'RST_DUT_OUT_EN'} == 1 && $design_ref->{'RST_DUT_OUT_ACT'} == 1) || $design_ref->{'RST_DUT_IN_EN'} == 1) ? "normal" : "hidden");
574
575

    # if inverting and direction DUT->FIC, show inverter symbol
576
    $self->itemconfigure($internal_reset_elements->{'DUT2FIC_inverter_symbol'}, -state => ($design_ref->{'RST_DUT_OUT_EN'} == 1 && $design_ref->{'RST_DUT_OUT_ACT'} == 0) ? "normal" : "hidden");
577
578
579

    my $internal_reset_tooltip;

580
581
582
583
584
    if ($design_ref->{'RST_DUT_IN_EN'} == 1) {
        $internal_reset_tooltip .= "Port: \t" . ((defined $design_ref->{'RST_DUT_IN_NAME'}) ? $design_ref->{'RST_DUT_IN_NAME'} : "Undefined") . "\n";
        $internal_reset_tooltip .= "Duration: \t" . $design_ref->{'RST_DUT_IN_DUR'} . " cycles";
    } elsif ($design_ref->{'RST_DUT_OUT_EN'} == 1) {
        $internal_reset_tooltip .= "Net: \t" . ((defined $design_ref->{'RST_DUT_OUT_NAME'}) ? $design_ref->{'RST_DUT_OUT_NAME'} : "Undefined");
585
    }
586

Christian Fibich's avatar
Christian Fibich committed
587
    $tooltips->{$internal_reset_elements->{'line'}} = $tooltips->{$internal_reset_elements->{'text'}} = $internal_reset_tooltip;
Christian Fibich's avatar
Christian Fibich committed
588

589
590
591
    #
    # Internal trigger
    #
Christian Fibich's avatar
Christian Fibich committed
592

593
    my $internal_trigger_tooltip;
594
    if ($design_ref->{'TRIG_DUT_EN'} == 1) {
595
        $internal_trigger_tooltip = "Net: ";
596
597
        if (defined $design_ref->{'TRIG_DUT_NAME'}) {
            $internal_trigger_tooltip .= $design_ref->{'TRIG_DUT_NAME'};
598
599
600
601
        } else {
            $internal_trigger_tooltip .= "Undefined";
        }
    }
602

603
    # show line and text if enabled
604
605
    $self->itemconfigure($internal_trigger_elements->{'line'}, -state => ($design_ref->{'TRIG_DUT_EN'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($internal_trigger_elements->{'text'}, -state => ($design_ref->{'TRIG_DUT_EN'} == 1) ? "normal" : "hidden");
606
607

    # if not inverting, show line segment next to FIC
608
    $self->itemconfigure($internal_trigger_elements->{'final_line'}, -state => ($design_ref->{'TRIG_DUT_ACT'} == 1 && $design_ref->{'TRIG_DUT_EN'} == 1) ? "normal" : "hidden");
609

610
    # if inverting, set arrow
611
    $self->itemconfigure($internal_trigger_elements->{'line'}, -arrow => ($design_ref->{'TRIG_DUT_ACT'} == 0 && $design_ref->{'TRIG_DUT_EN'} == 1) ? "first" : "none");
612

613
    # if inverting, show inverter symbol
614
    $self->itemconfigure($internal_trigger_elements->{'inverter_symbol'}, -state => ($design_ref->{'TRIG_DUT_ACT'} == 0 && $design_ref->{'TRIG_DUT_EN'} == 1) ? "normal" : "hidden");
615

Christian Fibich's avatar
Christian Fibich committed
616
    $tooltips->{$internal_trigger_elements->{'line'}} = $tooltips->{$internal_trigger_elements->{'text'}} = $internal_trigger_tooltip;
617
618
619
620

    #
    # Fault detection
    #
621

622
    # set text for width, show line and text if enabled
623
624
625
    $self->itemconfigure($fault_detect_elements->{'line'}, -state => ($design_ref->{'FD_1_EN'} == 1 || $design_ref->{'FD_2_EN'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($fault_detect_elements->{'text'}, -text => ($design_ref->{'FD_1_EN'} == 1 && $design_ref->{'FD_2_EN'} == 1) ? "Fault Detect [1:0]" : "Fault Detect");
    $self->itemconfigure($fault_detect_elements->{'text'}, -state => ($design_ref->{'FD_1_EN'} == 1 || $design_ref->{'FD_2_EN'} == 1) ? "normal" : "hidden");
626

627
    # make line thicker if both FD channels are enabled
628
    $self->itemconfigure($fault_detect_elements->{'line'}, -width => ($design_ref->{'FD_1_EN'} == 1 && $design_ref->{'FD_2_EN'} == 1) ? "2" : "1");
629

630
    # show line segments for channel 1 & 2
631
632
    $self->itemconfigure($fault_detect_elements->{'final_line_1'}, -state => ($design_ref->{'FD_1_EN'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($fault_detect_elements->{'final_line_2'}, -state => ($design_ref->{'FD_2_EN'} == 1) ? "normal" : "hidden");
633

634
    # show inverter symbols for channel 1 & 2
635
636
    $self->itemconfigure($fault_detect_elements->{'inverter_symbol_1'}, -state => ($design_ref->{'FD_1_EN'} == 1 && $design_ref->{'FD_1_INVERT'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($fault_detect_elements->{'inverter_symbol_2'}, -state => ($design_ref->{'FD_2_EN'} == 1 && $design_ref->{'FD_2_INVERT'} == 1) ? "normal" : "hidden");
637
638
639
640
641
642

    #
    # Generate help text to be shown in Tooltip
    # This text contains the net each channel (if enabled) is connected to
    #
    my $fd_helptxt = "";
643
    if ($design_ref->{'FD_1_EN'} == 1) {
644
        $fd_helptxt .= "Net 1: ";
645
        $fd_helptxt .= (defined $design_ref->{'FD_1_NAME'}) ? $design_ref->{'FD_1_NAME'} : "Undefined";
646
    }
647
    if ($design_ref->{'FD_1_EN'} == 1 && $design_ref->{'FD_2_EN'} == 1) {
648
649
        $fd_helptxt .= "\n";
    }
650
    if ($design_ref->{'FD_2_EN'} == 1) {
651
        $fd_helptxt .= "Net 2: ";
652
        $fd_helptxt .= (defined $design_ref->{'FD_2_NAME'}) ? $design_ref->{'FD_2_NAME'} : "Undefined";
653
    }
654

Christian Fibich's avatar
Christian Fibich committed
655
    $tooltips->{$fault_detect_elements->{'line'}} = $tooltips->{$fault_detect_elements->{'text'}} = $fd_helptxt;
Christian Fibich's avatar
Christian Fibich committed
656

657
658
659
    #
    # RX & TX
    #
Christian Fibich's avatar
Christian Fibich committed
660

661
    # set text for RX and TX to the respectively selected port names
Christian Fibich's avatar
Christian Fibich committed
662
663
    $tooltips->{$host_interface_elements->{'rx_line'}} = $tooltips->{$host_interface_elements->{'rx_text'}} = $design_ref->{'RX_IN_NAME'};
    $tooltips->{$host_interface_elements->{'tx_line'}} = $tooltips->{$host_interface_elements->{'tx_text'}} = $design_ref->{'TX_OUT_NAME'};
664

665
666
667
    #
    # External Trigger
    #
Christian Fibich's avatar
Christian Fibich committed
668

669
    # show external trigger line & text if enabled
670
671
    $self->itemconfigure($external_trigger_elements->{'line'}, -state => ($design_ref->{'TRIG_EXT_EN'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($external_trigger_elements->{'text'}, -state => ($design_ref->{'TRIG_EXT_EN'} == 1) ? "normal" : "hidden");
672

673
    # set arrow of line/end segment/inverter symbol
674
675
676
    $self->itemconfigure($external_trigger_elements->{'line'},            -arrow => ($design_ref->{'TRIG_EXT_ACT'} == 0 && $design_ref->{'TRIG_EXT_EN'} == 1) ? "last"   : "none");
    $self->itemconfigure($external_trigger_elements->{'final_line'},      -state => ($design_ref->{'TRIG_EXT_ACT'} == 1 && $design_ref->{'TRIG_EXT_EN'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($external_trigger_elements->{'inverter_symbol'}, -state => ($design_ref->{'TRIG_EXT_ACT'} == 0 && $design_ref->{'TRIG_EXT_EN'} == 1) ? "normal" : "hidden");
677

678
    # make full trigger port name as will be done in FIJI::VHDL for Tooltip text
679
    my $exttriggername = $design_ref->{'TRIG_EXT_IN_NAME'};
Christian Fibich's avatar
Christian Fibich committed
680
    $tooltips->{$external_trigger_elements->{'line'}} = $tooltips->{$external_trigger_elements->{'text'}} = $exttriggername;
681

682
683
684
685
686
    #
    # External Reset
    #

    # show external trigger line & text if enabled
687
688
    $self->itemconfigure($external_reset_elements->{'line'}, -state => ($design_ref->{'RST_EXT_EN'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($external_reset_elements->{'text'}, -state => ($design_ref->{'RST_EXT_EN'} == 1) ? "normal" : "hidden");
689

690
    # set arrow of line/end segment/inverter symbol
691
692
693
    $self->itemconfigure($external_reset_elements->{'final_line'},      -state => ($design_ref->{'RST_EXT_ACT'} == 1 && $design_ref->{'RST_EXT_EN'} == 1) ? "normal" : "hidden");
    $self->itemconfigure($external_reset_elements->{'line'},            -arrow => ($design_ref->{'RST_EXT_ACT'} == 0 && $design_ref->{'RST_EXT_EN'} == 1) ? "last"   : "none");
    $self->itemconfigure($external_reset_elements->{'inverter_symbol'}, -state => ($design_ref->{'RST_EXT_ACT'} == 0 && $design_ref->{'RST_EXT_EN'} == 1) ? "normal" : "hidden");
694
695

    # make full reset port name as will be done in FIJI::VHDL for Tooltip text
696
    my $extrstname = $design_ref->{'RST_EXT_IN_NAME'};
Christian Fibich's avatar
Christian Fibich committed
697
    $tooltips->{$external_reset_elements->{'line'}} = $tooltips->{$external_reset_elements->{'text'}} = $extrstname;
Christian Fibich's avatar
Christian Fibich committed
698

699
    # set Tooltip text for clock signal and text
700
    my $clock_tooltip = "Clock frequency: \t" . $design_ref->{'FREQUENCY'} . " Hz\n";
Christian Fibich's avatar
Christian Fibich committed
701
702
    $clock_tooltip .= "Net: \t" . ((defined $design_ref->{'CLOCK_NET'}) ? $design_ref->{'CLOCK_NET'} : "Undefined");
    $tooltips->{$clock_elements->{'line'}} = $tooltips->{$clock_elements->{'text'}} = $clock_tooltip;
Christian Fibich's avatar
Christian Fibich committed
703

704
    # set Tooltip text for Fault Injection Controller Box & text
Christian Fibich's avatar
Christian Fibich committed
705
    $tooltips->{$fic_elements->{'box'}} = $tooltips->{$fic_elements->{'text'}} = "Clock frequency: \t" . $design_ref->{'FREQUENCY'} . " Hz\n" . "Baud rate: \t" . $design_ref->{'BAUDRATE'} . " bps\n" . "Timer width: \t" . $design_ref->{'TIMER_WIDTH'} . " bytes";
706
707
708
709
710
711
712

    $self->{'balloon'}->attach(
        $self,
        -balloonposition => 'mouse',
        -msg             => $tooltips
    );
}