array of vector in verilog.

Status
Not open for further replies.

krishanu007

Member level 2
Joined
Apr 8, 2010
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Bangalore,India
Activity points
1,594
In verilog I wrote it as
reg [7:0] acc [7:0];

now if I write acc[3] it actually refers 8 bit.
But if I write acc[3:2] what it actually refers

1. it refers 2 bit only.
2. It refers 16 bit (as intended by me)

????????
 

In verilog I wrote it as
reg [7:0] acc [7:0];

now if I write acc[3] it actually refers 8 bit.
But if I write acc[3:2] what it actually refers

1. it refers 2 bit only.
2. It refers 16 bit (as intended by me)

????????


integer a[1:10]
a[3:5] is illegal.

You can not access an entire array.
You can not access a slice of an array.



h**p://www.cs.umbc.edu/portal/help/VHDL/verilog/types.html#arrays
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…