[SOLVED] right logical shift /different width between input and output

Status
Not open for further replies.

alkaios

Newbie level 5
Joined
Nov 9, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,419
i want to implement the following operation in vhdl:

x(52:0) = y(23:0) >> z

(>> is the logical right shift)

value of z is not standard, it's the result of a substraction and it can change.
i already tried operator srl and function shift_right but they don't work because of the different width of x and y.
i can't use '&' operator because z doesn't have standard value.

any suggestions how can i do this?
 

i didn't know the function resize.
i found out how to use it, and got my desired result.
thanx a lot.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…