cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nju044
Explorer
Explorer
6,255 Views
Registered: ‎11-11-2009

VHDL srl error

Jump to solution

Hello, everyone:

I came across an error when  running XST synthesis. It said "srl can not have such operands in this context."

I refered to VHDL reference book but it didn't help, so I try to turn to you.

The line having the error is as follows:

slv_reg0(byte_index*8 to byte_index*8+7) <= Bus2IP_Data(byte_index*8 to byte_index*8+7) srl 1;

Thanks in advance!

Best Regard.

Ninos K.
0 Kudos
Reply
1 Solution

Accepted Solutions
eilert
Teacher
Teacher
7,431 Views
Registered: ‎08-14-2007

Hi,

SRL & Co. are neither supported by the std_logic packages nor by numeric_std packages. They only work on boolean and bit types. 

 

instead use this:

 slv_reg0(byte_index*8 to byte_index*8+7) <= '0' & Bus2IP_Data(byte_index*8  to byte_index*8+7-1); -- rightmost value is lost, leftmost value replaced by '0', all others shifted to the right.

 

Have a nice synthesis

  Eilert

 

 

View solution in original post

0 Kudos
Reply
2 Replies
eilert
Teacher
Teacher
7,432 Views
Registered: ‎08-14-2007

Hi,

SRL & Co. are neither supported by the std_logic packages nor by numeric_std packages. They only work on boolean and bit types. 

 

instead use this:

 slv_reg0(byte_index*8 to byte_index*8+7) <= '0' & Bus2IP_Data(byte_index*8  to byte_index*8+7-1); -- rightmost value is lost, leftmost value replaced by '0', all others shifted to the right.

 

Have a nice synthesis

  Eilert

 

 

View solution in original post

0 Kudos
Reply
nju044
Explorer
Explorer
6,241 Views
Registered: ‎11-11-2009

Best Regard.

Ninos K.
0 Kudos
Reply