Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top