野外的工程师:在Vivado包装IP

Editor’s Note – In this series, we will take a behind the scenes look at how an engineer tackles a project from beginning to end. What challenges will come up? How can we face problems and come up with solutions? Aside from project completion, what are successes that we can celebrate along the way?

包装Xilinx的Vivado中的IP

为了检查Eclypse上的SOC与我们新设计的ZMOD之间的所有连接,必须构建一个测试项目并加载到Eclypse Z7中。需要一些IP来源来提供必要的功能。对于此项目,将使用一个简单的VHDL时钟分隔器,以便输出输出的可变期望频率的方波。如下图所示,我的IP存储库文件夹中打开了一个新的Vivado项目。图2说明了所选选项“ RTL项目”。

Figure 1: Creating a Vivado Project
图2:在Vivado选择项目选项

如下图所示,已经创建了项目中的新VHDL文件。

图3:创建一个VHDL文件

When the window to choose your device pops up, the vendor setting defaults to ‘digilentinc.com’ and the Eclypse Z7 board has been chosen. Make sure you have theDigilent板文件安装!

图4:Digilent Boards Files,Eclypse Z7选择

粘贴在本文末尾的VHDL代码是一个时钟分隔线的VHDL功能,其中一个时钟输入和两个时钟输出。在Vivado项目中创建的VHDL文件中,从Vivado的“工具”菜单中写入了代码后,已经选择了“创建和包装新IP”选项。在弹出窗口中,选择了“您当前项目的软件包”选项(图5)。这将把我们的Vivado项目打包成IP!

图5:Vivado包装选项

选择包装IP的位置后,图6中说明的窗口应显示在屏幕上。

Figure 6: Editing Customization Parameters

从IP Packager的“自定义参数”选项卡中,可以编辑参数。在这种情况下,我将这些参数的范围值放在下图中所示。

图7:IP包装机设置

设置了所有设置后,按下了“包装IP”按钮(图8)。

图8:软件包IP

图9和10显示了在Vivado单独的项目中包装的IP的外观。

图9:包装IP
图10:IP变量设置

Now the IP has been successfully packaged!

The VHDL divider code basically works by counting the times a positive edge is present on the input clock. When the counters reach the value set by the user, the output clock logic state is inverted. This provides a division of the input clock frequency on the output clock.

图书馆IEEE;

采用IEEEstd_logic_1164全部;

采用IEEEnumeric_std全部;

- 如果使用,请输入以下库声明

- 具有签名或未签名值的算术函数

- use ieee.numeric_std.all;

— Uncomment the following library declaration if instantiating

- 此代码中的任何Xilinx叶细胞。

- 纤维unisim;

–us unisim.vcomponents.all;

实体Divider_Variable

Generic((

Counter_1整数:=5000;

Counter_2整数:=10000

);

港口((

clock_instd_logic;

clock_out_1出去std_logic;

clock_out_2出去std_logic

);

结尾Divider_Variable;

建筑学BehavioralofDivider_Variable

信号count_1,,,,count_2整数:=1;

信号TMP_1,,,,TMP_2std_logic:=‘0';

开始

process((clock_in

开始

如果((clock_in’事件和clock_in=‘1’然后

count_1<=count_1+1;

如果((count_1=Counter_1然后

TMP_1<=不是TMP_1;

count_1<=1;

结尾如果;

结尾如果;

clock_out_1<=TMP_1;

结尾process;

process((clock_in

开始

如果((clock_in’事件和clock_in=‘1’然后

count_2<=count_2+1;

如果((count_2=Counter_2然后

TMP_2<=不是TMP_2;

count_2<=1;

结尾如果;

结尾如果;

clock_out_2<=TMP_2;

结尾process;

结尾Behavioral;

在下一个条目中,我们将详细讨论该项目,该项目将用于测试新设计的Zmods上的I/OS。

0
成为第一个投票。

关于瑞安·达马托(Ryan Damato)

View all posts by Ryan Damato →

Leave a Reply

您的电子邮件地址不会被公开。