P
parag_paul@hotmail.com
Guest
module top;
byte a[0:4];
initial begin
// Illustration of array copy bug: we initialize an array and
// then perform an overlapping slice copy.
a = '{ 0,1,2,3,4 };
$display(a[0],a[1],a[2],a[3],a[4]);
a[1:4] = a[0:3];
$display(a[0],a[1],a[2],a[3],a[4]);
a = '{ 0,1,2,3,4 };
$display(a[0],a[1],a[2],a[3],a[4]);
a[0:3] = a[1:4];
$display(a[0],a[1],a[2],a[3],a[4]);
Any ideas, what should be the consistent behavior
byte a[0:4];
initial begin
// Illustration of array copy bug: we initialize an array and
// then perform an overlapping slice copy.
a = '{ 0,1,2,3,4 };
$display(a[0],a[1],a[2],a[3],a[4]);
a[1:4] = a[0:3];
$display(a[0],a[1],a[2],a[3],a[4]);
a = '{ 0,1,2,3,4 };
$display(a[0],a[1],a[2],a[3],a[4]);
a[0:3] = a[1:4];
$display(a[0],a[1],a[2],a[3],a[4]);
Any ideas, what should be the consistent behavior