0% found this document useful (0 votes)
9 views43 pages

TclOK Script Checker Summary

The document provides instructions and outputs related to the usage of the TclOK(TM) Script Checker for validating Tcl scripts. It details the process of setting up the environment, running checks on scripts, and interpreting the results, including error summaries and command validations. Additionally, it highlights issues related to licensing and command execution within specific contexts, such as UPF files.

Uploaded by

DashThru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views43 pages

TclOK Script Checker Summary

The document provides instructions and outputs related to the usage of the TclOK(TM) Script Checker for validating Tcl scripts. It details the process of setting up the environment, running checks on scripts, and interpreting the results, including error summaries and command validations. Additionally, it highlights issues related to licensing and command execution within specific contexts, such as UPF files.

Uploaded by

DashThru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2

3
4

system-release

% cat /etc/system-release
CentOS Linux release 7.9.2009 (Core)

% tar xJvf DashRTL_v2024.[Link]

.cshrc
<installation_path>
tclok

DASHTHRU_LICENSE_SERVER
<port>
<hostname>

5
% setenv DASHTHRU_LICENSE_SERVER <port>@<hostname>:
% set path = ($path <installation_path>/DashRTL_v2024.12/bin)

% setenv DASHTHRU_LICENSE_SERVER 28000@lic_server1:28000@lic_server2


% set path = ($path /edatool/DashRTL_v2024.12/bin)

% which tclok
/edatool/DashRTL_v2024.12/bin/tclok
% tclok [Link] -v
TclOK(TM) Script Checker
Copyright(c) 2024, DashThru Technology, Ltd. All rights reserved.

Version: v2024.12-Alpha, build 2024/12/20


Date: 2024/12/25 [Link]
Host: EPYC / 64 Threads
Launch: tclok [Link] -v
Feedback: support@[Link]

Info: checked out license 'FusionShell-Lint'. (LIC-CO)

****************** TCL CHECK SUMMARY ******************


Total errors : 0
Total unknown commands : 0
Possible unknown commands : 0
Hierarchical summary : [Link] (errors:0, unknown_cmds:0)

OK

6

7

puts "haha
puts {haha

b
set a 0
puts $b

llength

llength {a b c} {a b}

haha

puts haha haha

lindex {a b c} a

8

list

set var [lindex {a b c} 1]


list $var
list [lindex {a b c} 1]

proc
p

proc p {} {return [lindex {a b c} 1]}


set var [p]
list $var
list [p]

9
file delete [Link]
exec rm [Link]
exec python3 [Link]

exec
-enable_ext_exec

10

proc

-verbose [Link]

ls rm which hostname

% tclok [Link] -verbose

****************** TCL CHECK SUMMARY ******************


Total errors : 0
Total unknown commands : 2 ->'set_module_top', 'set_parameter'
Possible unknown commands : 1 ->'hostname'
Hierarchical summary : [Link] (errors:0, unknown_cmds:2
->'set_module_top', 'set_parameter')

11

unknown_cmd
list
set var [unknown_cmd {a b c}]
list $var
list [unknown_cmd {a b c}]

unknown_cmd lindex
lindex list

set var [lindex [unknown_cmd {a b c}] 1]


list $var
list [lindex [unknown_cmd {a b c}] 1]

12
1.

2.

parse_proc_args define_proc_constraints

[Link]
set_parameter hostname
[Link]

set_parameter
define_proc_constraints

parse_proc_args
set_parameter
$cellname [Link]
set_parameter
result

13
hostname
machine001

% tclok [Link] -init [Link] -verbose

****************** TCL CHECK SUMMARY ******************


Total errors : 0
Total unknown commands : 0
Possible unknown commands : 0
Hierarchical summary : [Link] (errors:0, unknown_cmds:0)

14

[Link]
set_parameter
-cellname -value
-iscell boolean

set_parameter
-value -iscell

% tclok [Link] -init [Link] -verbose

checking: set_parameter -cellname top -value 1.2


Error: wrong # args: expect integer value for '-value' of procedure
'set_parameter' but get '1.2'
Line: 1
File: [Link]

checking: set_parameter -iscell top


Error: wrong # args: expect boolean value for '-iscell' of procedure
'set_parameter' but get 'top'
Line: 1
File: [Link]

****************** TCL CHECK SUMMARY ******************


Total errors : 0
Total unknown commands : 0
Possible unknown commands : 0
Hierarchical summary : [Link] (errors:0, unknown_cmds:0)

15

[Link]
pymode
say_one_or_two_words

% tclok [Link] -init [Link] -verbose

<info> switch back to tclmode ...


****************** TCL CHECK SUMMARY ******************
Total errors : 0
Total unknown commands : 0
Possible unknown commands : 0
Hierarchical summary : [Link] (errors:0, unknown_cmds:0)

16
-init -x

17
-verbose
-log

% tclok [Link] -log [Link]

FAILED OK

18
19
-verbose
-log

TCL CHECK SUMMARY


% tclok [Link] -log [Link] -verbose

TCL CHECK SUMMARY

source

20
21

1.
while for foreach

2.
proc

3.

22
-strict
FAILED
-autorun

[Link]
get_pins set_level_shifter getpins
set_level_shifters

OK
% tclok [Link] -verbose

****************** TCL CHECK SUMMARY ******************


Total errors : 0
Total unknown commands : 2 ->'getpins', 'set_level_shifters'
Possible unknown commands : 0
Hierarchical summary :[Link] (errors:0,
unknown_cmds:2 ->'getpins', 'set_level_shifters')

OK

23

-strict
FAILED

% tclok [Link] -verbose -strict

Error: invalid command name "getpins"


Line: 3
File: [Link]

Error: invalid command name "set_level_shifters"


Line: 4
File: [Link]

****************** TCL CHECK SUMMARY ******************


Total errors : 2
Total unknown commands : 0
Possible unknown commands : 0
Hierarchical summary : [Link] (errors:2, unknown_cmds:0)

FAILED

24
1.

2.

-init
-x

% tclok [Link] -log [Link] -verbose -init [Link]


% tclok [Link] -log [Link] -verbose -x "set design top;
set width 16;"

% tclok [Link] -log [Link] -verbose -init [Link]


% tclok [Link] -log [Link] -verbose -x "pymode;
design='top'; width='16';"

25

[Link]
$design $width set_parameter
[Link]

% tclok [Link] -log [Link] -verbose -init [Link]

% tclok [Link] -log [Link] -verbose -init [Link]

26

[Link]
$design $width set_parameter
-x

-x
% tclok [Link] -log [Link] -verbose -x "set design top;
set width 16;"

-x
% tclok [Link] -log [Link] -verbose -x "pymode;
design='top'; width='16';"

27
-print_var_at_line

if
[Link]

% tclok [Link] -verbose -print_var_at_line "5 FLOW DESIGN_TOP


RUN_TYPE"

*
test
% tclok [Link] -verbose -print_var_at_line "test*:5 FLOW
DESIGN_TOP RUN_TYPE"

source

% tclok [Link] -verbose -print_var_at_line "[Link] FLOW


DESIGN_TOP RUN_TYPE"

28
<hook> line 5: value of $FLOW is "floorplan"
<hook> line 5: value of $DESIGN_TOP is "sub"
<hook> line 5: variable $RUN_TYPE does not exist

-print_var_at_line
% tclok [Link] -verbose
-print_var_at_line "[Link] FLOW DESIGN_TOP RUN_TYPE"
-print_var_at_line "[Link] FLOW DESIGN_TOP RUN_TYPE"

<hook> line 2: value of $FLOW is "floorplan"


<hook> line 2: variable $DESIGN_TOP does not exist
<hook> line 2: variable $RUN_TYPE does not exist
<hook> line 5: value of $FLOW is "floorplan"
<hook> line 5: value of $DESIGN_TOP is "sub"
<hook> line 5: variable $RUN_TYPE does not exist

29
1.
get_cells get_pins

2.

get_cells get_pins
[Link]
-strict_upf

1. .upf
2.
load_upf

% tclok [Link] -verbose -strict_upf


% tclok [Link] -verbose -strict_upf

30
Error: command 'get_pins' is not allowed inside UPF file
Line: 30
File: [Link]

Error: can't read "subin": no such variable


Line: 31
File: [Link]

Error: command 'get_cells' is not allowed inside UPF file


Line: 32
File: [Link]

get_cells get_pins

31

if for
while
if for while
if
for while

-init [Link]
if for while

-conditional_test_unknown_action

if for while

true if for while

false if for while

32
unknown_cmd_1 unknown_cmd_2
unknown_cmd_3

-conditional_test_unknown_action

if while
-conditional_test_unknown_action

% tclok [Link] -verbose -conditional_test_unknown_action skip

if true set a 0
while true

% tclok [Link] -verbose -conditional_test_unknown_action as_true

if
false set a 2 while false

% tclok [Link] -verbose -conditional_test_unknown_action as_false

33

for foreach while

-init [Link]
for foreach while

-loop_body_unknown_action

break

34
for foreach while
set_parameter
-loop_body_unknown_action

for foreach set var_a set var_b

-loop_body_unknown_action

% tclok [Link] -verbose -loop_body_unknown_action break

$i
var_a var_b $i=0

% tclok [Link] -verbose -loop_body_unknown_action delay_break

for foreach
$i var_a var_b

% tclok [Link] -verbose -loop_body_unknown_action go_on

35

-autorun

run_tool -f [Link]

% tclok [Link] -log [Link] -verbose -autorun run_tool


-f [Link]
..................
****************** TCL CHECK SUMMARY ******************
Total errors : 0
Total unknown commands : 1 ->'set_parameter'
Possible unknown commands : 1 ->'hostname'
Hierarchical summary : [Link] (errors:0, unknown_cmds:1
->'set_parameter')

OK, autorun is launching ' run_tool ...'


..................

run_tool -f [Link]
[Link]

[Link]

% tclok [Link] -log [Link] -verbose -autorun run_tool


-f [Link]
Error: can't read "value": no such variable
Line: 1
File: [Link]
..................

36
****************** TCL CHECK SUMMARY ******************
Total errors : 1
Total unknown commands : 1 ->'set_parameter'
Possible unknown commands : 1 ->'hostname'
Hierarchical summary : [Link] (errors:1, unknown_cmds:1
->'set_parameter')

FAILED

-autorun

-autorun
-log -verbose -autorun

1.
% tclok [Link] -log [Link] -verbose -autorun run_tool
-f [Link]

-log -verbose -autorun


run_tool -f [Link]

2.
% tclok [Link] -log [Link] -autorun run_tool -f [Link]
-verbose

run_tool -f [Link] -verbose


-verbose

37

-autorun_max_errors

run_tool

% tclok [Link] -log [Link] -verbose -autorun_max_errors 3


-autorun run_tool -f [Link]
Error: can't read "value": no such variable
Line: 1
File: [Link]
..................
****************** TCL CHECK SUMMARY ******************
Total errors : 1
Total unknown commands : 1 ->'set_parameter'
Possible unknown commands : 1 ->'hostname'
Hierarchical summary : [Link] (errors:1, unknown_cmds:1
->'set_parameter')

FAILED, total error count '1' <= autorun limit '3', autorun is
launching 'run_tool ...'
..................

38

DASHTHRU_LICENSE_SERVER
FAILED

FAILED
-autorun
-no_lic_enable_autorun

% tclok [Link] -log [Link] -verbose -no_lic_enable_autorun


-autorun run_tool -f [Link]
..................
Error: dial tcp [Link]:28000: connect: connection refused. (LIC-
FAIL-INIT)
Error: license is not available, please confirm
'DASHTHRU_LICENSE_SERVER' env has been set to the correct
'port@host' which DashLM is running and serving. (LIC-CHECK-ENV)

FAILED, autorun is launching 'run_tool ...' because


'-no_lic_enable_autorun' is set
..................

OK FAILED

39
40
%

-autorun

41
-autorun

if for while

skip
as_true
as_false

for while foreach

break

delay_break
go_on

get_cells
get_pins .upf load_upf

exec

42
43

You might also like