--
Andrey Orlenko
ICQ# 157544292
e-mail: ea...@ukr.net
> Can I compile SKILL-code to binary file ? How to make it ?
>
No.
But I've seen some working skill-programms in binary mode (not text view
of file). For exaple, I've got Design Kit with binary skill-code ...
================================================================
Kholdoun TORKI
http://cmp.imag.fr
================================================================
See the SKILL Language User Guide, Chapter 10, "Delivering Products".
Andrew.
On Tue, 02 Mar 2004 17:21:32 +0200, Andrey Orlenko 1038630570
<ea...@quad.ntu-kpi.kiev.ua> wrote:
>George Patrick wrote:
>> Andrey Orlenko 1038630570 wrote:
>>
>>> Can I compile SKILL-code to binary file ? How to make it ?
>>>
>>
>> No.
>>
>
>But I've seen some working skill-programms in binary mode (not text view
>of file). For exaple, I've got Design Kit with binary skill-code ...
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
But there are ways to, lets say to convert your SKILL code.
1. Use the SKILL function 'encrypt' to encrypt your SKILL
text file. Refer to the docs for more details.
Note: If you want to protect your SKILL code use always
the password argument for the 'encrypt' function.
There is flying some code around which otherwise can
decrypt it.
Encrypted SKILL files can be treated like text SKILL
files, use the 'load' function to make the code present.
2. You can build a context file form you SKILL code.
A context file has to be loaded with the 'loadContext'
function without extension and in general it should
have the extension *.cxt.
I have never done that, so for more details refer to
the docs again.
Bernd
What do you want to achieve actually ? performance or obfuscation ?
> Can I compile SKILL-code to binary file ? How to make it ?
Ok, I understood it - Thanks !!!
--
Andrey Orlenko
Ukraine, Kiev
ICQ# 157544292
e-mail: ea...@ukr.net
http://flying.h11.ru/
I posted this howto long ago, but it's germane to this conversation:
jjg
---------------------------------------------------------------------
A quick step-by-step Hello-World SKILL coding/encryption walk-thru
---------------------------------------------------------------------
1. First, you _should_ name both the IL file and all the SKILL
procedures defined inside starting with an upper-case prefix,
e.g., create a file named:
/tmp/MyHelloWorld.il
Which consist of, for example, this simple common test procedure:
procedure(MyTestProc()
printf("Hello World\n");
);end of my test procedure
Note: Cadence strongly recommends Customers and Application
personnel make use of upper-case prefixes while Cadence
applications (shipped on the software CDROM) use only
lower-case prefixes. Private functions should begin with
both an underscore and a prefix. This allows the user to
easily identify, on sight, the support status of a function.
---------------------------------------------------------------------
2. Cut and paste these simple examples below to run your first SKILL:
Start any DFII executable; load & run the desired procedure, e.g.:
csh% skill
> load("/tmp/MyHelloWorld.il")
> MyTestProc()
This should execute the SKILL procedure & print the message.
> exit
Or use any DFII graphical executable, e.g.:
csh% icfb
CIW: load("/tmp/MyHelloWorld.il")
CIW: MyTestProc()
This should execute the SKILL procedure & print the message.
CIW: exit
Or, for non-graphical applications, use 'nograph' options, e.g.:
csh% icfb -nograph
> load("/tmp/MyHelloWorld.il")
> MyTestProc()
This should execute the SKILL procedure & print the message.
> exit
Or, if you do not need contexts to be autoloaded, skip them using:
csh% icfb -ilLoadIL /dev/null -nograph -log /tmp/Log$$
> load("/tmp/MyHelloWorld.il")
> MyTestProc()
This should execute the SKILL procedure & print the message.
> exit
Or, if you wish to load the test file for immediate execution:
csh% icfb -ilLoadIL /tmp/MyHelloWorld.il -nograph -log /tmp/Log$$
> MyTestProc()
This should execute the SKILL procedure & print the message.
> exit
Or, if desired, create a batch test-sequence file to run in toto:
csh% cat > /tmp/MyTest.il <<EOF
load("/tmp/MyHelloWorld.il")
MyTestProc()
EOF
Then, use that batch file in a DFII non-graphical session, e.g.:
csh% icfb -replay /tmp/MyTest.il -nograph -log /tmp/Log$$
This should execute the SKILL procedure & print the message
into the desired log file (the $$ appends the process id).
In a batch session, if you don't want the .cdsinit file loaded, use:
csh% icfb -replay MyTest.il -cdshi_nocdsinit -nograph -log Log$$
This should execute the SKILL procedure & print the message
into the desired log file.
---------------------------------------------------------------------
3. In addition, you can add security via encryption or context files:
A simple example of encrypting your SKILL code, for example, is:
csh% skill
> encrypt("/tmp/MyHelloWorld.il" "/tmp/MyHelloWorld.ile")
> exit
Note: This should create the encrypted IL file:
"MyHelloWorld.ile".
Note: Test by loading and executing the encrypted SKILL file:
csh% icfb -nograph
> load("/tmp/MyHelloWorld.ile")
> MyTestProc()
This should print the desired message.
> exit
A simple example of encrypting to a password is shown below:
csh% icfb -nograph
> encrypt("/tmp/MyHelloWorld.il" "/tmp/MyHelloWorld.ile" "Fun2Win")
> exit
Note: This should create the password-protected encrypted file:
"MyHelloWorld.ile".
Note: Test by loading the encrypted SKILL file with the password:
csh% icfb -nograph
> load("/tmp/MyHelloWorld.ile" "Fun2Win")
> MyTestProc()
This should print the desired message.
> exit
A simple example of incorporating your SKILL code into a context file:
csh% cat > MyBuildContext.il <<EOF
procedure(MyBuildContext(MyContext)
setContext(MyContext)
sstatus(writeProtect t)
loadi(strcat(MyContext ".il"))
saveContext(strcat(MyContext ".cxt"))
callInitProc(MyContext)
)
MyBuildContext("MyHelloWorld")
exit
EOF
Note: This should create a '/tmp/MyBuildContext.il' SKILL file.
Then, create a simple IL context out of that file above:
csh% icfb -ilLoadIL /tmp/MyBuildContext.il -nograph -log /tmp/Log$$
This command should create a 'MyHelloWorld.cxt' context file.
Which you can test after loading the context into your session:
csh% icfb -nograph
> loadContext("MyHelloWorld.cxt")
MyTestProc()
This should execute the SKILL procedure & print the message.
> exit
---------------------------------------------------------------------
Please improve so that others benefit.
John Gianni