赛灵思
直播中

张梅

8年用户 150经验值
私信 关注
[问答]

VHDL srl错误

tify;text-indent: 40px;">大家好:
我在运行XST综合时遇到了一个错误。
它说“在这种背景下,srl不能拥有这样的操作数。”
我参考VHDL参考书,但它没有帮助,所以我试着转向你。
有错误的行如下:

slv_reg0(byte_index * 8到byte_index * 8 + 7)以下为原文

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.

回帖(3)

陈舒斌

2019-1-15 07:44:53
嗨,
SRL&amp;
std_logic包和numeric_std包都不支持Co.
它们只适用于布尔和位类型。
改为使用这个:
slv_reg0(byte_index * 8到byte_index * 8 + 7)'0'&amp;
Bus2IP_Data(byte_index * 8到byte_index * 8 + 7-1);
- 最右边的值丢失,最左边的值替换为'0',所有其他值都移到右边。
有一个很好的综合 
Eilert
在原帖中查看解决方案

以上来自于谷歌翻译


以下为原文

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
举报

陈舒斌

2019-1-15 07:50:20
嗨,
SRL&amp;
std_logic包和numeric_std包都不支持Co.
它们只适用于布尔和位类型。
改为使用这个:
slv_reg0(byte_index * 8到byte_index * 8 + 7)'0'&amp;
Bus2IP_Data(byte_index * 8到byte_index * 8 + 7-1);
- 最右边的值丢失,最左边的值替换为'0',所有其他值都移到右边。
有一个很好的综合 
Eilert

以上来自于谷歌翻译


以下为原文

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
 
 
举报

阎慧

2019-1-15 08:02:17
嗨,eilert:
谢谢你的帮助。
问题解决了。
最好的Regard.Ninos K.

以上来自于谷歌翻译


以下为原文

Hi, eilert:
Thanks for your help. Problem solved.
Best Regard.

Ninos K.
举报

更多回帖

×
20
完善资料,
赚取积分