B
bbrady
Hi All,
I've come across some VHDL that I don't understand. The snippet is
below:
req_resp(0 to 1) <= adder_resp(0 to 1) or shift_resp(0 to 1) WHEN
(adder_resp(0 to 1) /= "00"
or shift_resp(0 to 1) /= "00") ELSE
"10" WHEN (inv_op1_tag(0) = '1') ELSE
"00";
The part that I'm confused on is "adder_resp(0 to 1) or shift_resp(0
to 1)" directly after "<=" and before the first "WHEN". What exactly
does this mean? I've looked through the VHDL standard and haven't seen
any bitwise operators. Furthermore, the "or" operator is a logical
operator, so I can't figure out why it would be used on bit vectors.
Is the logical or doing some kind of behind-the-scene evaluation of
adder_resp(0 to 1) before it makes the assignment (e.g., if adder_resp
= 00 then use the RHS of the logical or)?
I typically work on Verilog and haven't worked with VHDL in close to
10 years, so I may be forgetting something obvious, or maybe this is
bogus code (although, it would surprise me if it were). Any help would
be greatly appreciated.
Thanks!
bb
I've come across some VHDL that I don't understand. The snippet is
below:
req_resp(0 to 1) <= adder_resp(0 to 1) or shift_resp(0 to 1) WHEN
(adder_resp(0 to 1) /= "00"
or shift_resp(0 to 1) /= "00") ELSE
"10" WHEN (inv_op1_tag(0) = '1') ELSE
"00";
The part that I'm confused on is "adder_resp(0 to 1) or shift_resp(0
to 1)" directly after "<=" and before the first "WHEN". What exactly
does this mean? I've looked through the VHDL standard and haven't seen
any bitwise operators. Furthermore, the "or" operator is a logical
operator, so I can't figure out why it would be used on bit vectors.
Is the logical or doing some kind of behind-the-scene evaluation of
adder_resp(0 to 1) before it makes the assignment (e.g., if adder_resp
= 00 then use the RHS of the logical or)?
I typically work on Verilog and haven't worked with VHDL in close to
10 years, so I may be forgetting something obvious, or maybe this is
bogus code (although, it would surprise me if it were). Any help would
be greatly appreciated.
Thanks!
bb