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.

Verilog array assigned to an other array

Status
Not open for further replies.

FboDigit

Member level 1
Joined
Jun 19, 2012
Messages
38
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Location
Canada
Activity points
1,502
Hi all !

I am currently programming in verilog/systemverilog and I want to know if there is a way to assigne an array to an other!!!

I know that you can not access an entire array and you can not access a slice of an array.
But is there a way to copy a part of an array into an other like this

Code:
task....
     integer array1[7:0];
     integer array2[7:0];
     begin

          array1[3:2] = array2[3:2];

     end
endtask

OR like this

Code:
task....
     integer array1[7:0];
     integer array2[7:0];
     reg [7:0] number
     begin
          number = 3
          array1[number-:1] = array2[number-:1];

     end
endtask

Please help me !!!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top