Sei sulla pagina 1di 6

QUESTION 1.

Could you please tell us on how to generate the encrypted/protected block from the
RTL ?

$ cat top.v
module top;
initial $display("FROM TOP MODULE");
inst1 inst1();
inst2 inst2();
inst3 inst3();
endmodule
$ cat inst1.v
module inst1();
initial $display("From Module INST1");
endmodule
$ cat inst2.v
module inst2();
initial $display("From Module INST2");
endmodule
$ cat inst3.v
module inst3();
initial $display("From Module INST3");
endmodule

To create a single protected file run the command as :

Tuesday, October 25, 2016


L&T Infotech Proprietary
Page 1 of 6

Linux> ncprotect top.v inst1.v inst2.v inst3.v -outname protect.vp


Linux> -autoprotect

It should create a protected file protect.vp.

QUESTION 2. I need to know sequence of steps for ncdc compilation of RTL top modules

Create a snapshot as :

Linux> irun top.v inst1.v inst2.v inst3.v -c

it should generate a snapshot named as "worklib.top:v". You can verify the same with the
command as:

Linux> ncls -snapshot


ncls: 13.10-s013: (c) Copyright 1995-2013 Cadence Design Systems, Inc.
snapshot worklib.top:v (SSS)

To decompile the snapshot, you can run the command as :

ncdc <snapshot_name> -output <decompile_file_name>

Linux> ncdc worklib.top:v -output ncdc.v

You should get the output file ncdc.v with the content as :

Tuesday, October 25, 2016


L&T Infotech Proprietary
Page 2 of 6

$ cat ncdc.v
//
// Generated by TOOL: ncdc

13.10-s013

// the decompiler of NC Verilog


// Thu Jan 2 20:11:57 2014
//
// ./inst1.v : 1
module inst1();
initial
$display("From Module INST1");
endmodule

// ./inst2.v : 1
module inst2();
initial
$display("From Module INST2");
endmodule

// ./inst3.v : 1
module inst3();
initial
$display("From Module INST3");
endmodule

Tuesday, October 25, 2016


L&T Infotech Proprietary
Page 3 of 6

// ./top.v : 1
module top;
initial
$display("FROM TOP MODULE");
inst1 inst1();
inst2 inst2();
inst3 inst3();
endmodule

Further you can use ncdc options "-mangle" and "-map <mapfile>" as :

-MANGLE

-- Enables name mangling

-MAP <arg>

-- Generate name mangling map file

For example if you run the ncdc command as :

Linux> ncdc worklib.top:v -output ncdc_mangle.v -mangle -map mangle.txt

You will get the output files ncdc_mangke.v and mangle.txt with content as :

$ cat ncdc_mangle.v
//
// Generated by TOOL: ncdc

13.10-s013

// the decompiler of NC Verilog


// Thu Jan 2 20:16:28 2014

Tuesday, October 25, 2016


L&T Infotech Proprietary
Page 4 of 6

//
module v_1();
initial
$display("From Module INST1");
endmodule

module v_2();
initial
$display("From Module INST2");
endmodule

module v_3();
initial
$display("From Module INST3");
endmodule

module v_4;
initial
$display("FROM TOP MODULE");
v_1 v_1();
v_2 v_2();
v_3 v_3();
endmodule

$ cat mangle.txt

Tuesday, October 25, 2016


L&T Infotech Proprietary
Page 5 of 6

v_1

inst1

v_2

inst2

v_3

inst3

v_4

top

QUESTION 3. I need to know sequence of steps for ncdc decompilation of top.vp (protected file)

We do not allow to decompile (ncdc) the code from the snapshot made from encrypted code.
Tool will give the warning as:

ncdc: *W,PRTOBJ: Protected code encountered and ignored, please check the decompiled output.

Tuesday, October 25, 2016


L&T Infotech Proprietary
Page 6 of 6

Potrebbero piacerti anche