anandanips
Junior Member level 1
the following modules is required 255 ram locations of 8 bit wide.i am writing code like this.
module xy(x,y,ram);
input x,y;
output [7:0] ram[0:255];
reg[7:0] ram[0:255];
to assigning value of ram location i am writing like
ram[0]=data;
ram[1]=data;
ram[2]=data;
ram[3]=data;
ram[4]=data;
.
.
.
.
.
.// where data is 8 bit wide.
that statements are exeuting in different case .
for output only one assignment statement (as above) will be appear.
my proplem is ,i am getting 2 error in the place of array declattion:
output [7:0] ram[0:255];
reg[7:0] ram[0:255];
so , please can anyone clear my mistakes.and say the above assignment is correct or not also