Reply by Kim Enkovaara September 21, 20052005-09-21
Garrick wrote:

> Within our Modelsim XE Starter Edition III program, any attempt to > compile or refresh a library generated by SE 6.0d gave an error message > that "this library is incompatible with this version of vlog." Even if > I created the resource library within SE 6.0d without any compiler > directives at all. Clearly, Modelsim XE is only designed to work with > open libraries.
Did you try to manually set the optimisation level (-O0 or -O1 for example). SE defaults to a higer level than the cheaper versions. But I guess it's easiest to just ask from Mentor what they recommend. --Kim
Reply by Garrick September 20, 20052005-09-20
Sorry, the previous post was prematurely sent, I'll continue:

There is an Answer Record that says to use -nodebug compiled libraries, 
you must upgrade to Modesim PE or SE.
http://www.xilinx.com/xlnx/xil_ans_display.jsp?iCountryID=1&iLanguageID=1&getPagePath=16166&BV_SessionID=@@@@1177595150.1127247013@@@@&BV_EngineID=ccchaddfkfflfmfcefeceihdffhdfjf.0

 > I would be suprised if you couldn't use -nodebug library in XE version.
 > That is the old way of protecting IP with Modelsim. The problem was that
 > it protected the whole modules and tied them to some simulator version.
 > -nodebug just removes all visibility from the design module when 
compiled.
 > But I guess you should be asking from Mentor what they suppport in XE.
 > There are limitations how -nodebug modules can be used in the hierarchy.
 > If I remeber correctly they must be leafs in the design hierarchy,
 > otherwise
 > Modelsim can complain quite loudly.

2. I had an old evaluation version of Modelsim SE 6.0d that I installed 
to test out support between the SE and the XE version.  Resource 
libraries created by the SE compiler were not usable by the XE version - 
regardless of what options I tried!  Even a -refresh from within XE 
wouldn't work (only errors).

Within our Modelsim XE Starter Edition III program, any attempt to 
compile or refresh a library generated by SE 6.0d gave an error message 
that "this library is incompatible with this version of vlog."  Even if 
I created the resource library within SE 6.0d without any compiler 
directives at all.  Clearly, Modelsim XE is only designed to work with 
open libraries.

All libraries generated within Modelsim XE 6.0a work perfectly with 
Modelsim SE 6.0d, even without a refresh on them.  Nothing works in the 
opposite direction.

This is a problem for us that I don't know how we'll resolve.  Too many 
of our customers will be using the Starter Edition for us to offer them 
nothing.

Another small note - the XE compiler generates library directories with 
_primary.dat, _primary.vhd, and verilog.asm files.  It doesn't generate 
a file.vp file.  Aren't these three files effectively encrypted enough 
to protect our code?  We're not concerned with users seeing the signals 
coming out of the ports.

Thanks for your patience.  I guess I need to contact Mentor and find out 
precisely what they recommend for generating libraries used by XE 
Starter Edition users.

Garrick
Reply by Garrick September 20, 20052005-09-20
> OK, I'm using the SE version and it's manuals :)
I've been struggling to figure out the compatibilities between the SE and XE worlds. I've discovered a lot, and have several questions ready to drop on Xilinx and Mentor Graphics. Below is a rant of the things I've discovered so far: 1.) We are using ModelSim Xilinx Edition III Starter edition (6.0a). It's free and most of our current customers are using it to simulate designs for our hardware. Up to 10,000 lines of HDL code, it's suppossed to simulate at 30% the performance of ModelSim PE. Here are the links at Xilinx's webpage the show differences between the XE version of Modelsim and the PE version: http://www.xilinx.com/xlnx/xil_tt_faq.jsp?iLanguageID=1&sProduct=MXE+III http://www.xilinx.com/xlnx/xil_ans_display.jsp?iLanguageID=1&iCountryID=1&getPagePath=17834 In no place at either company's site do they discuss the -nodebug or +protect utilization in any formal way. There is an that says to use -nodebug compiled libraries, you must upgrade to Modesim PE or SE.
> >> project size, but I am unable to compile a resource library with a >> -nodebug flag, and would be unable to use a -nodebug compiled library >> if one was supplied to me by a 3rd party. > > > I would be suprised if you couldn't use -nodebug library in XE version. > That is the old way of protecting IP with Modelsim. The problem was that > it protected the whole modules and tied them to some simulator version. > -nodebug just removes all visibility from the design module when compiled. > But I guess you should be asking from Mentor what they suppport in XE. > There are limitations how -nodebug modules can be used in the hierarchy. > If I remeber correctly they must be leafs in the design hierarchy, > otherwise > Modelsim can complain quite loudly. > >> It appears as if the `protect compiler directive is supported (at >> least initially) in Modelsim XE. I've placed `protect/`endprotect in >> my verilog modules and compiled them using the +protect flag. They >> compile fine with no warnings. >> >> However, it doesn't appear as if anything is being protected. I've >> tried putting the `protect/`endprotect both within the module and around > > > I just tried and in SE it works just fine. I used the small example > below and > then commands > > vlib work > vlog +protect foo.v > more work/foo.vp (contains file that has the module definition but > everything > else is encrypted). > > foo.v: > > module D_Flop (q, d, clock, reset); > > output q; > input d; > input clock; > input reset; > reg q; > > `protect > > always @(posedge clock or posedge reset) > if (reset) q <= #1 0; > else q <= #1 d; > > > endmodule // D_Flop > `endprotect > > --Kim
Reply by Kim Enkovaara September 20, 20052005-09-20
Garrick wrote:

