记录modelsim仿真的一个问题:no feasible entries for subprogram
1. 问题的出现
当我尝试把一个std_logic_vector通过conv_integer函数转换为integer类型
同时库的调用如下
可以看到已经调用了arith库(conv_integer函数定义在此库中)
2. 问题的提示
通过观察可以发现,没有std_logic_vector到integer的转换,synopsys的arith库中只定义了以下几种显式的类型转换
- integer => integer
- unsigned => integer
- signed => integer
- std_ulogic => small_int
3. 问题的解决
因为没有调用std_logic_unsigned库或者std_logic_singned库,conv_integer函数无法判断输入数据为singed还是unsigned