Quartus14.1中Qsys创建custom component时编译出错原因
利用Quartus14.1中Qsys工具新建自定义组件时会产生“part-select direction is opposite from prefix index direction”错误,这是由于Qsys生成自定义组件的地址空间时没有考虑hw.tcl文件中限定的地址空间范围,而是按照可用的最大地址空间进行分配导致的。
例如我的自定义组件使用PAD0进行通道选择,而Qsys为PAD0分配了可用的最大地址空间,和其他组件地址空间发生了重叠。
localparam ADDR_RANGE = 'h40000;//最大地址空间
localparam PAD0 = log2ceil('h40000 - 64'h0); //地址空间错误
2 localparam PAD1 = log2ceil('h10008 - 64'h10000);
localparam PAD2 = log2ceil('h10050 - 64'h10040);
localparam PAD3 = log2ceil('h10090 - 64'h10080);
localparam PAD4 = log2ceil('h100d0 - 64'h100c0);
localparam PAD5 = log2ceil('h20008 - 64'h20000);
localparam ADDR_RANGE = 'h40000;
localparam RANGE_ADDR_WIDTH = log2ceil(ADDR_RANGE);
localparam OPTIMIZED_ADDR_H = (RANGE_ADDR_WIDTH > PKT_ADDR_W) ||
(RANGE_ADDR_WIDTH == ) ?
PKT_ADDR_H :
PKT_ADDR_L + RANGE_ADDR_WIDTH - ; localparam RG = RANGE_ADDR_WIDTH-;
if ( {address[RG:PAD0],{PAD0{'b0}}} == 18'h0 ) begin //编译错误在此产生
src_channel = 'b100000;
src_data[PKT_DEST_ID_H:PKT_DEST_ID_L] = ;
end
在计算通道选择时RG的值小于PAD0,这样会导致编译器输出“part-select direction is opposite from prefix index directio”错误(见参考文献2)。
解决方法:
修改
//修正对应的PAD*地址
localparam PAD0 = log2ceil('h10000 - 64'h0);
参考文献:
1.http://www.alterawiki.com/wiki/New_Qsys_Issues中Merlin Address Routers for Custom peripherals,内容如下:
Merlin Address Routers for Custom peripherals
Issue: When generating the system, Merlin address routers are generated ignoring the ExplicitAddressSpan Avalon property. This causes channels to be greater than the complete address space in some cases; for instance, for a system that uses 29 bits of address space (512 MBs), with explicitly using only 16 MBs, Merlin address routers are generated with full 29 bits of address space per channel. Since the complete address space defaults to the size of the address space of the biggest addressable peripheral, this later causes errors in compilation (Verilog errors containing "...part-select direction is opposite from prefix index direction...") and also address space is overlapped with other peripherals with smaller address spaces.
Workaround: Manually edit nios_addr_router.sv files (there will be more of them; they are located under \{nios_name}\synthesis\submodules\ directory in your project directory) and manually set the values of the PADx variables to the desired address space size (ExplicitAddressSpanValue = 2^PADxValue). Do not change the value of the complete address space (RG variable), as this might introduce more problems.
2.http://quartushelp.altera.com/14.0/mergedProjects/msgs/msgs/evrfx2_veri_opposite_direction.htm,内容如下:
Verilog HDL error at <location>: part-select direction is opposite from prefix index direction
(ID: 13437)
CAUSE: In a Verilog Design File (.v) at the specified location, you used a part-select to select a part of a vector; however, in the part-select, the direction from MSB to LSB is reversed from the direction in the declaration of the vector. For example, see the following excerpt of a sample design, which uses a part-select on vector: module veri_test(in, out);
input [3:0] in;
output [1:0] out;
assign out = in[0:1];
endmoduleACTION: Use the same direction in the part-select of a vector as is used in the declaration of the vector. For example, in the previous sample design, you can change the assignment to outinto the following format:assign out = in[1:0];See also:
Section 4 of the IEEE Std. 1364-2001 IEEE Standard Verilog Hardware Description Language manual
Quartus14.1中Qsys创建custom component时编译出错原因的更多相关文章
- Visual Studio 2017创建.net standard类库编译出错原因
正式版上个月已经Release了,从那时到现在经常会收到更新提示,估计问题还不少吧!其中最吸引我的当然是.net standard与.net core. 刚好最近接触.net standard项目,新 ...
- MFC关于多线程中传递窗口类指针时ASSERT_VALID出错的另类解决 转
MFC关于多线程中传递窗口类指针时ASSERT_VALID出错的另类解决 在多线程设计中,许多人为了省事,会将对话框类或其它类的指针传给工作线程,而在工作线程中调用该类的成员函数或成员变量等等. ...
- Quartus14.1中Qsys无法更新custom component的问题
如果对Qsys中custom component进行了改动,如果直接generate HDL无法使改动应用到实际的编译过程,需要对Qsys进行刷新操作,如下:
- C#操作word或excel及水晶报表,检索 COM 类工厂中 CLSID 为 {} 的组件时失败,原因是出现以下错误: 80070005
解决办法一:<转自http://www.cnblogs.com/Sue_/articles/2123372.html> 具体解决方法如下: 1:在服务器上安装office的Excel软件. ...
- 检索 COM 类工厂中 CLSID 为 {} 的组件时失败,原因是出现以下错误: 80070005
检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005.跟踪了一下,结果是将记录导出 ...
- 8000401a 错误 ,检索 COM 类工厂中 CLSID 为 的组件时失败,原因是出现以下错误: 8000401a。
"/"应用程序中的服务器错误. -------------------------------------------------------------------------- ...
- asp.net mvc视图中使用entitySet类型数据时提示出错
asp.net mvc5视图中使用entitySet类型数据时提示以下错误 检查了一下引用,发现已经引用了System.Data.Linq了,可是还是一直提示出错, 后来发现还需要在Views文件夹下 ...
- pycharm中每次创建py文件时就自动生成代码头,以及出现SyntaxError:Non-ASCII 。。。问题
我们在pycharm中执行py文件的时候,可能会出现以下错误 这是因为你没有制定编码格式,这时候你需要在文件最开始制定编码格式,代码如下 #!/user/bin/env python #-*- cod ...
- Android开发,Eclipse创建aidl接口时,出错
Android开发中,当我们需要调用远程Service时,我们一般通过远程接口(RMI)来实现的,而Android的RMI需要AIDL(Android Interface Definition Lan ...
随机推荐
- 缓存2 动态缓存 memcached
01准备下载好memcached.exe文件-->放置c:\memcached目录中02准备下载好php_memcache.dll文件-->放置php\ext扩展目录中03配置 php.i ...
- Infix expressions 中缀表达式
中缀表达式的计算 利用两个栈来实现,操作数栈,操作符栈 只支持个位数运算 最后必须输入一个'#' #include<iostream> using namespace std; templ ...
- LeetCode OJ 86. Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes gr ...
- (转) 三个nginx配置问题的解决方案
今天开启了nginx的error_log,发现了三个配置问题: 问题一: 2011/07/18 17:04:37 [warn] 2422#0: *171505004 an upstream respo ...
- php---数组序列化
有两种选择:serialize,json_encode. 需求:对数组进行序列化后保存在文件中,以便爬虫来抓取文件.并且序列化后的字符串只有一行,不希望在该字符串中出现换行,即使数组中某个元素中有换行 ...
- vs找不到svn源代码管理插件之我见
使用svn要安装两个文件,一个客户端:TortoiseSVN-1.8.msi,一个插件:AnkhSvn-2.5.msi:两个都安装好之后,在vs的tool(工具)选项卡中,选择自定义,然后选择sour ...
- php 常用的JS
function doit(){ var sel_val=$("#type").val(); if (sel_val=='') { $("#bigClassId1&q ...
- push以及pop,shift,unshift
压入数组:往数组后面加:push arr.push()返回值为添加后数组的长度 往数组前面加:unshift arr.unshift()返回值为添加后数组的长度 拿出数组:拿掉 ...
- Linux + Apache + PHP 环境搭建
搭建环境: Ubuntu 15.04 Apache 2.4.16 PHP 5.6.15 1 安装Apache 先安装依赖程序(都安装在 /usr/local/ 目录下) apr-1.5.2.tar.g ...
- hdu_5711_Ingress(TSP+贪心)
题目连接:hdu5711 这题是 HDU 女生赛最后一题,TSP+贪心,确实不好想,看了wkc巨巨的题解,然后再做的 题解传送门:Ingress #include<cstdio> #inc ...