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) – x – 0.25 * y(n-2).