easytarget
Member level 1
Hi,
I'm learning Verilog on my own right now and I'm stuck, please help. I'm confused how arrays are referenced. Here's the code that confuses me:
My question is how can you assign values to things with different dimensions? can someone tell me which elements are assigned wich values in the above code? This is from a book called A Starter's Guide to Verilog 2001, page 136. Thanks for your help.
I'm learning Verilog on my own right now and I'm stuck, please help. I'm confused how arrays are referenced. Here's the code that confuses me:
Code:
//first, the declarations, I have no problem with them:
input [width-1:0] data_in;
input clk, reset;
output [width-1:0] data_out;
reg [width-1:0] pipe [0:length-1];
wire [width-1:0] d_in [0:length-1];
//now here's what's confusing me:
assign d_in[0]=data_in;
assign data_out=pipe[width-1];
My question is how can you assign values to things with different dimensions? can someone tell me which elements are assigned wich values in the above code? This is from a book called A Starter's Guide to Verilog 2001, page 136. Thanks for your help.