A
Andres Vazquez
Guest
Hi,
I am trying to convert a Verilog description to a VHDL description for
my project.
There is a Verilog construct of a twodimensional array I do not
understand exactly.
It would be a great help if you could explain it to me.
------------------------------------------------------------------------------------------
Verilog-Code:
parameter COLS=8;
parameter ROWS=256;
parameter ROW_ADDR_BITS=8;
parameter COL_ADDR_BITS=3;
reg[7:0] data_in;
reg[7:0] data[0:COLS*ROWS];
reg[ROW_ADDR_BITS-1 : 0] row_write;
reg[COL_ADDR_BITS-1 :0] last_col[0:ROWS]
--------------------------------------------------------------------------------
What does the following assignment mean? Which of the rows and colomns
of the two dimensional array data
are written with the input data_in? Which function has the '+' ?
--------------------------------------------------------------------------------
data[row_write*COLS + last_col[row_write] ] = data_in;
--------------------------------------------------------------------------------
Thank you very much for your help.
Kind regards
Andrés Lapa
I am trying to convert a Verilog description to a VHDL description for
my project.
There is a Verilog construct of a twodimensional array I do not
understand exactly.
It would be a great help if you could explain it to me.
------------------------------------------------------------------------------------------
Verilog-Code:
parameter COLS=8;
parameter ROWS=256;
parameter ROW_ADDR_BITS=8;
parameter COL_ADDR_BITS=3;
reg[7:0] data_in;
reg[7:0] data[0:COLS*ROWS];
reg[ROW_ADDR_BITS-1 : 0] row_write;
reg[COL_ADDR_BITS-1 :0] last_col[0:ROWS]
--------------------------------------------------------------------------------
What does the following assignment mean? Which of the rows and colomns
of the two dimensional array data
are written with the input data_in? Which function has the '+' ?
--------------------------------------------------------------------------------
data[row_write*COLS + last_col[row_write] ] = data_in;
--------------------------------------------------------------------------------
Thank you very much for your help.
Kind regards
Andrés Lapa