Hi,
is it legal code from logic perspective ?
for example,
logic a=1;
a = a << 1;
a = a << 1;
// a=4 ?
Wanted to get a=4
Hi,
is it legal code from logic perspective ?
for example,
logic a=1;
a = a << 1;
a = a << 1;
// a=4 ?
Wanted to get a=4
In reply to alexd555:
You need a packed array of at least 3 digits to hold the decimal value 4.
In reply to dave_59:
Hi,
How can I do it dynamically ? assign array of logic ?
My goal is to sample coverage of series of bits.
I want to sample the changes of bit from 0 to 1 or 1 to 0
For example:
covergroup do_update_check_cg;
do_check_cp : coverpoint do_check {
bins do_0_0_1 = {3'b001};
bins do_1_0_0 = {3'b100};
bins do_1_0_0 = {3'b101};
}
endgroup : do_check_cg
In reply to alexd555:
I do not follow your line of questioning. I give up.