> Kim, thanks for the information. I have a few follow up questions, but > I realize now that I should have specified that I am using Modelsim XE, > the free simulator for Xilinx. I thought the only limitation was
OK, I'm using the SE version and it's manuals :)
> project size, but I am unable to compile a resource library with a > -nodebug flag, and would be unable to use a -nodebug compiled library if > one was supplied to me by a 3rd party.
I would be suprised if you couldn't use -nodebug library in XE version. That is the old way of protecting IP with Modelsim. The problem was that it protected the whole modules and tied them to some simulator version. -nodebug just removes all visibility from the design module when compiled. But I guess you should be asking from Mentor what they suppport in XE. There are limitations how -nodebug modules can be used in the hierarchy. If I remeber correctly they must be leafs in the design hierarchy, otherwise Modelsim can complain quite loudly.
> It appears as if the `protect compiler directive is supported (at least > initially) in Modelsim XE. I've placed `protect/`endprotect in my > verilog modules and compiled them using the +protect flag. They compile > fine with no warnings. > > However, it doesn't appear as if anything is being protected. I've > tried putting the `protect/`endprotect both within the module and around
I just tried and in SE it works just fine. I used the small example below and then commands vlib work vlog +protect foo.v more work/foo.vp (contains file that has the module definition but everything else is encrypted). foo.v: module D_Flop (q, d, clock, reset); output q; input d; input clock; input reset; reg q; `protect always @(posedge clock or posedge reset) if (reset) q <= #1 0; else q <= #1 d; endmodule // D_Flop `endprotect --Kim
Reply by Garrick September 19, 20052005-09-19
Kim, thanks for the information.  I have a few follow up questions, but 
I realize now that I should have specified that I am using Modelsim XE, 
the free simulator for Xilinx.  I thought the only limitation was 
project size, but I am unable to compile a resource library with a 
-nodebug flag, and would be unable to use a -nodebug compiled library if 
one was supplied to me by a 3rd party.

Since many of our customers are using Modelsim XE, I won't be able to 
use -nodebug even if we had a purchased license.

Kim Enkovaara wrote:
> As a user of many protected codes, please use the new "vlog +protect" > functionality. It is supported from Modelsim 5.7 onwards. It's much > easier for the customers (for example name clases are easier to handle). > And be prepared to offer many different versions of the library if > you use precompiled libraries, because -refresh command works only from > older to newer versions. Everyone is not using the newest and greatest > versions of the simulator. For example I don't like the new 6.x GUI and > in many designs 5.8 is faster and consumes less memory.
It appears as if the `protect compiler directive is supported (at least initially) in Modelsim XE. I've placed `protect/`endprotect in my verilog modules and compiled them using the +protect flag. They compile fine with no warnings. However, it doesn't appear as if anything is being protected. I've tried putting the `protect/`endprotect both within the module and around the modules, and have even not used the +protect flag during compilation. The compiled libraries, when used by another project, show all of the internal signals equally. Perhaps Modelsim XE doesn't support `protect or nodebug, but doesn't flag a warning with protect and just doesn't do anything about it. It would be nice to have some protection. Thanks for any help/suggestions, Garrick
Reply by Kim Enkovaara September 19, 20052005-09-19
Garrick wrote:
> I have generated libraries in ModelSim 6.1 that my company is going to > be distributing shortly. > > We need to protect our source code, and I have a few concerns about the > distribution. > > Currently, we plan on distributing the library in an installed > directory, and the end users link this directory either at the command > prompt or add it to the modelsim.ini file. Everything works great.
As a user of many protected codes, please use the new "vlog +protect" functionality. It is supported from Modelsim 5.7 onwards. It's much easier for the customers (for example name clases are easier to handle). And be prepared to offer many different versions of the library if you use precompiled libraries, because -refresh command works only from older to newer versions. Everyone is not using the newest and greatest versions of the simulator. For example I don't like the new 6.x GUI and in many designs 5.8 is faster and consumes less memory.
> So, basically, what sort of project settings or flags should I use to > prepare my libraries? I just want as clean and secure of a distribution > as possible and I can't find anything in Modelsim's documentation or on > the web.
-nodebug and +protect are documented quite well in the manuals. The compilation paths and flags in the _info files are just noise. Actually the flags are quite nice to know even for protected code, it helps to pinpoint possible simulator bugs. --Kim
Reply by Garrick September 19, 20052005-09-19
Hi,

I have generated libraries in ModelSim 6.1 that my company is going to 
be distributing shortly.

We need to protect our source code, and I have a few concerns about the 
distribution.

Currently, we plan on distributing the library in an installed 
directory, and the end users link this directory either at the command 
prompt or add it to the modelsim.ini file.  Everything works great.

My concern comes from data stored in the _info file for the library, 
namely project file names and locations to the original source code.  Of 
course, the end users won't have this code, but it appears as dead links 
to our source code under the "Files" tab in Modelsim.

So, basically, what sort of project settings or flags should I use to 
prepare my libraries?  I just want as clean and secure of a distribution 
as possible and I can't find anything in Modelsim's documentation or on 
the web.

Thanks for any advice or pointers,
Garrick