FPGA与PC机PCIe通信遇到的问题
这是我写数据PC端的部分代码:
void __fastcall TForm1::iButton2Click(TObject *Sender)
{
const int nTestSize = 16;
BYTE *pWrite = new BYTE[nTestSize];
AnsiString strText;
bool bSuccess;
//connect
bSuccess = m_hPCIE.Open(PCIE_VID,PCIE_DID,0);
// write
if (bSuccess){
strText = "0x" + Edit2->Text;
*pWrite = strText.ToInt();
bSuccess = m_hPCIE.DmaWrite(ADDR2, pWrite, nTestSize);
if (!bSuccess){
MessageDlg("Failed to write data.", mtError, TMsgDlgButtons() << mbOK, 0);
} else{
UIShowStatus("write data successfully", clGreen);
}
}else{
MessageDlg("Failed to connect the FPGA board.", mtError, TMsgDlgButtons() << mbOK, 0);
}
delete []pWrite;
}
您好,我最近也在做pc端通过pcie和fpga通信的pc端软件,想问一下你的代码中m_hPCIE调用的Open和DmaWrite这些函数是谁提供的