Matrix7x7的verilog实现

发布时间:2024年01月19日
`timescale 1ns / 1ps
//
// Company: 
// Engineer: 
// 
// Create Date: 
// Design Name: 
// Module Name: 
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//

module matrix7x7 #(
parameter C_PIXEL_WIDTH                 = 16                ,                            
parameter C_IMAGE_WIDTH			        = 12'd1280	        ,                      
parameter C_IMAGE_HEIGHT			    = 12'd1024
)(
input	wire                            sysclk              ,
input	wire                            sysrstn             ,

input	wire [C_PIXEL_WIDTH - 1 : 0]	s_axis_rdata	    ,
input	wire 	                        s_axis_rvalid	    ,
input	wire 	                        s_axis_ruser	    ,
input	wire 	                        s_axis_rlast	    ,

output	reg  	                        m_axis_tuser	    ,
output	reg  	                        m_axis_tlast	    ,
output	reg  	                        m_axis_tvalid	    ,
output	reg  	                        m_axis_dvalid	    ,

output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat11	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat12	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat13	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat14	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat15	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat16	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat17	    ,

output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat21	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat22	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat23	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat24	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat25	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat26	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat27	    ,

output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat31	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat32	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat33	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat34	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat35	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat36	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat37	    ,

output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat41	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat42	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat43	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat44	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat45	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat46	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat47	    ,

output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat51	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat52	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat53	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat54	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat55	    ,	     
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat56	    ,	     
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat57	    ,	    

output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat61	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat62	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat63	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat64	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat65	    ,	     
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat66	    ,	     
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat67	    ,	

output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat71	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat72	    ,
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat73	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat74	    ,	      
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat75	    ,	     
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat76	    ,	     
output	reg  [C_PIXEL_WIDTH - 1 : 0]	m_axis_tdat77
);

localparam ACTIVE_RST 					= 1'b0				;
localparam BLANKNUM 					= 60				;

reg		[3:0]							matrix_curr			;
reg		[3:0]							matrix_next			;
reg     [15:0]                          pixle_cnt, line_cnt ;
reg     [15:0]                          pixle_cnt1			;

reg                                     fifo1_wen           ;
reg     [C_PIXEL_WIDTH - 1 : 0]	        fifo1_wdata         ;
wire                                    fifo1_ren           ;
wire    [C_PIXEL_WIDTH - 1 : 0]	        fifo1_rdata         ;
wire									fifo1_empty	        ;
wire									fifo1_full	        ;

reg                                     fifo2_wen           ;
reg     [C_PIXEL_WIDTH - 1 : 0]	        fifo2_wdata         ;
wire                                    fifo2_ren           ;
wire    [C_PIXEL_WIDTH - 1 : 0]	        fifo2_rdata         ;
wire									fifo2_empty	        ;
wire									fifo2_full	        ;

reg                                     fifo3_wen           ;
reg     [C_PIXEL_WIDTH - 1 : 0]	        fifo3_wdata         ;
wire                                    fifo3_ren           ;
wire    [C_PIXEL_WIDTH - 1 : 0]	        fifo3_rdata         ;
wire									fifo3_empty	        ;
wire									fifo3_full	        ;

reg                                     fifo4_wen           ;
reg     [C_PIXEL_WIDTH - 1 : 0]	        fifo4_wdata         ;
wire                                    fifo4_ren           ;
wire    [C_PIXEL_WIDTH - 1 : 0]	        fifo4_rdata         ;
wire									fifo4_empty	        ;
wire									fifo4_full	        ;

reg                                     fifo5_wen           ;
reg     [C_PIXEL_WIDTH - 1 : 0]	        fifo5_wdata         ;
wire                                    fifo5_ren           ;
wire    [C_PIXEL_WIDTH - 1 : 0]	        fifo5_rdata         ;
wire									fifo5_empty	        ;
wire									fifo5_full	        ;

reg                                     fifo6_wen           ;
reg     [C_PIXEL_WIDTH - 1 : 0]	        fifo6_wdata         ;
wire                                    fifo6_ren           ;
wire    [C_PIXEL_WIDTH - 1 : 0]	        fifo6_rdata         ;
wire									fifo6_empty	        ;
wire									fifo6_full	        ;

wire									s_axis_rvalid_w		;
reg										m_axis_tvalid_r		;
reg										m_axis_tvalid_r1	;
reg										m_axis_tlast_r		;
reg										m_axis_tlast_r1		;
reg										m_axis_dvalid_r		;
reg										m_axis_dvalid_r1	;

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
        matrix_curr <= 4'h0;
    else 
		matrix_curr <= matrix_next;
end 

always @(*) begin 
	case(matrix_curr)
		4'h0	: begin 
			if( s_axis_ruser == 1'b1 )
				matrix_next = 4'h1;
			else 
				matrix_next = matrix_curr;
		end
		4'h1	: begin 
			if( s_axis_rlast == 1'b1 && line_cnt == 16'h0 )
				matrix_next = 4'h2;
			else 
				matrix_next = matrix_curr;
		end
		4'h2	: begin 
			if( s_axis_rlast == 1'b1 && line_cnt == C_IMAGE_HEIGHT - 1 )
				matrix_next = 4'h3;
			else 
				matrix_next = matrix_curr;
		end 
		4'h3	: begin 
			if( pixle_cnt == C_IMAGE_WIDTH + BLANKNUM && line_cnt == C_IMAGE_HEIGHT + 2 )
				matrix_next = 4'h0;
			else
				matrix_next = matrix_curr;
		end 
		default : matrix_next = 4'h0;
	endcase
end

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
        line_cnt <= 16'h0;
    else if( s_axis_ruser == 1'b1 )
        line_cnt <= 16'h0;
    else if( s_axis_rlast == 1'b1 || pixle_cnt == C_IMAGE_WIDTH + BLANKNUM )
        line_cnt <= line_cnt + 16'h1;
end 

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
        pixle_cnt <= 16'h0;  
    else if( matrix_curr == 4'h3 && pixle_cnt == C_IMAGE_WIDTH + BLANKNUM )
        pixle_cnt <= 16'h0;
    else if( matrix_curr == 4'h3 )
        pixle_cnt <= pixle_cnt + 16'h1;
	else 
        pixle_cnt <= 16'h0;
end
 
assign s_axis_rvalid_w = ( pixle_cnt > BLANKNUM && pixle_cnt <= C_IMAGE_WIDTH + BLANKNUM ) ? 1'b1 : 1'b0;

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST) begin 
		fifo1_wen   <= 1'b0;
		fifo1_wdata <= 16'h0;
	end else if( s_axis_rvalid == 1'b1 ) begin 
		fifo1_wen   <= 1'b1;
		fifo1_wdata <= s_axis_rdata;
	end else begin 
		fifo1_wen   <= 1'b0;
		fifo1_wdata <= 16'h0;
	end
end

assign fifo1_ren = (( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1) && line_cnt > 0 ) ? 1'b1 : 1'b0;
 
always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST) begin 
		fifo2_wen   <= 1'b0;
		fifo2_wdata <= 16'h0;
	end else if(( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 0 ) begin 
		fifo2_wen   <= 1'b1;
		fifo2_wdata <= fifo1_rdata;
	end else begin
		fifo2_wen   <= 1'b0;
		fifo2_wdata <= 16'h0;
	end
end
 
assign fifo2_ren = (( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 1 ) ? 1'b1 : 1'b0;

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST) begin 
		fifo3_wen   <= 1'b0;
		fifo3_wdata <= 16'h0;
	end else if(( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 1 ) begin 
		fifo3_wen   <= 1'b1;
		fifo3_wdata <= fifo2_rdata;
	end else begin
		fifo3_wen   <= 1'b0;
		fifo3_wdata <= 16'h0;
	end
end

assign fifo3_ren = (( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 2 ) ? 1'b1 : 1'b0;

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST) begin 
		fifo4_wen   <= 1'b0;
		fifo4_wdata <= 16'h0;
	end else if(( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 2 ) begin 
		fifo4_wen   <= 1'b1;
		fifo4_wdata <= fifo3_rdata;
	end else begin
		fifo4_wen   <= 1'b0;
		fifo4_wdata <= 16'h0;
	end
end

assign fifo4_ren = (( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 3 ) ? 1'b1 : 1'b0;

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST) begin 
		fifo5_wen   <= 1'b0;
		fifo5_wdata <= 16'h0;
	end else if(( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 3 ) begin 
		fifo5_wen   <= 1'b1;
		fifo5_wdata <= fifo4_rdata;
	end else begin
		fifo5_wen   <= 1'b0;
		fifo5_wdata <= 16'h0;
	end
end

assign fifo5_ren = (( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 4 ) ? 1'b1 : 1'b0;

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST) begin 
		fifo6_wen   <= 1'b0;
		fifo6_wdata <= 16'h0;
	end else if(( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 4 ) begin 
		fifo6_wen   <= 1'b1;
		fifo6_wdata <= fifo5_rdata;
	end else begin
		fifo6_wen   <= 1'b0;
		fifo6_wdata <= 16'h0;
	end
end

assign fifo6_ren = (( s_axis_rvalid == 1'b1 || s_axis_rvalid_w == 1'b1 ) && line_cnt > 5 ) ? 1'b1 : 1'b0;

DPFifo_16B2048D u1 	(
	.a_rst_i 		( s_axis_ruser  ),
	.clk_i			( sysclk		),
	.wr_en_i 		( fifo1_wen   	),
	.wdata 			( fifo1_wdata 	),
	.rd_en_i 		( fifo1_ren   	),
	.rdata 			( fifo1_rdata 	),
	.empty_o 		( fifo1_empty	),
	.full_o	 		( fifo1_full	) 
);

DPFifo_16B2048D u2 	(
	.a_rst_i 		( s_axis_ruser  ),
	.clk_i			( sysclk		),
	.wr_en_i 		( fifo2_wen   	),
	.wdata 			( fifo2_wdata 	),
	.rd_en_i 		( fifo2_ren   	),
	.rdata 			( fifo2_rdata 	),
	.empty_o 		( fifo2_empty	),
	.full_o	 		( fifo2_full	) 
);	

DPFifo_16B2048D u3 	(
	.a_rst_i 		( s_axis_ruser  ),
	.clk_i			( sysclk		),
	.wr_en_i 		( fifo3_wen   	),
	.wdata 			( fifo3_wdata 	),
	.rd_en_i 		( fifo3_ren   	),
	.rdata 			( fifo3_rdata 	),
	.empty_o 		( fifo3_empty	),
	.full_o	 		( fifo3_full	) 
);

DPFifo_16B2048D u4 	(
	.a_rst_i 		( s_axis_ruser  ),
	.clk_i			( sysclk		),
	.wr_en_i 		( fifo4_wen   	),
	.wdata 			( fifo4_wdata 	),
	.rd_en_i 		( fifo4_ren   	),
	.rdata 			( fifo4_rdata 	),
	.empty_o 		( fifo4_empty	),
	.full_o	 		( fifo4_full	) 
);

DPFifo_16B2048D u5 	(
	.a_rst_i 		( s_axis_ruser  ),
	.clk_i			( sysclk		),
	.wr_en_i 		( fifo5_wen   	),
	.wdata 			( fifo5_wdata 	),
	.rd_en_i 		( fifo5_ren   	),
	.rdata 			( fifo5_rdata 	),
	.empty_o 		( fifo5_empty	),
	.full_o	 		( fifo5_full	) 
);

DPFifo_16B2048D u6 	(
	.a_rst_i 		( s_axis_ruser  ),
	.clk_i			( sysclk		),
	.wr_en_i 		( fifo6_wen   	),
	.wdata 			( fifo6_wdata 	),
	.rd_en_i 		( fifo6_ren   	),
	.rdata 			( fifo6_rdata 	),
	.empty_o 		( fifo6_empty	),
	.full_o	 		( fifo6_full	) 
);

reg  m_axis_tvalid_r2,m_axis_tlast_r2,m_axis_dvalid_r2;

always @(posedge sysclk) begin 
	m_axis_tvalid_r1 <= m_axis_tvalid_r;
	m_axis_tvalid_r2 <= m_axis_tvalid_r1;
	m_axis_tvalid	 <= m_axis_tvalid_r2;
	
	m_axis_tlast_r1	 <= m_axis_tlast_r;
	m_axis_tlast_r2	 <= m_axis_tlast_r1;
	m_axis_tlast	 <= m_axis_tlast_r2;
	
	m_axis_dvalid_r1 <= m_axis_dvalid_r;
	m_axis_dvalid_r2 <= m_axis_dvalid_r1;
	m_axis_dvalid	 <= m_axis_dvalid_r2;
end 

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
		m_axis_tuser <= 1'b0;
	else if( s_axis_rlast == 1'b1 && line_cnt == 2 )
		m_axis_tuser <= 1'b1;
	else
		m_axis_tuser <= 1'b0;
end

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
		m_axis_tvalid_r <= 1'b0;
	else if(( s_axis_rvalid == 1'b1 && line_cnt > 2 ) || ( s_axis_rvalid_w == 1'b1 ))
		m_axis_tvalid_r <= 1'b1;
	else
		m_axis_tvalid_r <= 1'b0;
end

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
		m_axis_tlast_r <= 1'b0;
	else if(( s_axis_rlast == 1'b1 && line_cnt > 2 ) || ( pixle_cnt == C_IMAGE_WIDTH + BLANKNUM ))
		m_axis_tlast_r <= 1'b1;
	else
		m_axis_tlast_r <= 1'b0;
end

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
        pixle_cnt1 <= 16'h0;  
	else if(( s_axis_rvalid == 1'b1 && line_cnt > 2 ) || ( s_axis_rvalid_w == 1'b1 ))
        pixle_cnt1 <= pixle_cnt1 + 16'h1;
	else 
        pixle_cnt1 <= 16'h0;
end

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST)
		m_axis_dvalid_r <= 1'b0;
	else if(  pixle_cnt1 > 2 && pixle_cnt1 < C_IMAGE_WIDTH - 3 && line_cnt > 5 && line_cnt <= C_IMAGE_HEIGHT - 1 )
		m_axis_dvalid_r <= 1'b1;
	else
		m_axis_dvalid_r <= 1'b0;
end

always @(posedge sysclk) begin 
    if(sysrstn == ACTIVE_RST) begin 
		m_axis_tdat11 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat12 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat13 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat14 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat15 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat16 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat17 <= {(C_PIXEL_WIDTH){1'b0}};
					  
	    m_axis_tdat21 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat22 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat23 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat24 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat25 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat26 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat27 <= {(C_PIXEL_WIDTH){1'b0}};
					   
	    m_axis_tdat31 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat32 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat33 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat34 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat35 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat36 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat37 <= {(C_PIXEL_WIDTH){1'b0}};
					  
	    m_axis_tdat41 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat42 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat43 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat44 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat45 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat46 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat47 <= {(C_PIXEL_WIDTH){1'b0}};
					  
	    m_axis_tdat51 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat52 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat53 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat54 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat55 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat56 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat57 <= {(C_PIXEL_WIDTH){1'b0}};
					  
	    m_axis_tdat61 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat62 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat63 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat64 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat65 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat66 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat67 <= {(C_PIXEL_WIDTH){1'b0}};
					   
	    m_axis_tdat71 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat72 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat73 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat74 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat75 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat76 <= {(C_PIXEL_WIDTH){1'b0}};
	    m_axis_tdat77 <= {(C_PIXEL_WIDTH){1'b0}};
	end else begin
		m_axis_tdat11 <= fifo6_rdata	;
	    m_axis_tdat12 <= m_axis_tdat11	;
	    m_axis_tdat13 <= m_axis_tdat12	;
	    m_axis_tdat14 <= m_axis_tdat13	;
	    m_axis_tdat15 <= m_axis_tdat14	;
	    m_axis_tdat16 <= m_axis_tdat15	;
	    m_axis_tdat17 <= m_axis_tdat16	;
						
	    m_axis_tdat21 <= fifo5_rdata	;
	    m_axis_tdat22 <= m_axis_tdat21	;
	    m_axis_tdat23 <= m_axis_tdat22	;
	    m_axis_tdat24 <= m_axis_tdat23	;
	    m_axis_tdat25 <= m_axis_tdat24	;
	    m_axis_tdat26 <= m_axis_tdat25	;
	    m_axis_tdat27 <= m_axis_tdat26	;
						
	    m_axis_tdat31 <= fifo4_rdata	;
	    m_axis_tdat32 <= m_axis_tdat31	;
	    m_axis_tdat33 <= m_axis_tdat32	;
	    m_axis_tdat34 <= m_axis_tdat33	;
	    m_axis_tdat35 <= m_axis_tdat34	;
	    m_axis_tdat36 <= m_axis_tdat35	;
	    m_axis_tdat37 <= m_axis_tdat36	;
						
	    m_axis_tdat41 <= fifo3_rdata	;
	    m_axis_tdat42 <= m_axis_tdat41	;
	    m_axis_tdat43 <= m_axis_tdat42	;
	    m_axis_tdat44 <= m_axis_tdat43	;
	    m_axis_tdat45 <= m_axis_tdat44	;
	    m_axis_tdat46 <= m_axis_tdat45	;
	    m_axis_tdat47 <= m_axis_tdat46	;
						
	    m_axis_tdat51 <= fifo2_rdata	;
	    m_axis_tdat52 <= m_axis_tdat51	;
	    m_axis_tdat53 <= m_axis_tdat52	;
	    m_axis_tdat54 <= m_axis_tdat53	;
	    m_axis_tdat55 <= m_axis_tdat54	;
	    m_axis_tdat56 <= m_axis_tdat55	;
	    m_axis_tdat57 <= m_axis_tdat56	;
						
	    m_axis_tdat61 <= fifo1_rdata	;
	    m_axis_tdat62 <= m_axis_tdat61	;
	    m_axis_tdat63 <= m_axis_tdat62	;
	    m_axis_tdat64 <= m_axis_tdat63	;
	    m_axis_tdat65 <= m_axis_tdat64	;
	    m_axis_tdat66 <= m_axis_tdat65	;
	    m_axis_tdat67 <= m_axis_tdat66	;
						
	    m_axis_tdat71 <= s_axis_rdata	;
	    m_axis_tdat72 <= m_axis_tdat71	;
	    m_axis_tdat73 <= m_axis_tdat72	;
	    m_axis_tdat74 <= m_axis_tdat73	;
	    m_axis_tdat75 <= m_axis_tdat74	;
	    m_axis_tdat76 <= m_axis_tdat75	;
	    m_axis_tdat77 <= m_axis_tdat76	; 
	end
end

endmodule
文章来源:https://blog.csdn.net/kongqiweiliang1/article/details/135666464
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。