UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Visitor deltalian
Visitor
400 次查看
注册日期: ‎05-27-2014

关于创建c-callable IP

大家好,

 

在把rtl代码制作成c-callable IP中(主要是要在zynq mpsoc上运行),ug1207实在讲的太简单了,而且拿出的范例都是做好的,而不讲解制作过程,看了好多文档,还是不明白具体过程,现在有一些问题卡住我了,特此请求帮助:

1.sample提到的axi memory map接口的寄存器如下,它们到底哪里来的?自己手写?是否有模板?

// lite
// 0x00 : Control signals
//        bit 0  - ap_start (Read/Write/COH)
//        bit 1  - ap_done (Read/COR)
//        bit 2  - ap_idle (Read)
//        bit 3  - ap_ready (Read)
//        bit 7  - auto_restart (Read/Write)
//        others - reserved
// 0x04 : Global Interrupt Enable Register
//        bit 0  - Global Interrupt Enable (Read/Write)
//        others - reserved
// 0x08 : IP Interrupt Enable Register (Read/Write)
//        bit 0  - Channel 0 (ap_done)
//        bit 1  - Channel 1 (ap_ready)
//        others - reserved
// 0x0c : IP Interrupt Status Register (Read/TOW)
//        bit 0  - Channel 0 (ap_done)
//        bit 1  - Channel 1 (ap_ready)
//        others - reserved
// 0x10 : Data signal of M
//        bit 31~0 - M[31:0] (Read/Write)
// 0x14 : reserved
// (SC = Self Clear, COR = Clear on Read, TOW = Toggle on Write, COH = Clear on Handshake)

 

2.这些ap_start, ap_done ...需要服从哪个协议?是否有文档介绍?

 

3.我目前理解的制作c-callable IP的步骤如下, 还请帮忙回答其中的疑惑

a. 生成一个slave axilite接口用于管理rtl IP, 并且自己的rtl状态机必须服从ap_start, ap_done, ap_ready...这个协议;另外生成一个slave axistream用于传输数据.

b. 用IP Packager把a的结果封装好, 好像需要什么fcnname.xml和param.xml,这两东西又得手写?还是由工具生成?

c. 在SDSOC中把b封装好的IP文件(就是那个component.xml?)连同它的header文件封装成c-callable IP

0 项奖励
5 条回复5
Visitor deltalian
Visitor
362 次查看
注册日期: ‎05-27-2014

回复: 关于创建c-callable IP

来大神解惑

0 项奖励
Xilinx Employee
Xilinx Employee
352 次查看
注册日期: ‎03-27-2013

回复: 关于创建c-callable IP

没有研究过这个,但是从你的注释中可以明显地看到IP内寄存器的地址译码,和寄存器内部的bit位分布说明。

以第一个寄存器为例:

// lite
// 0x00 : Control signals
//        bit 0  - ap_start (Read/Write/COH)
//        bit 1  - ap_done (Read/COR)
//        bit 2  - ap_idle (Read)
//        bit 3  - ap_ready (Read)
//        bit 7  - auto_restart (Read/Write)
//        others - reserved

可以查看对应的 IP的RTL代码中AXI lite接口的地址译码中的offset 0x0位置的寄存器,看一下这个寄存器的相关的bit位,这些bit位会连接到IP的其他功能。从信号命名来应该就是一个简单的握手接口的信号,比较大的可能是UG902中说的Block-Level Interface Protocol。所以感觉这个就是HLS生成的IP。IP的RTL代码是工具生成的,接口都是标准的,顺带在driver中生成寄存器操作难度应该不大。

 

 

 

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
0 项奖励
Visitor deltalian
Visitor
327 次查看
注册日期: ‎05-27-2014

回复: 关于创建c-callable IP

不管怎样,谢谢响应,我想应该是要自己写一段rtl代码来解析ap_ctrl_hs握手协议,等我实践完了再来反馈.

0 项奖励
Moderator
Moderator
322 次查看
注册日期: ‎05-27-2018

回复: 关于创建c-callable IP

@deltalian

    欢迎反馈!

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 项奖励
Xilinx Employee
Xilinx Employee
298 次查看
注册日期: ‎03-27-2013

回复: 关于创建c-callable IP

好的,附图是UG902文档中的Port-Level Interface Protocol的附图,如果确认是同一协议,建议参考下该文档的其他内容,希望会对你有帮助:

Capture.PNG

 

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
0 项奖励