跳转到主要内容

【tcl学习】vivado write_edif

judy 提交于

作者:OpenSLee,<span id="profileBt"><a href="https://mp.weixin.qq.com/s?__biz=MzUyODUwMDExOQ==&mid=2247486478&idx=1&…开源工作室微信公众号</a></span>

EDF文件可以直接导入Vivado,而无需Verilog源文件。

好处:

(1) 避免沙雕队友修改源代码,则可以直接提交EDF网表文件。

(2) 避免用户剽窃劳动成果,保护自己的知识产权。

(3) 对于无需更改的设计复用,直接用EDF网表会贼方便。

1 vivado write_edif

目的:将当前网络列表导出为EDIF文件。

语法:
<pre>write_edif [‑pblocks <args>]
[‑cell <arg>]
[‑force]
[‑security_mode <arg>]
[‑logic_function_stripped]
[‑quiet]
[‑verbose]
&lt;file&gt;</pre>

<pre>
[-pblocks]导出这些pblocks的网络列表(对于-cell无效)
[-cell]导出此单元格的网络列表(对于-pblocks无效)
[-force]覆盖现有文件
[-security_mode]如果设置为“all”,并且某些设计需要加密,则
整个设计将被写入一个单独的加密文件 默认值:多文件
[-logic_function_stripped]将lut和ramb上的INIT字符串转换为固定值
[-quiet]忽略命令错误
[-verbose]在命令执行期间挂起消息限制
<file>输出文件(带有-pblocks或-cell的目录)
</pre>

举例:
<pre>write_edif C:/Data/edifOut.edn</pre>

2 操作步骤

(1)将需要封装的模块设置为顶层模块

(2)综合或实现需要生成edif的verilog或vhdl源文件。

(3)open Elaborated Design or Open Synthesized Design or Open

Implemented Design

<img src="http://xilinx.eetrend.com/files/2020-08/%E5%8D%9A%E5%AE%A2/100051296-10…; alt="">

(4) tcl console:write_edif xx.edf

(5) tcl console:write_verilog -mode synth_stub xx_stub.v

(6) 调用 xx.edf和xx_stub.v

<a href="https://mp.weixin.qq.com/s?__biz=MzUyODUwMDExOQ==&amp;mid=2247486478&am…;点击查看视频演示</a>