1 PWM IP设计(PS为Master,PL为Slave)
1.1 PWM顶层IP模块,内部例化AXI协议模块
- PS侧通过AXI总线,向PL发送控制信号,PL侧读取控制信号,发过来
输出
到4个寄存器中,进而控制PWM信号,同时PS侧与PL侧通信是握手协议(VALID与READY)
1.2 AXI协议模块
1.3 SDK设计
- PWM.h
- PWM.c
2 AXI模块时序设计
2.1 Write address
Master为PS,Slave 为PL
- input 表示Master发送到Slave(PL),indicates that the master signaling valid write address and control information.
- output表示Slave发送到Master(PS),slave is ready to accept an address and associated control signals.
2.2 Write data
Master为PS,Slave 为PL
- input 表示Master发送到slave(PL)
- output 表示Slave发送到Master(PS),indicates that the slave can accept the write data.
2.3 Write response
Master为PS,Slave 为PL
- input 表示Master发送到Slave(PL)
- output 表示Slave发送到Master(PS),that the master can accept a write response.
2.4 Read address
Master为PS,Slave 为PL
- input 表示Master发送到Slave(PL),
issued by master, acceped by Slave
- output 表示Slave发送到Master(PS), the slave is ready to accept an address and associated control signals.
2.5 Read data
Master为PS,Slave 为PL
- input 表示Master发送到Slave(PL),
issued by master, acceped by Slave
,indicates that the master can accept the read data and response information. - output 表示Slave发送到Master(PS),
3 AXI模块功能设计
3.1 axi_awready
3.2 axi_wready
- slave is ready to accept write data
3.3 axi_awaddr
3.4 slv_reg_wren