一直以来,都觉得搭建一个SOPC系统很难。不是因为软件的使用存在问题——我可以阅读文档、咨询论坛上的高手、自己动手试试;而是因为搭建一个功能完备、结构自洽的SOPC系统太不易了——随便打开一个Altera提供的设计示例就会发现那么多的设备、那么多的DMA控制器、那么复杂的启动过程。 riple
对我来说,看懂一个设计示例不难,照葫芦画瓢设计一个也不是难事。但是真的要自己定义需求,搭建一个SOPC系统——这个系统需要多个主设备协同工作,主设备之间需要竞争从设备的不可重入的使用权,需要自己定义从设备的操作接口,需要采用Scatter-Gather DMA,甚至不要采用Nios II......——我想了很久,一直还没有一个整体而清晰的轮廓。 riple
回想最近一个项目,虽然我的工作FPGA设计是唱戏的主角,但搭台的是系统设计工作。由于外部器件和IP的限制,我们的系统还不是一个SOPC系统,而是一个“SOPCB”系统。系统设计和PCB布局工作是由我们硬件组的“老大”完成的,PCB上的总线用245搭建,还用CPLD完成Nor Flash换页和FPGA配置工作。“老大”就是老大,系统搭建得漂亮简洁。那么多器件,两层板搞定,尺寸还中规中矩。“老大”的功底让人不得不佩服。 riple
工作快三年了,技术上一直在进步,不只是广度上的,我更看重的是深度上的。让我在FPGA内部设计一个工作稳定的模块基本上不是难事,可是让我像“老大”那样设计一个“自给自足”的PCB系统,还真是无从下手。模块设计和系统设计的差距是很大的,三年的技术积累还不足以让我跨入系统设计的门槛。 riple
由于有了上面的思考,我决定要补一补系统设计的知识,在网上搜了搜,在书上查了查,大家都推荐Computer Architecture:A Quantitative Approach。到图书馆借来一本07年出的第四版,在前言中读到这样一段话: riple
The architect's role is not that of a scientist or inventor who will deeply study a particular phenomenon and create new basic materials or techniques. Nor is the architect the craftsman who masters the handling of tools to craft the finest details. The architect's role is to combine a thorough understanding of the state of the art of what is possible, a thorough understanding of the historical and current styles of what is desirable, a sense of design to conceive a harmonious total system, and the confidence and energy to marshal this knowledge and available resources to go out and get something built. To accomplish this, the architect needs a tremendous density of information with an in-depth understanding of the fundamentals and a quantitative approach to ground his thinking.
由此恍然大悟——自己离Architect的目标还远着呢,充其量是个SOPC Builder。 riple
使用Start Analysis & Elaboration代替Start Analysis & Synthesis可以显著缩短编译时间,对于添加节点来说,效果是相同的。原理如下: riple
Go to the Processing menu, point to Start and select Start Analysis & Elaboration to compile the design.
Before you can connect the ELA to signals in your design, you must first compile the design to build the node database. For this step, you do not need to fit the design completely. The Start Analysis & Elaboration command builds the node database, but stops before the fitting step.
可以简单的认为:Start Analysis & Synthesis = Start Analysis & Elaboration + Mapping。Start Analysis & Elaboration可以建立未经过器件结构映射的设计数据库,而Start Analysis & Synthesis建立的是经过器件结构映射和优化的设计数据库。 riple
同样,如果只需要观察一个设计的层次关系图,也可以使用这种方法加快速度。 riple
同样,如果只需要观察一个设计的RTL视图,不需要观察Technology Map视图,也可以使用这种方法加快速度。 riple
背景资料:Using SignalTap II Embedded Logic Analyzers in SOPC Builder Systems riple
以前遇到过几次类似问题,只知道关闭一下就可以通过,但是没搞清原理。在Altera的一篇文档里找到了答案: riple
In the Settings dialog box, under the Compilation Process Settings section, select Incremental Compilation. Set the Incremental Compilation option to Off.
By turning off the Incremental Compilation option, pre-synthesis signals can be added to the SignalTap II ELA in the later sections. Pre-synthesis signals exist after design elaboration, but before any synthesis optimizations are done. This set of signals should reflect your register transfer level (RTL) signals.
背景资料:Using SignalTap II Embedded Logic Analyzers in SOPC Builder Systems riple
在使用SignalTAP II的过程中,我经常发现一些用于调试的逻辑(比如调试用的计数器)会被优化掉,不能出现在调试波形中。在Altera的一篇文档中,发现了以下关键信息: riple
In the logic synthesis stage, the Quartus II software may optimize away signals that you are trying to analyze with the SignalTap II Embedded Logic Analyzer. If this occurs, you will see a compilation error. You can force the Quartus II software to preserve these signals by adding the keep or preserve attribute in the source HDL to the signals you want to monitor.
The keep attribute is used for a wire or net node. For example:
In Verilog:
wire my_wire /* synthesis keep = 1 */:
In VHDL:
signal my_signal: bit;
attribute syn_keep : boolean;
attribute syn_keep of my_signal: signal is true;
The preserve attribute is used for a register. For example:
In Verilog:
reg my_reg /* synthesis preserve = 1 */:
In VHDL:
signal my_reg: stdlogic;
attribute preserve : boolean;
attribute preserve of my_signal: signal is true;
背景资料:Using SignalTap II Embedded Logic Analyzers in SOPC Builder Systems riple
系统分类: | CPLD/FPGA |
用户分类: | Signal Tap II |
标签: | signaltap 保留节点 |
来源: | 原创 |
文章评论(0条评论)
登录后参与讨论