Viewing Memory in Modelsim. Objects not appearing

Status
Not open for further replies.

popx2004

Newbie level 2
Joined
Feb 7, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,296
Hi Guys

I am new to Modelsim and I have hit a problem, I want to view the contents of a register but its not appearing on my objects list or memories
what seems strange to me is the fact that another register declared in my code does. Here is my code. ram appears but none of the others do. Any ideas.

Thanks a bundle

Sam

module Digitalfilter3(clk,Y,X);

input clk;
output[7:0] Y, X;
reg[7:0] X,X1,X2,Y,Y1,Y2;
reg signed [32:0] ram[0:'d4095], rom[0:'d4095];
//reg signed [32:0]
reg [13:0] i;

initial
begin
$readmemh("H:/Digitalfilter3/data1.txt", ram);
i=0;
Y = 0;
Y1 = 0;
Y2 = 0;
X = 0;
X1 = 0;
X2 = 0;
//y[0]= 0-ram[0];
//y[1]= 0-ram[1];
//i=2;
//out=0;

// $dumpvars(0, Digitalfiltering2);
end

//always@(posedge clk)
//begin
//i=i+1;
//end


always@(posedge clk)
begin
if (i<4095)
begin
X2 = X1;
X1 = X;
X = ram;

Y2=Y1;
Y1=Y;

Y = X2 - X - (Y2/4);
rom=Y;
i=i+1;
end
end

endmodule

// y = x(n-2) &#150; x &#150; 0.25 * y(n-2).
 

add the switch -voptargs=+acc=npr to the vsim command that you use to launch the simulation.

Optimization by default turns off visibility of everything but the ports of a design and I guess your ram.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…