您当前的位置: 首页 >  ar

FPGA硅农

暂无认证

  • 3浏览

    0关注

    282博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

基于FPGA的脉动阵列(Output Stationary)

FPGA硅农 发布时间:2021-02-10 21:06:00 ,浏览量:3

单个PE的代码

`timescale 1ns / 1ps
//
// Company: 
// Engineer: 
// 
// Create Date: 2021/02/10 19:09:28
// Design Name: 
// Module Name: systolic_pe
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//


module systolic_pe
#(parameter DATA_WIDTH = 16)
(
input clk,
input [DATA_WIDTH-1:0]A_shift_in,
input [DATA_WIDTH-1:0]B_shift_in,
input clear,                       //clear,set psum=0
input calc_en,                     
output [DATA_WIDTH-1:0]A_out,
output [DATA_WIDTH-1:0]B_out,
output [2*DATA_WIDTH-1:0]Sum
    );
logic [DATA_WIDTH-1:0] A;
logic [DATA_WIDTH-1:0] B;
logic [2*DATA_WIDTH-1:0] Psum;

assign A_out=A;
assign B_out=B;
//Psum
always_ff@(posedge clk)
begin
    if(calc_en)
        if(clear)
            Psum            
关注
打赏
1658642721
查看更多评论
0.1673s