cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer
Observer
7,899 Views
Registered: ‎01-24-2015

how to determine configuration row/column

sorry this seems like a obvious question but how do you declare row and column in verilog.

For example 10 rows 2 columns.

Tags (1)
0 Kudos
3 Replies
Highlighted
Observer
Observer
7,897 Views
Registered: ‎01-24-2015

Re: how to determine configuration row/column

i was think it something like this?

 

input row_column [5:0][0] //6 rows 1 column

 

0 Kudos
Highlighted
Community Manager
Community Manager
7,870 Views
Registered: ‎07-23-2012

Re: how to determine configuration row/column

Yes this looks correct for 6 rows and 1 column.
-----------------------------------------------------------------------------------------------
Please mark the post as "Accept as solution" if the information provided answers your query/resolves your issue.

Give Kudos to a post which you think is helpful.
0 Kudos
Highlighted
Guide
Guide
7,625 Views
Registered: ‎01-23-2009

Re: how to determine configuration row/column

Careful...

 

reg  row_column [9:0][1:0]

 

gives you a  2 dimensional array of 1 bit quantitie; i.e. twenty x 1 bit quantities.

 

More likely, what you want is

 

reg [1:0] row_column[0:9];

 

This gives you 10 words each of 2 bits; i.e. ten x 2 bit quantities.

 

The big difference between these is if you use

wire [1:0] b;

assign b = row_column[3];

this assigns the 2 bit quantity in "row" 3 to the 2 bit value b, but only if you use the latter definition - if you use the first definition, then this is a syntax error - you can only access individual bits of the array

 

assign b[0] = row_column[3][0];

assign b[1] = row_column[3][1];

 

Avrum

0 Kudos