Lets see.
Pkt can be GOOD/BAD
if GOOD . type T1 T2..
if BAD . idle.
if GOOD . if cmd == T1 . addr { 0 ff}
if cmd == T2 addr ! {0 ff}
if BAD . cmd = idle ;addr { 0 4 }
------------------------------------------------------------------------------
class C
int cnt=0;
function new();
cnt++;
endfunction
C c[100];
foreach(c[i])
c[i] = new();
$display (c[i].cnt);
Value of cnt is 1.1.1.1.1
what should be done it it has to be initialized to 1,2,3,.....
if declared as static cnt.
then all the instances, point to the same location and every time it is new'd.the same location gets incremented.
Pass i to the new();
--------------------------------------------------------------------------------------------------------------
array a1,a2;
pass if all elements in a1 are present in a2 in the same order.
----------------------------------------------------------------------------------------------------------------
implement push_front/push_back/pop_front/pop_back using a simple array of 1000 elements
---------------------------------------------------------------------------------------------------------------
Pkt can be GOOD/BAD
if GOOD . type T1 T2..
if BAD . idle.
if GOOD . if cmd == T1 . addr { 0 ff}
if cmd == T2 addr ! {0 ff}
if BAD . cmd = idle ;addr { 0 4 }
------------------------------------------------------------------------------
class C
int cnt=0;
function new();
cnt++;
endfunction
C c[100];
foreach(c[i])
c[i] = new();
$display (c[i].cnt);
Value of cnt is 1.1.1.1.1
what should be done it it has to be initialized to 1,2,3,.....
if declared as static cnt.
then all the instances, point to the same location and every time it is new'd.the same location gets incremented.
Pass i to the new();
--------------------------------------------------------------------------------------------------------------
array a1,a2;
pass if all elements in a1 are present in a2 in the same order.
----------------------------------------------------------------------------------------------------------------
implement push_front/push_back/pop_front/pop_back using a simple array of 1000 elements
---------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment