您当前的位置: 首页 > 

FPGA硅农

暂无认证

  • 0浏览

    0关注

    282博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

AXI STREAM协议学习

FPGA硅农 发布时间:2021-06-13 22:15:56 ,浏览量:0

axi stream协议的具体内容可参见从零学习AXI4总线(二):AXI4-Stream 介绍和AXI4-Stream协议总结 以下是一个简单的HDL示例,完成的功能是master向slave写入512个数据(1,2,3,…,511,512) 主机代码:

`timescale 1ns / 1ps
//
// Company: 
// Engineer: 
// 
// Create Date: 2021/06/13 20:42:20
// Design Name: 
// Module Name: axis_master
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//


module axis_master(
input logic ACLK,
input logic ARESETn,
input logic start,
input logic TREADY,
output logic done,
output logic TVALID,
output logic [31:0] TDATA,
output logic [3:0] TSTRB,
output logic [3:0] TKEEP,
output logic TLAST,
output logic TID,                       
output logic TDEST,                    
output logic TUSER                      //TID,TDEST,TUSER用于多机通信
    );
    
parameter N=512;
logic [31:0] tx_buffer [0:N-1];        //待传输的值
logic [31:0] tx_cnt;
//初始化tx_buffer
always_ff@(posedge ACLK,negedge ARESETn) 
if(~ARESETn)
begin
    for(int i=0;i            
关注
打赏
1658642721
查看更多评论
0.0443s