您当前的位置: 首页 >  c++

FPGA硅农

暂无认证

  • 1浏览

    0关注

    282博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

ShiDianNao的c++实现

FPGA硅农 发布时间:2020-10-27 11:01:29 ,浏览量:1

#include"cfg.h"
#include
#include
#include
using namespace std;

class PE{
public:
    int weight;
    int feature;
    int acc;
public:
    void calc(){
       acc+=weight*feature;
       return;
    }
};

class NBin{
public:
    int Bank1[Py][MAX_ROW][Px];         //0~Py-1
    int Bank2[Py][MAX_ROW][Px];         //Py~2Py-1
public:
    void Write(int** In,int row,int col){
        //
        int xx=row/Py;
        int yy=col/Px;
        for(int j=0;j            
关注
打赏
1658642721
查看更多评论
0.0468s