简体   繁体   中英

Systemverilog bit-shift difference between {<<{signal}} and {signal<<1}?

I have the following piece of code which the Vivado simulator doesn't seem to support (results in ERROR: [XSIM 43-3209] - Unsupported Construct):

assign b = {<<{a}};

Wondering if I can just change this code to the following:

assign b = a<<1;

Could someone please confirm that the 2 lines above are identical? Note that both a and b are 8 bit wide. Thanks!

No they are not the same. {<<{a}} is a bit reversal. Assuming a was declared with the range [7:0] , you would need to write

assign b = {a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM