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 out
into 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 ...
随机推荐
- hdu_5806_NanoApe Loves Sequence Ⅱ(双指针)
题目链接:hdu_5806_NanoApe Loves Sequence Ⅱ 题意: 给你一段数,问你有多少个区间满足第K大的数不小于m 题解: 直接双指针加一下区间就行 #include<cs ...
- cmstop传递什么控制器和方法---就实例化该控制器
object顶级类class object 第一级抽象类controllerabstract class controller extends object 第二级抽象类controller_abst ...
- Entity Framework技巧系列之十 - Tip 37 - 41
提示37. 怎样进行按条件包含(Conditional Include) 问题 几天前有人在StackOverflow上询问怎样进行按条件包含. 他们打算查询一些实体(比方说Movies),并且希望预 ...
- Hadoop YARN ERROR 1/1 local-dirs are bad *, 1/1 log-dirs are bad *
转 http://blog.csdn.net/u012303571/article/details/46913471 查看 nodemanager 日志发下 如下信息 2015-07-16 1 ...
- JSON, list, 前台显示
前台 $(function(){ $.getJSON("/portal/visitor/getVisitorCount?rn="+Math.random(),function(js ...
- 如何从Apache官网下载apache
apache服务器官网地址:http://httpd.apache.org/ linux版本下载比较容易,以windows版本,apache 2.4为例. 点击download 此处随便选一个提供商. ...
- POJ 3468<线段树,区间add>
题目连接 //位运算 k<<1 相当于 k*2 k<<1|1 相当于 k*2+1 /* 修改区间内的值,并且维护区间和. 详见代码 */ #include<cstdio& ...
- RxSwift 之官方文档
RxSwift 官方文档结构 Introduction: Subjects Transforming Observables Filtering Observables Combining Obser ...
- C++文件编程(文件流操作)
给出了比较常见的文件操作,包括二进制文件操作.代码如下: #include<iostream> #include<cstdio> #include<cstring> ...
- Linux学习 -- 权限管理
1 ACL权限 1.1 简介与开启 1.1.1 ACL权限是什么 access control list 访问控制表 解决传统的(owner,group,others)身份不足的情况 可以设置 特定用 ...