Archive for April, 2009

Multi Dimentional Associative array with modelsim

Thursday, April 30th, 2009

We are trying to compile ovm on the vcs and and I came across some code which was giving issue with VCS but it works in modelsim. So here is what the code looks like :

typedef int pint;
typedef pint pnewint[string];

module test;
pnewint aa [string];
initial begin
aa["ss"]["ss"] = 1;
$display (”I am here in test %d \n”, aa["ss"]["ss"]);
end
endmodule

Output :

=====

VSIM 1> run
run
# I am here in test           1
#

After that I tried a direct deceleration test like :

module test;
int aa [string] [string];
initial begin
aa["ss"]["ss"] = 1;
$display (”I am here in test %d \n”, aa["ss"]["ss"]);
end
endmodule

Output :

=====

VSIM 1> run
run
# I am here in test           1
#

So basically the above statements mean that modelsim allow multi dimentional associative array creation. Now the question is  does LRM allows it.  I guess it does not :( .

Ignoring files in svn stat

Wednesday, April 29th, 2009

Sometimes when you have your object files inside your source directory and you try to do “svn stat”, It gives too verbose information about the gernerated object files with ? sign. You can mark them as ignore in svn using propedit so that next time when you do “svn stat” they wont be compared.

You can do it using :

svn propedit svn:ignore objects/

and in the log file enter ‘*’.  With the above command svn will ignore all files inside objects for comparison in svn stat.

Thanks,

Puneet