Line 277... |
Line 277... |
m_proSetWiz = new ProjectSetWizard(this);
|
m_proSetWiz = new ProjectSetWizard(this);
|
}
|
}
|
//connect
|
//connect
|
if((nexecResult = m_proSetWiz->exec()))
|
if((nexecResult = m_proSetWiz->exec()))
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("工程向导"),QObject::tr("参数设置完成"));
|
QMessageBox::information(this, QObject::tr("工程向导"),QObject::tr("参数设置完成"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Finishing setting the project configurations!"));
|
|
#endif
|
|
|
/*根据设置的参数来 判断是否进行重新创建工程对象*/
|
/*根据设置的参数来 判断是否进行重新创建工程对象*/
|
if(!currentPrj)
|
if(!currentPrj)
|
{
|
{
|
currentPrj = new EziDebugPrj(m_proSetWiz->m_uncurrentRegNum,m_proSetWiz->m_icurrentDir,m_proSetWiz->m_ecurrentTool,this);
|
currentPrj = new EziDebugPrj(m_proSetWiz->m_uncurrentRegNum,m_proSetWiz->m_icurrentDir,m_proSetWiz->m_ecurrentTool,this);
|
currentPrj->setXilinxErrCheckedFlag(m_proSetWiz->m_isXilinxErrChecked);
|
currentPrj->setXilinxErrCheckedFlag(m_proSetWiz->m_isXilinxErrChecked);
|
UpdateDetectThread * pthread = currentPrj->getThread() ;
|
UpdateDetectThread * pthread = currentPrj->getThread() ;
|
connect(pthread,SIGNAL(codeFileChanged()),this,SLOT(updateIndicate()));
|
connect(pthread,SIGNAL(codeFileChanged()),this,SLOT(updateIndicate()));
|
connect(currentPrj,SIGNAL(updateProgressBar(int)),this,SLOT(changeProgressBar(int)));
|
connect(currentPrj,SIGNAL(updateProgressBar(int)),this,SLOT(changeProgressBar(int)));
|
|
|
listWindow->addMessage("info","EziDebug info: create new project!");
|
listWindow->addMessage("info","EziDebug info: open new project!");
|
QStandardItem * pitem = listWindow->addMessage("info",tr("The new project parameter:"));
|
QStandardItem * pitem = listWindow->addMessage("info",tr("The current project parameter:"));
|
listWindow->addMessage("process",tr(" The chain max reg number: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("process",tr(" The maximum register number of scan chain: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("process",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("process",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("process",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
listWindow->addMessage("process",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
}
|
}
|
else
|
else
|
{
|
{
|
Line 302... |
Line 306... |
&&(m_proSetWiz->m_ecurrentTool == currentPrj->getToolType())\
|
&&(m_proSetWiz->m_ecurrentTool == currentPrj->getToolType())\
|
&&(QDir::toNativeSeparators(m_proSetWiz->m_icurrentDir) == QDir::toNativeSeparators(currentPrj->getCurrentDir().absolutePath()))\
|
&&(QDir::toNativeSeparators(m_proSetWiz->m_icurrentDir) == QDir::toNativeSeparators(currentPrj->getCurrentDir().absolutePath()))\
|
&&(m_proSetWiz->m_isXilinxErrChecked == currentPrj->getSoftwareXilinxErrCheckedFlag()))
|
&&(m_proSetWiz->m_isXilinxErrChecked == currentPrj->getSoftwareXilinxErrCheckedFlag()))
|
{
|
{
|
/*do nothing*/
|
/*do nothing*/
|
listWindow->addMessage("info","EziDebug info: The project parameter is same as before!");
|
listWindow->addMessage("info","EziDebug info: The project parameters are the same as before!");
|
QStandardItem * pitem = listWindow->addMessage("process",tr("The new project parameter:"));
|
QStandardItem * pitem = listWindow->addMessage("process",tr("The new project parameters:"));
|
listWindow->addMessage("info",tr(" The chain max reg number: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("info",tr(" The maximum register number of scan chain: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("info",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("info",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("info",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
listWindow->addMessage("info",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
}
|
}
|
else if(QDir::toNativeSeparators(m_proSetWiz->m_icurrentDir) != QDir::toNativeSeparators(currentPrj->getCurrentDir().absolutePath()))
|
else if(QDir::toNativeSeparators(m_proSetWiz->m_icurrentDir) != QDir::toNativeSeparators(currentPrj->getCurrentDir().absolutePath()))
|
{
|
{
|
Line 323... |
Line 327... |
//pparent->setCurrentProject(pcurrentPrj);
|
//pparent->setCurrentProject(pcurrentPrj);
|
UpdateDetectThread * pthread = currentPrj->getThread() ;
|
UpdateDetectThread * pthread = currentPrj->getThread() ;
|
connect(pthread,SIGNAL(codeFileChanged()),this,SLOT(updateIndicate()));
|
connect(pthread,SIGNAL(codeFileChanged()),this,SLOT(updateIndicate()));
|
connect(currentPrj,SIGNAL(updateProgressBar(int)),this,SLOT(changeProgressBar(int)));
|
connect(currentPrj,SIGNAL(updateProgressBar(int)),this,SLOT(changeProgressBar(int)));
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("准备解析新的工程!"));
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("准备解析新的工程!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Ready to parse new project!"));
|
|
#endif
|
|
|
listWindow->addMessage("info","EziDebug info: The project is changed !");
|
listWindow->addMessage("info","EziDebug info: The project is changed !");
|
QStandardItem * pitem = listWindow->addMessage("warning",tr("The new project parameter:"));
|
QStandardItem * pitem = listWindow->addMessage("warning",tr("The new project parameters:"));
|
listWindow->addMessage("warning",tr(" The chain max reg number: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("warning",tr(" The maximum register number of scan chain: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("warning",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("warning",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("warning",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
listWindow->addMessage("warning",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
|
|
|
|
/*等待用户 update all 重新解析工程*/
|
/*等待用户 update all 重新解析工程*/
|
Line 339... |
Line 348... |
else if(m_proSetWiz->m_ecurrentTool != currentPrj->getToolType())
|
else if(m_proSetWiz->m_ecurrentTool != currentPrj->getToolType())
|
{
|
{
|
|
|
/*重新设置工程参数*/
|
/*重新设置工程参数*/
|
currentPrj->setToolType(m_proSetWiz->m_ecurrentTool);
|
currentPrj->setToolType(m_proSetWiz->m_ecurrentTool);
|
listWindow->addMessage("warning","EziDebug warning: The project's parameters have changed!");
|
listWindow->addMessage("warning","EziDebug warning: The project's parameters have been changed!");
|
listWindow->addMessage("warning","EziDebug warning: Please delete all scan chain and insert the chain again!");
|
listWindow->addMessage("warning","EziDebug warning: Please delete all scan chains and insert the chain again!");
|
|
|
|
|
bool eneededCreateTestBenchFlag = false ;
|
bool eneededCreateTestBenchFlag = false ;
|
QMap<QString,EziDebugScanChain*>::const_iterator i = currentPrj->getScanChainInfo().constBegin();
|
QMap<QString,EziDebugScanChain*>::const_iterator i = currentPrj->getScanChainInfo().constBegin();
|
while (i != currentPrj->getScanChainInfo().constEnd())
|
while (i != currentPrj->getScanChainInfo().constEnd())
|
Line 358... |
Line 367... |
}
|
}
|
|
|
if(eneededCreateTestBenchFlag)
|
if(eneededCreateTestBenchFlag)
|
{
|
{
|
/*提示是否重新生成testbench*/
|
/*提示是否重新生成testbench*/
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("原代码中存在扫描链,请删除所有链之后重新添加并生成相应的testBench文件!"));
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("原代码中存在扫描链,请删除所有链之后重新添加并生成相应的testBench文件!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("The existed scan chain isn't available, Plesase delete it !"));
|
|
#endif
|
}
|
}
|
|
|
delete currentPrj ;
|
delete currentPrj ;
|
currentPrj = NULL ;
|
currentPrj = NULL ;
|
EziDebugInstanceTreeItem::setProject(NULL);
|
EziDebugInstanceTreeItem::setProject(NULL);
|
Line 373... |
Line 386... |
//pparent->setCurrentProject(pcurrentPrj);
|
//pparent->setCurrentProject(pcurrentPrj);
|
UpdateDetectThread * pthread = currentPrj->getThread() ;
|
UpdateDetectThread * pthread = currentPrj->getThread() ;
|
connect(pthread,SIGNAL(codeFileChanged()),this,SLOT(updateIndicate()));
|
connect(pthread,SIGNAL(codeFileChanged()),this,SLOT(updateIndicate()));
|
connect(currentPrj,SIGNAL(updateProgressBar(int)),this,SLOT(changeProgressBar(int)));
|
connect(currentPrj,SIGNAL(updateProgressBar(int)),this,SLOT(changeProgressBar(int)));
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("准备解析新的工程!"));
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("准备解析新的工程!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Ready to parse project!"));
|
|
#endif
|
|
|
listWindow->addMessage("info","EziDebug info: The project is changed !");
|
listWindow->addMessage("info","EziDebug info: The project is changed !");
|
QStandardItem * pitem = listWindow->addMessage("warning",tr("The new project parameter:"));
|
QStandardItem * pitem = listWindow->addMessage("warning",tr("The new project parameter:"));
|
listWindow->addMessage("warning",tr(" The chain max reg number: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("warning",tr(" The maximum register number of scan chain: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("warning",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("warning",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("warning",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
listWindow->addMessage("warning",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
|
|
}
|
}
|
else
|
else
|
{
|
{
|
if(m_proSetWiz->m_uncurrentRegNum != currentPrj->getMaxRegNumPerChain())
|
if(m_proSetWiz->m_uncurrentRegNum != currentPrj->getMaxRegNumPerChain())
|
{
|
{
|
/*重新设置工程参数*/
|
/*重新设置工程参数*/
|
currentPrj->setMaxRegNumPerChain(m_proSetWiz->m_uncurrentRegNum);
|
currentPrj->setMaxRegNumPerChain(m_proSetWiz->m_uncurrentRegNum);
|
listWindow->addMessage("info","EziDebug info: The project parameter is changed ,!");
|
listWindow->addMessage("info","EziDebug info: The project parameter is changed !");
|
if(currentPrj->getScanChainInfo().count())
|
if(currentPrj->getScanChainInfo().count())
|
{
|
{
|
/*提示重新添加链 并重新生成testbench*/
|
/*提示重新添加链 并重新生成testbench*/
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("最大链寄存器个数已更改,之前所加扫描链不可用,请删除所有扫描链!"));
|
QMessageBox::information(this, QObject::tr("工程设置"),QObject::tr("最大链寄存器个数已更改,之前所加扫描链不可用,请删除所有扫描链!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("The maximum register number of scan chain has been changed, \n Please delete all scan chain codes inserted before!"));
|
|
#endif
|
}
|
}
|
}
|
}
|
|
|
|
|
if((m_proSetWiz->m_isXilinxErrChecked != currentPrj->getSoftwareXilinxErrCheckedFlag())&&(m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolIse))
|
if((m_proSetWiz->m_isXilinxErrChecked != currentPrj->getSoftwareXilinxErrCheckedFlag())&&(m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolIse))
|
{
|
{
|
/*提示是否重新生成testbench*/
|
/*提示是否重新生成testbench*/
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("工程设置"),QObject::tr("注意在 Xilinx 工程下 可能会导致 扫描链截取信号不正确!"));
|
QMessageBox::warning(this, QObject::tr("工程设置"),QObject::tr("注意在 Xilinx 工程下 可能会导致 扫描链截取信号不正确!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("Note: With Xilinx,information of scan chains may be mistaken!"));
|
|
#endif
|
/**/
|
/**/
|
}
|
}
|
|
|
QStandardItem * pitem = listWindow->addMessage("warning",tr("The new project parameter:"));
|
QStandardItem * pitem = listWindow->addMessage("warning",tr("The new project parameters:"));
|
listWindow->addMessage("process",tr(" The chain max reg number: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("process",tr(" The maximum register number of scan chain: %1").arg(m_proSetWiz->m_uncurrentRegNum),pitem);
|
listWindow->addMessage("process",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("process",tr(" The current project path: %1").arg(m_proSetWiz->m_icurrentDir),pitem);
|
listWindow->addMessage("process",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
listWindow->addMessage("process",tr(" The compile software: \"%1\"").arg((m_proSetWiz->m_ecurrentTool == EziDebugPrj::ToolQuartus) ? ("quartus") :("ise")),pitem);
|
|
|
}
|
}
|
|
|
Line 429... |
Line 455... |
EziDebugPrj::SCAN_TYPE etype = EziDebugPrj::partScanType ;
|
EziDebugPrj::SCAN_TYPE etype = EziDebugPrj::partScanType ;
|
QStringList ideletedChainList ;
|
QStringList ideletedChainList ;
|
|
|
if(!currentPrj)
|
if(!currentPrj)
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("您所指定的工程不存在或者未设置工程参数!"));
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("您所指定的工程不存在或者未设置工程参数!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("The project is not existed or the project parameter is NULL!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
// progress
|
// progress
|
|
|
Line 447... |
Line 478... |
// 发现有更新的文件,进行全部更新
|
// 发现有更新的文件,进行全部更新
|
if((currentPrj->getPrjVlgFileMap().count()!= 0)||(currentPrj->getPrjVhdlFileMap().count()!= 0))
|
if((currentPrj->getPrjVlgFileMap().count()!= 0)||(currentPrj->getPrjVhdlFileMap().count()!= 0))
|
{
|
{
|
if(isNeededUpdate)
|
if(isNeededUpdate)
|
{
|
{
|
listWindow->addMessage("info","EziDebug info: You can continue to update Project!");
|
listWindow->addMessage("info","EziDebug info: You can continue to update project!");
|
}
|
}
|
else
|
else
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("无文件可更新!"));
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("无文件可更新!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("No file changed in project!"));
|
|
#endif
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
Line 500... |
Line 535... |
|
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
// 0%
|
// 0%
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update project failed -- The software interior error!"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
|
|
return ;
|
return ;
|
}
|
}
|
etype = EziDebugPrj::partScanType ;
|
etype = EziDebugPrj::partScanType ;
|
|
|
// 10%
|
// 10%
|
Line 525... |
Line 562... |
progressBar->setValue(15);
|
progressBar->setValue(15);
|
|
|
// scan file all over (can't find the deleted file)
|
// scan file all over (can't find the deleted file)
|
if(currentPrj->traverseAllCodeFile(etype ,ivlgFileMap , ivhdlFileMap ,iaddedinfoList,ideletedinfoList))
|
if(currentPrj->traverseAllCodeFile(etype ,ivlgFileMap , ivhdlFileMap ,iaddedinfoList,ideletedinfoList))
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: traverseAllCodeFile encounter the error !");
|
listWindow->addMessage("error","EziDebug error: traverse code file error !");
|
|
|
QMap<QString,EziDebugVlgFile*>::iterator i = ivlgFileMap.begin() ;
|
QMap<QString,EziDebugVlgFile*>::iterator i = ivlgFileMap.begin() ;
|
while(i != ivlgFileMap.end())
|
while(i != ivlgFileMap.end())
|
{
|
{
|
EziDebugVlgFile* pfile = ivlgFileMap.value(i.key());
|
EziDebugVlgFile* pfile = ivlgFileMap.value(i.key());
|
Line 558... |
Line 595... |
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update project failed -- The software interior error!"));
|
|
#endif
|
// 0%
|
// 0%
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
Line 581... |
Line 621... |
|
|
QString itopModule = currentPrj->getTopModule() ;
|
QString itopModule = currentPrj->getTopModule() ;
|
|
|
if(!currentPrj->getPrjModuleMap().contains(itopModule))
|
if(!currentPrj->getPrjModuleMap().contains(itopModule))
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: There is no Topmodule definition!");
|
listWindow->addMessage("error","EziDebug error: There is no top module definition!");
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update project failed -- The software interior error!"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
Line 602... |
Line 646... |
{
|
{
|
listWindow->addMessage("error","EziDebug error: There is no memory left!");
|
listWindow->addMessage("error","EziDebug error: There is no memory left!");
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update project failed -- The software interior error!"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
Line 616... |
Line 664... |
|
|
// 生成整个树的 节点
|
// 生成整个树的 节点
|
if(currentPrj->traverseModuleTree(itopModuleComboName,pnewHeadItem))
|
if(currentPrj->traverseModuleTree(itopModuleComboName,pnewHeadItem))
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: fast update failed!");
|
listWindow->addMessage("error","EziDebug error: fast update failed!");
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update project failed -- The software interior error!"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
return ;
|
return ;
|
}
|
}
|
|
|
Line 634... |
Line 687... |
// 把所有破坏掉的链打印出来
|
// 把所有破坏掉的链打印出来
|
QString ichain ;
|
QString ichain ;
|
QStringList idestroyedChainList = currentPrj->getDestroyedChainList() ;
|
QStringList idestroyedChainList = currentPrj->getDestroyedChainList() ;
|
|
|
listWindow->addMessage("warning","EziDebug warning: Some chains are destroyed!");
|
listWindow->addMessage("warning","EziDebug warning: Some chains are destroyed!");
|
listWindow->addMessage("warning","the destroyed chain are:");
|
listWindow->addMessage("warning","the destroyed chains are:");
|
for(int i = 0 ; i < idestroyedChainList.count() ;i++)
|
for(int i = 0 ; i < idestroyedChainList.count() ;i++)
|
{
|
{
|
QString ichainName = idestroyedChainList.at(i) ;
|
QString ichainName = idestroyedChainList.at(i) ;
|
|
|
EziDebugInstanceTreeItem *pitem = currentPrj->getChainTreeItemMap().value(ichainName,NULL);
|
EziDebugInstanceTreeItem *pitem = currentPrj->getChainTreeItemMap().value(ichainName,NULL);
|
Line 649... |
Line 702... |
}
|
}
|
listWindow->addMessage("warning",ichain);
|
listWindow->addMessage("warning",ichain);
|
}
|
}
|
|
|
// 扫描链被破坏 ,提示删除
|
// 扫描链被破坏 ,提示删除
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("是否删除相关扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("是否删除相关扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("Some scan chains have been destroyed ,\n Do you want to delete all scan chain code ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#endif
|
|
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
QStringList iunDelChainList = currentPrj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
QStringList iunDelChainList = currentPrj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
if(iunDelChainList.count())
|
if(iunDelChainList.count())
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: Some chains do not be deleted for some reasons!");
|
listWindow->addMessage("error","EziDebug error: Some chains can not be deleted for some reasons!");
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
{
|
{
|
listWindow->addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
listWindow->addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
}
|
}
|
listWindow->addMessage("error","EziDebug error: Please check the code file is compiled successed!");
|
listWindow->addMessage("error","EziDebug error: Please check the code file is compiled successfully or not!");
|
}
|
}
|
|
|
for(int i = 0 ; i < idestroyedChainList.count() ; i++)
|
for(int i = 0 ; i < idestroyedChainList.count() ; i++)
|
{
|
{
|
QString idestroyedChain = idestroyedChainList.at(i) ;
|
QString idestroyedChain = idestroyedChainList.at(i) ;
|
Line 765... |
Line 823... |
emit updateTreeView(pnewHeadItem);
|
emit updateTreeView(pnewHeadItem);
|
|
|
// 100%
|
// 100%
|
progressBar->setValue(100);
|
progressBar->setValue(100);
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("更新代码完毕!"));
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("更新代码完毕!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Update project finished!"));
|
|
|
|
#endif
|
|
|
|
|
}
|
}
|
else
|
else
|
{
|
{
|
Line 778... |
Line 841... |
{
|
{
|
listWindow->addMessage("error","EziDebug error: The project file is not exist!");
|
listWindow->addMessage("error","EziDebug error: The project file is not exist!");
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("全部更新失败"),QObject::tr("您所指定的工程文件不存在!"));
|
QMessageBox::warning(this, QObject::tr("全部更新失败"),QObject::tr("您所指定的工程文件不存在!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("Update Poject failed -- The project file is not existed!"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
Line 798... |
Line 865... |
if(currentPrj->parsePrjFile(ivlgFileMap,ivhdlFileMap))
|
if(currentPrj->parsePrjFile(ivlgFileMap,ivhdlFileMap))
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: parse project file failed!");
|
listWindow->addMessage("error","EziDebug error: parse project file failed!");
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update Project failed -- The software interior error !"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
// 5%
|
// 5%
|
progressBar->setValue(5);
|
progressBar->setValue(5);
|
|
|
if(currentPrj->detectLogFile(READ_CHAIN_INFO))
|
if(currentPrj->detectLogFile(READ_CHAIN_INFO))
|
{
|
{
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("log文件内部被破坏"), tr("是否删除内部可能存在的扫描链代码后再进行扫描"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("log文件内部被破坏"), tr("是否删除内部可能存在的扫描链代码后再进行扫描"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("EziDebug configuration file contains one or more errors ,\n Do you want to delete all scan chain codes before updating project ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
|
|
#endif
|
|
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
// 遍历所有文件 删除可能存在的 EziDebug 代码
|
// 遍历所有文件 删除可能存在的 EziDebug 代码
|
currentPrj->deleteAllEziDebugCode(ivlgFileMap,ivhdlFileMap);
|
currentPrj->deleteAllEziDebugCode(ivlgFileMap,ivhdlFileMap);
|
|
|
Line 843... |
Line 922... |
// 如果 源 EziDebug_v1.0文件夹存在 暂不删除
|
// 如果 源 EziDebug_v1.0文件夹存在 暂不删除
|
|
|
// 重新 创建新log文件
|
// 重新 创建新log文件
|
if(currentPrj->createLogFile())
|
if(currentPrj->createLogFile())
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: create EziDebug config file failed!");
|
listWindow->addMessage("error","EziDebug error: EziDebug configuration file is failed to create!");
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update Project failed -- The software interior error !"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
Line 862... |
Line 946... |
else
|
else
|
{
|
{
|
// 不存在则创建文件
|
// 不存在则创建文件
|
if(currentPrj->createLogFile())
|
if(currentPrj->createLogFile())
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: create EziDebug config file failed!");
|
listWindow->addMessage("error","EziDebug error: EziDebug configuration file is failed to create!");
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update Project failed -- The software interior error !"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
// 5%
|
// 5%
|
Line 878... |
Line 967... |
|
|
currentPrj->setLogFileName(currentPrj->getCurrentDir().absoluteFilePath("config.ezi")) ;
|
currentPrj->setLogFileName(currentPrj->getCurrentDir().absoluteFilePath("config.ezi")) ;
|
|
|
if(currentPrj->parsePrjFile(ivlgFileMap,ivhdlFileMap))
|
if(currentPrj->parsePrjFile(ivlgFileMap,ivhdlFileMap))
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: parsePrjFile Error !");
|
listWindow->addMessage("error","EziDebug error: parse project file error !");
|
QMap<QString,EziDebugVlgFile*>::iterator i = ivlgFileMap.begin() ;
|
QMap<QString,EziDebugVlgFile*>::iterator i = ivlgFileMap.begin() ;
|
while(i != ivlgFileMap.end())
|
while(i != ivlgFileMap.end())
|
{
|
{
|
EziDebugVlgFile* pfile = ivlgFileMap.value(i.key());
|
EziDebugVlgFile* pfile = ivlgFileMap.value(i.key());
|
if(pfile)
|
if(pfile)
|
Line 908... |
Line 997... |
ivhdlFileMap.clear() ;
|
ivhdlFileMap.clear() ;
|
|
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Update Project failed -- The software interior error !"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
// 10%
|
// 10%
|
progressBar->setValue(10);
|
progressBar->setValue(10);
|
|
|
etype = EziDebugPrj::partScanType ;
|
etype = EziDebugPrj::partScanType ;
|
}
|
}
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("扫描所有代码文件"),QObject::tr("准备获取module信息"));
|
QMessageBox::information(this, QObject::tr("扫描所有代码文件"),QObject::tr("准备获取module信息"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("ready to get module information!"));
|
|
#endif
|
|
|
if(currentPrj->traverseAllCodeFile(etype , ivlgFileMap , ivhdlFileMap ,iaddedinfoList,ideletedinfoList))
|
if(currentPrj->traverseAllCodeFile(etype , ivlgFileMap , ivhdlFileMap ,iaddedinfoList,ideletedinfoList))
|
{
|
{
|
qDeleteAll(iaddedinfoList) ;
|
qDeleteAll(iaddedinfoList) ;
|
qDeleteAll(ideletedinfoList) ;
|
qDeleteAll(ideletedinfoList) ;
|
iaddedinfoList.clear();
|
iaddedinfoList.clear();
|
ideletedinfoList.clear();
|
ideletedinfoList.clear();
|
|
|
listWindow->addMessage("error","EziDebug error: traverseAllCodeFile encounter the error !");
|
listWindow->addMessage("error","EziDebug error: traverse code file failed !");
|
QMap<QString,EziDebugVlgFile*>::iterator i = ivlgFileMap.begin() ;
|
QMap<QString,EziDebugVlgFile*>::iterator i = ivlgFileMap.begin() ;
|
while(i != ivlgFileMap.end())
|
while(i != ivlgFileMap.end())
|
{
|
{
|
EziDebugVlgFile* pfile = ivlgFileMap.value(i.key());
|
EziDebugVlgFile* pfile = ivlgFileMap.value(i.key());
|
if(pfile)
|
if(pfile)
|
Line 964... |
Line 1060... |
|
|
|
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Project Update failed -- The software interior error !"));
|
|
#endif
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
|
|
currentPrj->updateFileMap(ivlgFileMap,ivhdlFileMap);
|
currentPrj->updateFileMap(ivlgFileMap,ivhdlFileMap);
|
|
|
currentPrj->addToMacroMap() ;
|
currentPrj->addToMacroMap() ;
|
listWindow->addMessage("info","EziDebug info: ready to traverse instances Tree !");
|
listWindow->addMessage("info","EziDebug info: ready to traverse instances tree !");
|
|
|
progressBar->setValue(65);
|
progressBar->setValue(65);
|
|
|
if(currentPrj->getScanChainInfo().count())
|
if(currentPrj->getScanChainInfo().count())
|
{
|
{
|
Line 987... |
Line 1087... |
currentPrj->cleanupChainTreeItemMap();
|
currentPrj->cleanupChainTreeItemMap();
|
}
|
}
|
|
|
if(currentPrj->generateTreeView())
|
if(currentPrj->generateTreeView())
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: traverse instances Tree error !");
|
listWindow->addMessage("error","EziDebug error: traverse instances tree error !");
|
delete currentPrj ;
|
delete currentPrj ;
|
setCurrentProject(NULL);
|
setCurrentProject(NULL);
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("全部更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr(" Project Update failed -- The software interior error !"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
Line 1007... |
Line 1112... |
currentPrj->resumeChainTreeItemMap();
|
currentPrj->resumeChainTreeItemMap();
|
// 用于清空 备份的 map
|
// 用于清空 备份的 map
|
currentPrj->updateOperation(EziDebugPrj::OperateTypeNone,NULL,NULL);
|
currentPrj->updateOperation(EziDebugPrj::OperateTypeNone,NULL,NULL);
|
}
|
}
|
|
|
listWindow->addMessage("info","EziDebug info: finish traverse instances Tree !");
|
listWindow->addMessage("info","EziDebug info: finishing traverse instances tree !");
|
|
|
pitem = currentPrj->getInstanceTreeHeadItem() ;
|
pitem = currentPrj->getInstanceTreeHeadItem() ;
|
|
|
EziDebugInstanceTreeItem::setProject(currentPrj);
|
EziDebugInstanceTreeItem::setProject(currentPrj);
|
|
|
Line 1019... |
Line 1124... |
|
|
// (代码中的扫描链 在 log文件中不存在 说明log文件曾经被破坏过!)
|
// (代码中的扫描链 在 log文件中不存在 说明log文件曾经被破坏过!)
|
if(currentPrj->getLogFileExistFlag()&¤tPrj->getLogfileDestroyedFlag())
|
if(currentPrj->getLogFileExistFlag()&¤tPrj->getLogfileDestroyedFlag())
|
{
|
{
|
// 提示删除所有链
|
// 提示删除所有链
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链信息丢失"), tr("是否删除所有扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链信息丢失"), tr("是否删除所有扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("Some scan chain information have been lost, Do you want to delete all scan chain code ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#endif
|
|
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
// 删除所有链代码
|
// 删除所有链代码
|
currentPrj->deleteAllEziDebugCode(ivlgFileMap,ivhdlFileMap);
|
currentPrj->deleteAllEziDebugCode(ivlgFileMap,ivhdlFileMap);
|
// 删除所有链相关的信息
|
// 删除所有链相关的信息
|
Line 1079... |
Line 1189... |
}
|
}
|
listWindow->addMessage("warning",ichain);
|
listWindow->addMessage("warning",ichain);
|
}
|
}
|
|
|
// 扫描链被破坏 ,提示删除
|
// 扫描链被破坏 ,提示删除
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("是否删除相关扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("是否删除相关扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("Some scan chains have been destroyed ,Do you want to delete all the scan chain code?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
#endif
|
|
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
QStringList iunDelChainList = currentPrj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
QStringList iunDelChainList = currentPrj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
if(iunDelChainList.count())
|
if(iunDelChainList.count())
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: Some chains do not be deleted for some reasons!");
|
listWindow->addMessage("error","EziDebug error: Some chains can not be deleted for some reasons!");
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
{
|
{
|
listWindow->addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
listWindow->addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
}
|
}
|
listWindow->addMessage("error","EziDebug error: Please check the code file is compiled successed!");
|
listWindow->addMessage("error","EziDebug error: Please check the code file is compiled successfully or not!");
|
}
|
}
|
}
|
}
|
}
|
}
|
progressBar->setValue(85);
|
progressBar->setValue(85);
|
|
|
Line 1128... |
Line 1243... |
|
|
emit updateTreeView(pitem);
|
emit updateTreeView(pitem);
|
|
|
progressBar->setValue(100);
|
progressBar->setValue(100);
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("更新代码完毕!"));
|
QMessageBox::information(this, QObject::tr("全部更新"),QObject::tr("更新代码完毕!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Project update finished!"));
|
|
#endif
|
|
|
}
|
}
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
}
|
}
|
Line 1148... |
Line 1267... |
|
|
// 是否需要更新
|
// 是否需要更新
|
if(isNeededUpdate)
|
if(isNeededUpdate)
|
{
|
{
|
// 提示需要 请快速更新后再进行 操作
|
// 提示需要 请快速更新后再进行 操作
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行删除"));
|
QMessageBox::information(this, QObject::tr("删除扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行删除"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Please update project before deleting scan chain !"));
|
|
#endif
|
|
|
return 0 ;
|
return 0 ;
|
}
|
}
|
else
|
else
|
{
|
{
|
//
|
//
|
UpdateDetectThread *pthread = currentPrj->getThread();
|
UpdateDetectThread *pthread = currentPrj->getThread();
|
pthread->update() ;
|
pthread->update() ;
|
if(isNeededUpdate)
|
if(isNeededUpdate)
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行删除"));
|
QMessageBox::information(this, QObject::tr("删除扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行删除"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Please update project before deleting scan chain !"));
|
|
#endif
|
|
|
return 0 ;
|
return 0 ;
|
}
|
}
|
}
|
}
|
|
|
|
|
ptreeItem = listWindow->getCurrentTreeItem();
|
ptreeItem = listWindow->getCurrentTreeItem();
|
if(!ptreeItem)
|
if(!ptreeItem)
|
{
|
{
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("删除扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("删除扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Delete scan chain failed -- The software interior error!"));
|
|
#endif
|
|
|
return 1;
|
return 1;
|
}
|
}
|
|
|
pchain = ptreeItem->getScanChainInfo();
|
pchain = ptreeItem->getScanChainInfo();
|
if(!pchain)
|
if(!pchain)
|
{
|
{
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("删除扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("删除扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Delete scan chain failed -- The software interior error!"));
|
|
#endif
|
|
|
return 1;
|
return 1;
|
}
|
}
|
|
|
|
|
pchain->backupFileList();
|
pchain->backupFileList();
|
Line 1199... |
Line 1337... |
{
|
{
|
/*对上一步操作进行善后*/
|
/*对上一步操作进行善后*/
|
if(currentPrj->eliminateLastOperation())
|
if(currentPrj->eliminateLastOperation())
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: delete last chain error!");
|
listWindow->addMessage("error","EziDebug error: delete last chain error!");
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("删除扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("删除扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Delete scan chain failed -- The software interior error!"));
|
|
|
|
#endif
|
|
|
return 1 ;
|
return 1 ;
|
}
|
}
|
|
|
/*更新上一步操作*/
|
/*更新上一步操作*/
|
Line 1287... |
Line 1431... |
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
|
|
pthread->start();
|
pthread->start();
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除扫描链"),QObject::tr("删除扫描链成功!"));
|
QMessageBox::information(this, QObject::tr("删除扫描链"),QObject::tr("删除扫描链成功!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Delete scan chain successfully!"));
|
|
|
|
#endif
|
|
|
}
|
}
|
else
|
else
|
{
|
{
|
/*读取删除链 已经扫描过的文件,从已经备份的文件进行恢复*/
|
/*读取删除链 已经扫描过的文件,从已经备份的文件进行恢复*/
|
Line 1343... |
Line 1492... |
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
|
|
pthread->start();
|
pthread->start();
|
|
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("删除扫描链"),QObject::tr("删除扫描链失败!"));
|
QMessageBox::warning(this, QObject::tr("删除扫描链"),QObject::tr("删除扫描链失败!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("Delete scan chain failed!"));
|
|
#endif
|
|
|
return 1;
|
return 1;
|
}
|
}
|
|
|
return 0 ;
|
return 0 ;
|
Line 1369... |
Line 1522... |
|
|
// 是否需要更新
|
// 是否需要更新
|
if(isNeededUpdate)
|
if(isNeededUpdate)
|
{
|
{
|
// 提示需要 请快速更新后再进行 操作
|
// 提示需要 请快速更新后再进行 操作
|
|
#if 0
|
QMessageBox::information(0, QObject::tr("添加扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行添加链!"));
|
QMessageBox::information(0, QObject::tr("添加扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行添加链!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Please update project before inserting scan chain !"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
else
|
else
|
{
|
{
|
//
|
//
|
UpdateDetectThread *pthread = currentPrj->getThread();
|
UpdateDetectThread *pthread = currentPrj->getThread();
|
pthread->update() ;
|
pthread->update() ;
|
if(isNeededUpdate)
|
if(isNeededUpdate)
|
{
|
{
|
|
#if 0
|
QMessageBox::information(0, QObject::tr("添加扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行添加链!"));
|
QMessageBox::information(0, QObject::tr("添加扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行添加链!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Please update project before inserting scan chain !"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
|
|
ptreeItem = listWindow->getCurrentTreeItem();
|
ptreeItem = listWindow->getCurrentTreeItem();
|
if(!ptreeItem)
|
if(!ptreeItem)
|
{
|
{
|
/*向文本栏提示 添加链错误 该节点不存在*/
|
/*向文本栏提示 添加链错误 该节点不存在*/
|
listWindow->addMessage("error","EziDebug error: The tree item is not exitst!");
|
|
|
listWindow->addMessage("error","EziDebug error: The tree item is not exist!");
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed -- The software interior error!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
if(currentPrj->getPrjModuleMap().contains(ptreeItem->getModuleName()))
|
if(currentPrj->getPrjModuleMap().contains(ptreeItem->getModuleName()))
|
{
|
{
|
pmodule = currentPrj->getPrjModuleMap().value(ptreeItem->getModuleName());
|
pmodule = currentPrj->getPrjModuleMap().value(ptreeItem->getModuleName());
|
if(!pmodule)
|
if(!pmodule)
|
{
|
{
|
/*向文本栏提示 添加链错误 该节点对应的module无定义*/
|
/*向文本栏提示 添加链错误 该节点对应的module无定义*/
|
listWindow->addMessage("error", tr("EziDebug error: the module:%1 object is null pointer!").arg(ptreeItem->getModuleName()));
|
listWindow->addMessage("error", tr("EziDebug error: the module:%1 object is null !").arg(ptreeItem->getModuleName()));
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed -- The software interior error!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
else
|
else
|
{
|
{
|
/*向文本栏提示 添加链错误 该节点对应的module无定义*/
|
/*向文本栏提示 添加链错误 该节点对应的module无定义*/
|
listWindow->addMessage("error", tr("EziDebug error: the module:").arg(ptreeItem->getModuleName()) + tr("has no definition!"));
|
listWindow->addMessage("error", tr("EziDebug error: the module:").arg(ptreeItem->getModuleName()) + tr("has no definition!"));
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed -- The software interior error!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
//QString iinstanceName = ptreeItem->getInstanceName() ;
|
//QString iinstanceName = ptreeItem->getInstanceName() ;
|
|
|
Line 1449... |
Line 1627... |
/*获得当前节点的clock名字*/
|
/*获得当前节点的clock名字*/
|
int nregBitCount = 0 ;
|
int nregBitCount = 0 ;
|
ptreeItem->getAllRegNum(i.key() ,ichainName, nregBitCount , nbitWidth , pscanChain->getInstanceItemList());
|
ptreeItem->getAllRegNum(i.key() ,ichainName, nregBitCount , nbitWidth , pscanChain->getInstanceItemList());
|
if((!nregBitCount) && (!nbitWidth))
|
if((!nregBitCount) && (!nbitWidth))
|
{
|
{
|
listWindow->addMessage("warning", tr("EziDebug warning: There is no reg with Clock:%1 in the chain:%2").arg(i.key()).arg(ichainName));
|
listWindow->addMessage("warning", tr("EziDebug warning: There is no register with clock:%1 in the chain:%2").arg(i.key()).arg(ichainName));
|
++i;
|
++i;
|
continue ;
|
continue ;
|
}
|
}
|
iregNumMap.insert(i.key(),nbitWidth*currentPrj->getMaxRegNumPerChain()+nregBitCount);
|
iregNumMap.insert(i.key(),nbitWidth*currentPrj->getMaxRegNumPerChain()+nregBitCount);
|
nbitWidth++ ;
|
nbitWidth++ ;
|
Line 1471... |
Line 1649... |
|
|
}
|
}
|
|
|
if(!ichainListStructureMap.count())
|
if(!ichainListStructureMap.count())
|
{
|
{
|
listWindow->addMessage("warning", tr("EziDebug warning: There is no reg in the chain!"));
|
listWindow->addMessage("warning", tr("EziDebug warning: There is no register in the chain!"));
|
delete pscanChain ;
|
delete pscanChain ;
|
|
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
QMessageBox::warning(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
|
|
Line 1489... |
Line 1672... |
QString iclock = ptreeItem->parent()->getModuleClockMap(ptreeItem->getInstanceName()).key(iscanchain.key(),QString());
|
QString iclock = ptreeItem->parent()->getModuleClockMap(ptreeItem->getInstanceName()).key(iscanchain.key(),QString());
|
if(iclock.isEmpty())
|
if(iclock.isEmpty())
|
{
|
{
|
listWindow->addMessage("warning", tr("EziDebug warning: can't find the module %1 's clock ,insert scan chain failed !").arg(ptreeItem->getModuleName()));
|
listWindow->addMessage("warning", tr("EziDebug warning: can't find the module %1 's clock ,insert scan chain failed !").arg(ptreeItem->getModuleName()));
|
delete pscanChain ;
|
delete pscanChain ;
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
EziDebugInstanceTreeItem::SCAN_CHAIN_STRUCTURE * pchainSt = iscanchain.value();
|
EziDebugInstanceTreeItem::SCAN_CHAIN_STRUCTURE * pchainSt = iscanchain.value();
|
pscanChain->setChildChainNum(iclock,pchainSt->m_untotalChainNumber);
|
pscanChain->setChildChainNum(iclock,pchainSt->m_untotalChainNumber);
|
Line 1506... |
Line 1694... |
{
|
{
|
if(pvlgFile->createUserCoreFile(currentPrj))
|
if(pvlgFile->createUserCoreFile(currentPrj))
|
{
|
{
|
delete pscanChain ;
|
delete pscanChain ;
|
listWindow->addMessage("warning", tr("EziDebug error: create EziDebug core error!"));
|
listWindow->addMessage("warning", tr("EziDebug error: create EziDebug core error!"));
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed -- The software interior error!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
else
|
else
|
Line 1540... |
Line 1733... |
if(!(nresult = ptreeItem->insertScanChain(ichainListStructureMap,pscanChain,ptreeItem->getInstanceName())))
|
if(!(nresult = ptreeItem->insertScanChain(ichainListStructureMap,pscanChain,ptreeItem->getInstanceName())))
|
{
|
{
|
if(currentPrj->eliminateLastOperation())
|
if(currentPrj->eliminateLastOperation())
|
{
|
{
|
listWindow->addMessage("error", tr("EziDebug error: delete last chain error!"));
|
listWindow->addMessage("error", tr("EziDebug error: delete last chain error!"));
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed -- The software interior error!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
/*更新上一步操作*/
|
/*更新上一步操作*/
|
Line 1622... |
Line 1820... |
}
|
}
|
|
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
|
|
listWindow->addMessage("info","EziDebug info: Create A New ScanChain!");
|
listWindow->addMessage("info","EziDebug info: Create a new scan chain!");
|
QStandardItem * pitem = listWindow->addMessage("info",tr("The New ScanChain Parameter:"));
|
QStandardItem * pitem = listWindow->addMessage("info",tr("The New ScanChain Parameter:"));
|
listWindow->addMessage("process" , tr(" The chain name: %1").arg(pscanChain->getChainName()),pitem);
|
listWindow->addMessage("process" , tr(" The chain name: %1").arg(pscanChain->getChainName()),pitem);
|
listWindow->addMessage("process" , tr(" The chain topNode: %1").arg(ptreeItem->getNameData()),pitem);
|
listWindow->addMessage("process" , tr(" The chain topNode: %1").arg(ptreeItem->getNameData()),pitem);
|
QString iclockNumStr ;
|
QString iclockNumStr ;
|
QString itraversedInstStr ;
|
QString itraversedInstStr ;
|
Line 1636... |
Line 1834... |
{
|
{
|
iclockNumStr.append(tr("%1 (%2) ").arg(pscanChain->getChainRegCount(iregChainIter.key())).arg(iregChainIter.key()));
|
iclockNumStr.append(tr("%1 (%2) ").arg(pscanChain->getChainRegCount(iregChainIter.key())).arg(iregChainIter.key()));
|
++iregChainIter ;
|
++iregChainIter ;
|
}
|
}
|
|
|
listWindow->addMessage("process" , tr(" The chain total reg number: %1").arg(iclockNumStr),pitem);
|
listWindow->addMessage("process" , tr(" The total register number of chain: %1").arg(iclockNumStr),pitem);
|
|
|
listWindow->addMessage("process" , tr(" The traversed NodeList:"),pitem);
|
listWindow->addMessage("process" , tr(" The traversed NodeList:"),pitem);
|
|
|
for(int j = 0 ; j < pscanChain->getInstanceItemList().count() ;j++)
|
for(int j = 0 ; j < pscanChain->getInstanceItemList().count() ;j++)
|
{
|
{
|
Line 1677... |
Line 1875... |
// "EziDebug_1.0/_EziDebug_TOUT_m.v"
|
// "EziDebug_1.0/_EziDebug_TOUT_m.v"
|
// 单纯修改 restore 文件无效 必须手工添加 工程文件
|
// 单纯修改 restore 文件无效 必须手工添加 工程文件
|
nresult = currentPrj->chkEziDebugFileInvolved() ;
|
nresult = currentPrj->chkEziDebugFileInvolved() ;
|
if(nresult == 0)
|
if(nresult == 0)
|
{
|
{
|
QMessageBox::information(this , QObject::tr("注意") , QObject::tr("请将当前工程路径下EziDebug_v1.0目录下的文件加入到工程中!"));
|
#if 0
|
|
QMessageBox::information(this , QObject::tr("EziDebug") , QObject::tr("请将当前工程路径下EziDebug_v1.0目录下的文件加入到工程中!"));
|
|
#else
|
|
QMessageBox::information(this , QObject::tr("EziDebug") , QObject::tr("Please add the source files under \"EziDebug_v1.0\" directory to your project"
|
|
"Before you synthetize the project!"));
|
|
#endif
|
}
|
}
|
else if(nresult == -1)
|
else if(nresult == -1)
|
{
|
{
|
listWindow->addMessage("error" , tr("EziDebug Error:Please check project file!"));
|
listWindow->addMessage("error" , tr("EziDebug Error:Please check project file!"));
|
}
|
}
|
Line 1692... |
Line 1895... |
|
|
|
|
// 生成 signaltap 文件 或者 cdc 文件
|
// 生成 signaltap 文件 或者 cdc 文件
|
currentPrj->createCfgFile(ptreeItem);
|
currentPrj->createCfgFile(ptreeItem);
|
|
|
listWindow->addMessage("info",tr("EziDebug info: Before you Synthesis the project ,Please "
|
listWindow->addMessage("info",tr("EziDebug info: Before you synthetize the project ,Please "
|
"add the source files under \"EziDebug_v1.0\" directory to your project!"));
|
"add the source files under \"EziDebug_v1.0\" directory to your project!"));
|
|
|
//qDebug() << "add Scan Chain Success !";
|
//qDebug() << "add Scan Chain Success !";
|
|
|
pthread->start();
|
pthread->start();
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链成功!"));
|
QMessageBox::information(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链成功!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain successfully!"));
|
|
#endif
|
|
|
}
|
}
|
else
|
else
|
{
|
{
|
|
|
Line 1761... |
Line 1968... |
|
|
pthread->start();
|
pthread->start();
|
|
|
if(nresult == 2)
|
if(nresult == 2)
|
{
|
{
|
listWindow->addMessage("error" , tr("The top clock is not finded for the clock name is not correspond!"));
|
listWindow->addMessage("error" , tr("The top clock is not found for the clock name is not corresponding!"));
|
|
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
QMessageBox::warning(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
goto ErrorHandle ;
|
goto ErrorHandle ;
|
}
|
}
|
}
|
}
|
Line 1780... |
Line 1993... |
}
|
}
|
|
|
return ;
|
return ;
|
|
|
ErrorHandle:
|
ErrorHandle:
|
|
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
QMessageBox::critical(this, QObject::tr("添加扫描链"),QObject::tr("添加扫描链失败!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Insert scan chain failed!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
|
|
}
|
}
|
|
|
Line 1800... |
Line 2018... |
//qDebug() << "deleteAllChain";
|
//qDebug() << "deleteAllChain";
|
|
|
|
|
if(!currentPrj)
|
if(!currentPrj)
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("工程不存在!"));
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("工程不存在!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("The project is not existed , please set the project parameter first !"));
|
|
#endif
|
return 0 ;
|
return 0 ;
|
}
|
}
|
|
|
// 是否需要更新
|
// 是否需要更新
|
if(isNeededUpdate)
|
if(isNeededUpdate)
|
{
|
{
|
// 提示需要 请快速更新后再进行 操作
|
// 提示需要 请快速更新后再进行 操作
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("检测到有文件被更新,检测到有文件被更新,请更新后再进行删除所有链操作!"));
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("检测到有文件被更新,检测到有文件被更新,请更新后再进行删除所有链操作!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Please update project before you delete all scan chains !"));
|
|
#endif
|
return 0 ;
|
return 0 ;
|
}
|
}
|
else
|
else
|
{
|
{
|
//
|
//
|
UpdateDetectThread *pthread = currentPrj->getThread();
|
UpdateDetectThread *pthread = currentPrj->getThread();
|
pthread->update() ;
|
pthread->update() ;
|
if(isNeededUpdate)
|
if(isNeededUpdate)
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行删除所有链操作!"));
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("检测到有文件被更新,请更新后再进行删除所有链操作!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Please update project before you delete all scan chains !"));
|
|
#endif
|
return 0 ;
|
return 0 ;
|
}
|
}
|
}
|
}
|
|
|
|
|
// 从扫描链 获取所有的 链信息
|
// 从扫描链 获取所有的 链信息
|
ichainTreeItemMap = currentPrj->getChainTreeItemMap() ;
|
ichainTreeItemMap = currentPrj->getChainTreeItemMap() ;
|
|
|
if(!ichainTreeItemMap.size())
|
if(!ichainTreeItemMap.size())
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("不存在任何扫描链!"));
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("不存在任何扫描链!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Delete all scan chain failed -- There is no scan chain!"));
|
|
#endif
|
return 0 ;
|
return 0 ;
|
}
|
}
|
//QMap<QString,EziDebugScanChain*> ichainMap = currentPrj->getScanChainInfo();
|
//QMap<QString,EziDebugScanChain*> ichainMap = currentPrj->getScanChainInfo();
|
|
|
/*成功删除所有链之后 删除上一步操作 备份的文件*/
|
/*成功删除所有链之后 删除上一步操作 备份的文件*/
|
Line 1865... |
Line 2099... |
{
|
{
|
EziDebugInstanceTreeItem * ptreeItem = i.value();
|
EziDebugInstanceTreeItem * ptreeItem = i.value();
|
if(!ptreeItem)
|
if(!ptreeItem)
|
{
|
{
|
pthread->start();
|
pthread->start();
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("删除所有扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("删除所有扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Delete all scan chain failed -- The software interior error!"));
|
|
#endif
|
return 1;
|
return 1;
|
}
|
}
|
|
|
EziDebugScanChain *pchain = ptreeItem->getScanChainInfo();
|
EziDebugScanChain *pchain = ptreeItem->getScanChainInfo();
|
if(!pchain)
|
if(!pchain)
|
{
|
{
|
pthread->start();
|
pthread->start();
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("删除所有扫描链"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("删除所有扫描链"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Delete all scan chain failed -- The software interior error!"));
|
|
#endif
|
return 1;
|
return 1;
|
}
|
}
|
|
|
pchain->backupFileList();
|
pchain->backupFileList();
|
|
|
Line 1982... |
Line 2224... |
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
|
|
// 开启检测更新线程
|
// 开启检测更新线程
|
pthread->start();
|
pthread->start();
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("删除所有扫描链成功!"));
|
QMessageBox::information(this, QObject::tr("删除所有扫描链"),QObject::tr("删除所有扫描链成功!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Delete scan chain successfully!"));
|
|
#endif
|
|
|
return 0 ;
|
return 0 ;
|
|
|
ErrorHandle:
|
ErrorHandle:
|
|
|
Line 2032... |
Line 2279... |
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
|
|
// 开启检测更新线程
|
// 开启检测更新线程
|
pthread->start();
|
pthread->start();
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("删除所有扫描链"),QObject::tr("删除所有扫描链失败!"));
|
QMessageBox::warning(this, QObject::tr("删除所有扫描链"),QObject::tr("删除所有扫描链失败!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("Delete all scan chain failed!"));
|
|
#endif
|
|
|
return 1 ;
|
return 1 ;
|
}
|
}
|
|
|
void ToolWindow::testbenchGeneration()
|
void ToolWindow::testbenchGeneration()
|
Line 2064... |
Line 2315... |
QString iresetSigVal ;
|
QString iresetSigVal ;
|
|
|
|
|
if(!currentPrj)
|
if(!currentPrj)
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("工程不存在,请进行设置工程参数并进行扫描!"));
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("工程不存在,请进行设置工程参数并进行扫描!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("The project is not existed , please set the project parameter !"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
if(!currentPrj->getScanChainInfo().count())
|
if(!currentPrj->getScanChainInfo().count())
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("不存在任何扫描链!"));
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("不存在任何扫描链!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("There is no scan chain in project!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
//QMessageBox::information(this, QObject::tr("undo 操作"),QObject::tr("目前只支持对相邻的上一步操作的取消!"));
|
//QMessageBox::information(this, QObject::tr("undo 操作"),QObject::tr("目前只支持对相邻的上一步操作的取消!"));
|
//undoOperation();
|
//undoOperation();
|
Line 2094... |
Line 2353... |
QString ifileName = ifileMap.value(i);
|
QString ifileName = ifileMap.value(i);
|
if(currentPrj->getToolType() == EziDebugPrj::ToolIse)
|
if(currentPrj->getToolType() == EziDebugPrj::ToolIse)
|
{
|
{
|
if(!ifileName.endsWith(".prn"))
|
if(!ifileName.endsWith(".prn"))
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("数据文件格式不正确!"));
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("数据文件格式不正确!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("The data file type is not correct!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
else if(currentPrj->getToolType() == EziDebugPrj::ToolQuartus)
|
else if(currentPrj->getToolType() == EziDebugPrj::ToolQuartus)
|
{
|
{
|
if(!ifileName.endsWith(".txt"))
|
if(!ifileName.endsWith(".txt"))
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("数据文件格式不正确!"));
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("数据文件格式不正确!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("The data file type is not correct!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
else
|
else
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("工具软件类型不正确!"));
|
QMessageBox::warning(this, QObject::tr("生成testBench"),QObject::tr("工具软件类型不正确!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("The tool type is not correct!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
idataFileNameList.append(ifileName);
|
idataFileNameList.append(ifileName);
|
}
|
}
|
}
|
}
|
Line 2124... |
Line 2394... |
idataDialg->getResetSig(iresetPortName,eresetType,iresetSigVal);
|
idataDialg->getResetSig(iresetPortName,eresetType,iresetSigVal);
|
|
|
EziDebugScanChain *pchain = currentPrj->getScanChainInfo().value(idataDialg->getChainName(),NULL);
|
EziDebugScanChain *pchain = currentPrj->getScanChainInfo().value(idataDialg->getChainName(),NULL);
|
if(!pchain)
|
if(!pchain)
|
{
|
{
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("生成testBench"),QObject::tr("%1 不存在!").arg(idataDialg->getChainName()));
|
QMessageBox::critical(this, QObject::tr("生成testBench"),QObject::tr("%1 不存在!").arg(idataDialg->getChainName()));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("The scan chain \"%1\" is not existed!").arg(idataDialg->getChainName()));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
EziDebugInstanceTreeItem * pitem = currentPrj->getChainTreeItemMap().value(ichainName ,NULL);
|
EziDebugInstanceTreeItem * pitem = currentPrj->getChainTreeItemMap().value(ichainName ,NULL);
|
if(!pitem)
|
if(!pitem)
|
{
|
{
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("生成testBench"),QObject::tr("%1 对应的节点不存在!").arg(idataDialg->getChainName()));
|
QMessageBox::critical(this, QObject::tr("生成testBench"),QObject::tr("%1 对应的节点不存在!").arg(idataDialg->getChainName()));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("The node \"%1\" is not existed!").arg(idataDialg->getChainName()));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
listWindow->addMessage("info","EziDebug info: Generate TestBench !");
|
listWindow->addMessage("info","EziDebug info: Generating TestBench !");
|
QStandardItem * pmessageitem = listWindow->addMessage("info","EziDebug info: The input and output parameter as follows:");
|
QStandardItem * pmessageitem = listWindow->addMessage("info","EziDebug info: The input and output parameters are as follows:");
|
listWindow->addMessage("process",tr("%1ChainName: %2").arg(tr(" ").repeated(6)).arg(ichainName),pmessageitem);
|
listWindow->addMessage("process",tr("%1ChainName: %2").arg(tr(" ").repeated(6)).arg(ichainName),pmessageitem);
|
|
|
for(int j = 0 ; j < idataFileNameList.count() ; j++)
|
for(int j = 0 ; j < idataFileNameList.count() ; j++)
|
{
|
{
|
QString ifileName = idataFileNameList.at(j) ;
|
QString ifileName = idataFileNameList.at(j) ;
|
Line 2417... |
Line 2696... |
|
|
pthread->start();
|
pthread->start();
|
|
|
qDebug() << "Generate testBench finish !" << __LINE__ ;
|
qDebug() << "Generate testBench finish !" << __LINE__ ;
|
|
|
listWindow->addMessage("info","EziDebug info: Finish generate testBench file!");
|
listWindow->addMessage("info","EziDebug info: Finishing generating testBench file!");
|
|
|
|
|
|
|
// 释放内存
|
// 释放内存
|
// malloc 用 free 释放
|
// malloc 用 free 释放
|
Line 2478... |
Line 2757... |
free((char*)pregChain);
|
free((char*)pregChain);
|
pregChain = NULL ;
|
pregChain = NULL ;
|
}
|
}
|
}
|
}
|
|
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("生成testBench"),QObject::tr("testBench生成完毕!"));
|
QMessageBox::information(this, QObject::tr("生成testBench"),QObject::tr("testBench生成完毕!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("The testbench is generated successfully!"));
|
|
#endif
|
|
|
}
|
}
|
else
|
else
|
{
|
{
|
qDebug() << "do nothing!" ;
|
qDebug() << "do nothing!" ;
|
Line 2576... |
Line 2859... |
// testbenchGenerationButton->setToolTip(tr("testbench生成"));
|
// testbenchGenerationButton->setToolTip(tr("testbench生成"));
|
|
|
|
|
|
|
//工具栏按钮
|
//工具栏按钮
|
proSettingButton = createToolButton(tr("工程设置"),
|
//tr("工程设置")
|
|
proSettingButton = createToolButton(tr("Project parameter settings "),
|
tr(":/images/projectSetting.bmp"),
|
tr(":/images/projectSetting.bmp"),
|
QSize(42, 41),
|
QSize(42, 41),
|
this,
|
this,
|
SLOT(proSetting()));
|
SLOT(proSetting()));
|
|
// tr("更新")
|
proUpdateButton = createToolButton(tr("更新"),
|
proUpdateButton = createToolButton(tr("Update"),
|
tr(":/images/projectUpdate.bmp"),
|
tr(":/images/projectUpdate.bmp"),
|
QSize(42, 41),
|
QSize(42, 41),
|
this,
|
this,
|
SLOT(proUpdate()));
|
SLOT(proUpdate()));
|
|
|
proPartlyUpdateButton = createToolButton(tr("部分更新"),
|
// tr("部分更新")
|
|
proPartlyUpdateButton = createToolButton(tr("Update fast"),
|
tr(":/images/projectPartlyUpdate.bmp"),
|
tr(":/images/projectPartlyUpdate.bmp"),
|
QSize(42, 41),
|
QSize(42, 41),
|
this,
|
this,
|
SLOT(fastUpdate()));
|
SLOT(fastUpdate()));
|
|
|
deleteChainButton = createToolButton(tr("删除"),
|
// tr("删除")
|
|
deleteChainButton = createToolButton(tr("Delete all scan chain"),
|
tr(":/images/deleteChain.bmp"),
|
tr(":/images/deleteChain.bmp"),
|
QSize(42, 41),
|
QSize(42, 41),
|
this,
|
this,
|
SLOT(deleteAllChain()));
|
SLOT(deleteAllChain()));
|
|
|
testbenchGenerationButton = createToolButton(tr("Testbench生成"),
|
// tr("Testbench生成")
|
|
testbenchGenerationButton = createToolButton(tr("Testbench Generation "),
|
tr(":/images/testbenchGeneration.bmp"),
|
tr(":/images/testbenchGeneration.bmp"),
|
QSize(42, 41),
|
QSize(42, 41),
|
this,
|
this,
|
SLOT(testbenchGeneration()));
|
SLOT(testbenchGeneration()));
|
|
// tr("撤消")
|
proUndoButton = createToolButton(tr("撤消"),
|
proUndoButton = createToolButton(tr("Undo"),
|
tr(":/images/undo.bmp"),
|
tr(":/images/undo.bmp"),
|
QSize(42, 41),
|
QSize(42, 41),
|
this,
|
this,
|
SLOT(undoOperation()));
|
SLOT(undoOperation()));
|
|
|
|
|
//右上角标题栏按钮
|
//右上角标题栏按钮
|
minimizeButton = createToolButton(tr("最小化"),
|
// tr("最小化")
|
|
minimizeButton = createToolButton(tr("Minimize"),
|
tr(":/images/ToolWindowminimize.bmp"),
|
tr(":/images/ToolWindowminimize.bmp"),
|
QSize(27, 19),
|
QSize(27, 19),
|
this,
|
this,
|
SLOT(minimize()));
|
SLOT(minimize()));
|
|
|
miniModeButton = createToolButton(tr("迷你模式"),
|
// tr("迷你模式")
|
|
miniModeButton = createToolButton(tr("Mini mode"),
|
tr(":/images/ToolWindowNormal.bmp"),
|
tr(":/images/ToolWindowNormal.bmp"),
|
QSize(27, 19),
|
QSize(27, 19),
|
this,
|
this,
|
SLOT(toMiniMode()));
|
SLOT(toMiniMode()));
|
|
// tr("完整模式")
|
showListWindowButton = createToolButton(tr("完整模式"),
|
showListWindowButton = createToolButton(tr("Normal mode"),
|
tr(":/images/showListWindow.bmp"),
|
tr(":/images/showListWindow.bmp"),
|
QSize(27, 19),
|
QSize(27, 19),
|
this,
|
this,
|
SLOT(showListWindow()));
|
SLOT(showListWindow()));
|
|
|
exitButton = createToolButton(tr("退出"),
|
// tr("退出")
|
|
exitButton = createToolButton(tr("Quit"),
|
tr(":/images/ToolWindowExit.bmp"),
|
tr(":/images/ToolWindowExit.bmp"),
|
QSize(33, 19),
|
QSize(33, 19),
|
this,
|
this,
|
SLOT(close()));
|
SLOT(close()));
|
|
|
|
|
}
|
}
|
|
|
void ToolWindow::createActions()
|
void ToolWindow::createActions()
|
{
|
{
|
|
#if 0
|
exitAct = new QAction(tr("退 出"), this);
|
exitAct = new QAction(tr("退 出"), this);
|
|
#else
|
|
exitAct = new QAction(tr("Quit"), this);
|
|
#endif
|
|
|
exitAct->setShortcuts(QKeySequence::Quit);
|
exitAct->setShortcuts(QKeySequence::Quit);
|
//exitAct->setStatusTip(tr("退出"));
|
//exitAct->setStatusTip(tr("退出"));
|
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
|
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
|
|
|
|
#if 0
|
minimizeAct = new QAction(tr("最小化"), this);
|
minimizeAct = new QAction(tr("最小化"), this);
|
|
#else
|
|
minimizeAct = new QAction(tr("Minimize"), this);
|
|
#endif
|
//minimizeAct->setShortcuts(QKeySequence::);
|
//minimizeAct->setShortcuts(QKeySequence::);
|
//minimizeAct->setStatusTip(tr("Exit the application"));
|
//minimizeAct->setStatusTip(tr("Exit the application"));
|
connect(minimizeAct, SIGNAL(triggered()), this, SLOT(minimize()));
|
connect(minimizeAct, SIGNAL(triggered()), this, SLOT(minimize()));
|
|
|
|
#if 0
|
toMiniModeAct = new QAction(tr("迷你模式"), this);
|
toMiniModeAct = new QAction(tr("迷你模式"), this);
|
|
#else
|
|
toMiniModeAct = new QAction(tr("Mini mode"), this);
|
|
#endif
|
//normalAct->setShortcuts(QKeySequence::Quit);
|
//normalAct->setShortcuts(QKeySequence::Quit);
|
//normalAct->setStatusTip(tr("Exit the application"));
|
//normalAct->setStatusTip(tr("Exit the application"));
|
connect(toMiniModeAct, SIGNAL(triggered()), this, SLOT(toMiniMode()));
|
connect(toMiniModeAct, SIGNAL(triggered()), this, SLOT(toMiniMode()));
|
|
|
|
#if 0
|
aboutAct = new QAction(tr("关 于..."),this);
|
aboutAct = new QAction(tr("关 于..."),this);
|
|
#else
|
|
aboutAct = new QAction(tr("About..."),this);
|
|
#endif
|
connect(aboutAct,SIGNAL(triggered()),this,SLOT(about()));
|
connect(aboutAct,SIGNAL(triggered()),this,SLOT(about()));
|
|
|
|
#if 0
|
helpAct = new QAction(tr("帮 助"),this);
|
helpAct = new QAction(tr("帮 助"),this);
|
|
#else
|
|
helpAct = new QAction(tr("Help"),this);
|
|
#endif
|
connect(helpAct,SIGNAL(triggered()),this,SLOT(help()));
|
connect(helpAct,SIGNAL(triggered()),this,SLOT(help()));
|
|
|
}
|
}
|
|
|
//创建系统托盘的右键菜单
|
//创建系统托盘的右键菜单
|
void ToolWindow::CreatTrayMenu()
|
void ToolWindow::CreatTrayMenu()
|
{
|
{
|
|
#if 0
|
miniSizeAction = new QAction(tr("最小化"),this);
|
miniSizeAction = new QAction(tr("最小化"),this);
|
maxSizeAction = new QAction(tr("最大化"),this);
|
maxSizeAction = new QAction(tr("最大化"),this);
|
restoreWinAction = new QAction(tr("还 原"),this);
|
restoreWinAction = new QAction(tr("还 原"),this);
|
quitAction = new QAction(tr("退 出"),this);
|
quitAction = new QAction(tr("退 出"),this);
|
aboutAction = new QAction(tr("关 于..."),this);
|
aboutAction = new QAction(tr("关 于..."),this);
|
helpAction = new QAction(tr("帮 助"),this);
|
helpAction = new QAction(tr("帮 助"),this);
|
|
#else
|
|
miniSizeAction = new QAction(tr("Minimize"),this);
|
|
maxSizeAction = new QAction(tr("Maximize"),this);
|
|
restoreWinAction = new QAction(tr("Resume to normal mode"),this);
|
|
quitAction = new QAction(tr("Quit"),this);
|
|
aboutAction = new QAction(tr("About..."),this);
|
|
helpAction = new QAction(tr("Help"),this);
|
|
#endif
|
|
|
this->connect(miniSizeAction,SIGNAL(triggered()),this,SLOT(minimize()));
|
this->connect(miniSizeAction,SIGNAL(triggered()),this,SLOT(minimize()));
|
this->connect(maxSizeAction,SIGNAL(triggered()),this,SLOT(showMaximized()));
|
this->connect(maxSizeAction,SIGNAL(triggered()),this,SLOT(showMaximized()));
|
this->connect(restoreWinAction,SIGNAL(triggered()),this,SLOT(showNormal()));
|
this->connect(restoreWinAction,SIGNAL(triggered()),this,SLOT(showNormal()));
|
this->connect(quitAction,SIGNAL(triggered()),qApp,SLOT(quit()));
|
this->connect(quitAction,SIGNAL(triggered()),qApp,SLOT(quit()));
|
Line 2836... |
Line 3156... |
void ToolWindow::readSetting()
|
void ToolWindow::readSetting()
|
{
|
{
|
int nparameterFlag = PARAMETER_OK ;
|
int nparameterFlag = PARAMETER_OK ;
|
UpdateDetectThread * pthread = NULL ;
|
UpdateDetectThread * pthread = NULL ;
|
EziDebugPrj::TOOL etool = EziDebugPrj::ToolOther ;
|
EziDebugPrj::TOOL etool = EziDebugPrj::ToolOther ;
|
QSettings isettings("Eda Center.", "EziDebug");
|
QSettings isettings("EDA Center.", "EziDebug");
|
// 获取工程参数,如果有就创建工程对象;没有的话,不创建
|
// 获取工程参数,如果有就创建工程对象;没有的话,不创建
|
isettings.beginGroup("project");
|
isettings.beginGroup("project");
|
unsigned int unMaxRegNum = isettings.value("MaxRegNum").toInt();
|
unsigned int unMaxRegNum = isettings.value("MaxRegNum").toInt();
|
QString idir = isettings.value("dir").toString();
|
QString idir = isettings.value("dir").toString();
|
QString itool = isettings.value("tool").toString();
|
QString itool = isettings.value("tool").toString();
|
Line 2891... |
Line 3211... |
goto Parameter_incomplete ;
|
goto Parameter_incomplete ;
|
}
|
}
|
else
|
else
|
{
|
{
|
//上一次保存的参数 不完整或者不正确
|
//上一次保存的参数 不完整或者不正确
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("读取软件使用信息"),QObject::tr("参数错误!"));
|
QMessageBox::information(this, QObject::tr("读取软件使用信息"),QObject::tr("参数错误!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("There were parameter errors when reading software using information !"));
|
|
#endif
|
goto Parameter_incomplete ;
|
goto Parameter_incomplete ;
|
}
|
}
|
}
|
}
|
|
|
currentPrj = new EziDebugPrj(unMaxRegNum,idir,etool,this) ;
|
currentPrj = new EziDebugPrj(unMaxRegNum,idir,etool,this) ;
|
Line 2939... |
Line 3263... |
isXilinxERRChecked = currentPrj->getSoftwareXilinxErrCheckedFlag() ;
|
isXilinxERRChecked = currentPrj->getSoftwareXilinxErrCheckedFlag() ;
|
}
|
}
|
#endif
|
#endif
|
|
|
qDebug() << "Attention: Begin to writtingSetting!" ;
|
qDebug() << "Attention: Begin to writtingSetting!" ;
|
QSettings isettings("Eda Center.", "EziDebug");
|
QSettings isettings("EDA Center.", "EziDebug");
|
// 获取工程参数,如果有就创建工程对象;没有的话,不创建
|
// 获取工程参数,如果有就创建工程对象;没有的话,不创建
|
isettings.beginGroup("project");
|
isettings.beginGroup("project");
|
isettings.setValue("MaxRegNum",unMaxRegNum);
|
isettings.setValue("MaxRegNum",unMaxRegNum);
|
isettings.setValue("dir",idir);
|
isettings.setValue("dir",idir);
|
isettings.setValue("tool",itool);
|
isettings.setValue("tool",itool);
|
Line 2957... |
Line 3281... |
void ToolWindow::closeEvent(QCloseEvent *event)
|
void ToolWindow::closeEvent(QCloseEvent *event)
|
{
|
{
|
myTrayIcon->hide(); //test
|
myTrayIcon->hide(); //test
|
if (myTrayIcon->isVisible())
|
if (myTrayIcon->isVisible())
|
{
|
{
|
myTrayIcon->showMessage("EziDebug", "Hi,This is my EziDebug.",QSystemTrayIcon::Information,5000);
|
myTrayIcon->showMessage("EziDebug", "EziDebug.",QSystemTrayIcon::Information,5000);
|
|
|
hide(); //最小化
|
hide(); //最小化
|
event->ignore();
|
event->ignore();
|
}
|
}
|
else
|
else
|
Line 3038... |
Line 3362... |
QList<EziDebugPrj::LOG_FILE_INFO*> iaddedinfoList ;
|
QList<EziDebugPrj::LOG_FILE_INFO*> iaddedinfoList ;
|
QList<EziDebugPrj::LOG_FILE_INFO*> ideletedinfoList ;
|
QList<EziDebugPrj::LOG_FILE_INFO*> ideletedinfoList ;
|
|
|
if(!currentPrj)
|
if(!currentPrj)
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("快速更新"),QObject::tr("您所指定的工程不存在!"));
|
QMessageBox::warning(this, QObject::tr("快速更新"),QObject::tr("您所指定的工程不存在!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("The project is not existed!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
|
|
if(!isNeededUpdate)
|
if(!isNeededUpdate)
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("快速更新"),QObject::tr("无文件可更新!"));
|
QMessageBox::information(this, QObject::tr("快速更新"),QObject::tr("无文件可更新!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("There is no updated file in project!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
progressBar->setValue(2);
|
progressBar->setValue(2);
|
|
|
Line 3071... |
Line 3403... |
|
|
progressBar->setValue(10);
|
progressBar->setValue(10);
|
|
|
if(currentPrj->updatePrjAllFile(iaddFileList,idelFileList,ichgFileList,iaddedinfoList,ideletedinfoList,true))
|
if(currentPrj->updatePrjAllFile(iaddFileList,idelFileList,ichgFileList,iaddedinfoList,ideletedinfoList,true))
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("快速更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::warning(this, QObject::tr("快速更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("Fast update failed -- The software interior error!"));
|
|
#endif
|
|
|
/*重启更新线程*/
|
/*重启更新线程*/
|
pthread->start();
|
pthread->start();
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
Line 3089... |
Line 3425... |
|
|
QString itopModuleComboName = itopModule + QObject::tr(":")+ itopModule ;
|
QString itopModuleComboName = itopModule + QObject::tr(":")+ itopModule ;
|
EziDebugInstanceTreeItem* pnewHeadItem = new EziDebugInstanceTreeItem(itopModule,itopModule);
|
EziDebugInstanceTreeItem* pnewHeadItem = new EziDebugInstanceTreeItem(itopModule,itopModule);
|
if(!pnewHeadItem)
|
if(!pnewHeadItem)
|
{
|
{
|
|
#if 0
|
QMessageBox::critical(this, QObject::tr("快速更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::critical(this, QObject::tr("快速更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::critical(this, QObject::tr("EziDebug"),QObject::tr("Fast update failed -- The software interior error!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
progressBar->setValue(50);
|
progressBar->setValue(50);
|
|
|
Line 3102... |
Line 3442... |
qDebug() << tr("快速更新失败") << __FILE__ << __LINE__ ;
|
qDebug() << tr("快速更新失败") << __FILE__ << __LINE__ ;
|
delete pnewHeadItem ;
|
delete pnewHeadItem ;
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
pthread->start();
|
pthread->start();
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("快速更新失败"),QObject::tr("软件内部错误!"));
|
QMessageBox::warning(this, QObject::tr("快速更新失败"),QObject::tr("软件内部错误!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("Fast update failed -- The software interior error!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
progressBar->setValue(70);
|
progressBar->setValue(70);
|
|
|
Line 3133... |
Line 3477... |
}
|
}
|
listWindow->addMessage("warning",ichain);
|
listWindow->addMessage("warning",ichain);
|
}
|
}
|
|
|
// 扫描链被破坏 ,提示删除
|
// 扫描链被破坏 ,提示删除
|
|
#if 0
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("是否删除相关扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) ;
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("部分扫描链被破坏"), tr("是否删除相关扫描链代码"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) ;
|
|
#else
|
|
QMessageBox::StandardButton rb = QMessageBox::question(this, tr("EziDebug"), tr("some scan chains has been destroyed, \n Do you want to delete all scan chain code?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) ;
|
|
#endif
|
|
|
if(rb == QMessageBox::Yes)
|
if(rb == QMessageBox::Yes)
|
{
|
{
|
QStringList iunDelChainList = currentPrj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
QStringList iunDelChainList = currentPrj->deleteDestroyedChain(iaddedinfoList,ideletedinfoList) ;
|
if(iunDelChainList.count())
|
if(iunDelChainList.count())
|
{
|
{
|
listWindow->addMessage("error","EziDebug error: Some chains do not be deleted for some reasons!");
|
listWindow->addMessage("error","EziDebug error: Some chains can not be deleted for some reasons!");
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
for(int i = 0 ; i < iunDelChainList.count() ;i++)
|
{
|
{
|
listWindow->addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
listWindow->addMessage("error",tr("EziDebug chain:%1").arg(iunDelChainList.at(i)));
|
}
|
}
|
listWindow->addMessage("error","EziDebug error: Please check the code file is compiled successed!");
|
listWindow->addMessage("error","EziDebug error: Please check the code file is compiled successed!");
|
Line 3248... |
Line 3597... |
/*重启更新线程*/
|
/*重启更新线程*/
|
pthread->start();
|
pthread->start();
|
|
|
progressBar->setValue(100);
|
progressBar->setValue(100);
|
|
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("快速更新"),QObject::tr("快速更新完毕!"));
|
QMessageBox::warning(this, QObject::tr("快速更新"),QObject::tr("快速更新完毕!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Fast update completed!"));
|
|
#endif
|
|
|
progressBar->setValue(0);
|
progressBar->setValue(0);
|
|
|
}
|
}
|
|
|
Line 3270... |
Line 3623... |
bool isstopFlag = false ;
|
bool isstopFlag = false ;
|
int i = 0 ;
|
int i = 0 ;
|
|
|
if(!currentPrj)
|
if(!currentPrj)
|
{
|
{
|
|
#if 0
|
QMessageBox::warning(this, QObject::tr("撤销上一步操作"),QObject::tr("您所指定的工程不存在!"));
|
QMessageBox::warning(this, QObject::tr("撤销上一步操作"),QObject::tr("您所指定的工程不存在!"));
|
|
#else
|
|
QMessageBox::warning(this, QObject::tr("EziDebug"),QObject::tr("The project is not existed!"));
|
|
#endif
|
return ;
|
return ;
|
}
|
}
|
|
|
// 停止检测更新 退出线程
|
// 停止检测更新 退出线程
|
pthread = currentPrj->getThread() ;
|
pthread = currentPrj->getThread() ;
|
Line 3291... |
Line 3648... |
// 删除链相关的指针对象
|
// 删除链相关的指针对象
|
EziDebugScanChain *plastOperatedChain = currentPrj->getLastOperateChain() ;
|
EziDebugScanChain *plastOperatedChain = currentPrj->getLastOperateChain() ;
|
if(!plastOperatedChain)
|
if(!plastOperatedChain)
|
{
|
{
|
/*提示 无扫描链*/
|
/*提示 无扫描链*/
|
QMessageBox::information(this, QObject::tr("undo"),QObject::tr("上一步操作的扫描链不存在!"));
|
#if 0
|
|
QMessageBox::information(this, QObject::tr("undo 失败"),QObject::tr("上一步操作的扫描链不存在!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("There is no scan chain in last operation!"));
|
|
#endif
|
pthread->start();
|
pthread->start();
|
return ;
|
return ;
|
}
|
}
|
|
|
|
|
Line 3319... |
Line 3680... |
+ ieziDebugFileSuffix;
|
+ ieziDebugFileSuffix;
|
QFile ibackupFile(ibackupFileName) ;
|
QFile ibackupFile(ibackupFileName) ;
|
|
|
if(!ibackupFile.exists())
|
if(!ibackupFile.exists())
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("undo"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
QMessageBox::information(this, QObject::tr("undo"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Undo failed ,there is no backup file \"%1\"").arg(ibackupFileName));
|
|
#endif
|
pthread->start();
|
pthread->start();
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
|
|
Line 3344... |
Line 3709... |
+ ieziDebugFileSuffix;
|
+ ieziDebugFileSuffix;
|
QFile ibackupFile(ibackupFileName) ;
|
QFile ibackupFile(ibackupFileName) ;
|
|
|
if(!ibackupFile.exists())
|
if(!ibackupFile.exists())
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("undo失败"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
QMessageBox::information(this, QObject::tr("undo失败"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Undo failed ,there is no backup file \"%1\"!").arg(ibackupFileName));
|
|
#endif
|
pthread->start();
|
pthread->start();
|
return ;
|
return ;
|
}
|
}
|
|
|
// 文件被修改了 需要重新保存文件日期
|
// 文件被修改了 需要重新保存文件日期
|
Line 3454... |
Line 3823... |
+ EziDebugScanChain::getUserDir() + QObject::tr("/") + ifileInfo.fileName() \
|
+ EziDebugScanChain::getUserDir() + QObject::tr("/") + ifileInfo.fileName() \
|
+ ieziDebugFileSuffix;
|
+ ieziDebugFileSuffix;
|
QFile ibackupFile(ibackupFileName) ;
|
QFile ibackupFile(ibackupFileName) ;
|
if(!ibackupFile.exists())
|
if(!ibackupFile.exists())
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("undo失败"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
QMessageBox::information(this, QObject::tr("undo失败"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Undo failed , there is no backup file \"%1\"!").arg(ibackupFileName));
|
|
#endif
|
pthread->start();
|
pthread->start();
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
|
|
Line 3564... |
Line 3937... |
+ EziDebugScanChain::getUserDir()+ QObject::tr("/") + ifileInfo.fileName() \
|
+ EziDebugScanChain::getUserDir()+ QObject::tr("/") + ifileInfo.fileName() \
|
+ ieziDebugFileSuffix;
|
+ ieziDebugFileSuffix;
|
QFile ibackupFile(ibackupFileName) ;
|
QFile ibackupFile(ibackupFileName) ;
|
if(!ibackupFile.exists())
|
if(!ibackupFile.exists())
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("undo失败"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
QMessageBox::information(this, QObject::tr("undo失败"),QObject::tr("备份文件%1不存在!").arg(ibackupFileName));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("Undo failed , there is no backup file \"%1\" !").arg(ibackupFileName));
|
|
#endif
|
pthread->start();
|
pthread->start();
|
return ;
|
return ;
|
}
|
}
|
}
|
}
|
++i ;
|
++i ;
|
Line 3657... |
Line 4034... |
// 上一步操作相关对象 置空
|
// 上一步操作相关对象 置空
|
currentPrj->updateOperation(EziDebugPrj::OperateTypeNone,NULL,NULL);
|
currentPrj->updateOperation(EziDebugPrj::OperateTypeNone,NULL,NULL);
|
}
|
}
|
else
|
else
|
{
|
{
|
|
#if 0
|
QMessageBox::information(this , QObject::tr("注意") , QObject::tr("上一步无操作!"));
|
QMessageBox::information(this , QObject::tr("注意") , QObject::tr("上一步无操作!"));
|
|
#else
|
|
QMessageBox::information(this , QObject::tr("EziDebug") , QObject::tr("Note: there is no last operation!"));
|
|
#endif
|
|
|
if(isstopFlag == true)
|
if(isstopFlag == true)
|
{
|
{
|
pthread->start();
|
pthread->start();
|
}
|
}
|
Line 3670... |
Line 4051... |
|
|
// 90%
|
// 90%
|
if(currentPrj->changedLogFile(iaddedinfoList,ideletedinfoList))
|
if(currentPrj->changedLogFile(iaddedinfoList,ideletedinfoList))
|
{
|
{
|
// 提示 保存 log 文件出错
|
// 提示 保存 log 文件出错
|
qDebug() << tr("Error:Save log file Error in undo operation!") ;
|
qDebug() << tr("Error:Save log file error in undo operation!") ;
|
}
|
}
|
|
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(ideletedinfoList);
|
qDeleteAll(iaddedinfoList);
|
qDeleteAll(iaddedinfoList);
|
|
|
Line 3682... |
Line 4063... |
{
|
{
|
pthread->start();
|
pthread->start();
|
}
|
}
|
|
|
// 100%
|
// 100%
|
|
#if 0
|
QMessageBox::information(this, QObject::tr("undo操作"),QObject::tr("撤销上一步操作完毕!"));
|
QMessageBox::information(this, QObject::tr("undo操作"),QObject::tr("撤销上一步操作完毕!"));
|
|
#else
|
|
QMessageBox::information(this, QObject::tr("EziDebug"),QObject::tr("The last operation is undo successfully!"));
|
|
#endif
|
|
|
return ;
|
return ;
|
}
|
}
|
|
|
void ToolWindow::changeUpdatePic()
|
void ToolWindow::changeUpdatePic()
|
Line 3740... |
Line 4125... |
}
|
}
|
|
|
//关于
|
//关于
|
void ToolWindow::about()
|
void ToolWindow::about()
|
{
|
{
|
|
#if 0
|
QMessageBox::about(this, tr("关于"), tr(" 版权由中科院EDA中心所有 \n\n"));
|
QMessageBox::about(this, tr("关于"), tr(" 版权由中科院EDA中心所有 \n\n"));
|
|
#else
|
|
QMessageBox::about(this,tr("About EziDebug"),tr(" EziDebug CopyRight(c) 2013-2018 by EziGroup. \n\n"));
|
|
#endif
|
|
|
}
|
}
|
|
|
//帮助
|
//帮助
|
void ToolWindow::help()
|
void ToolWindow::help()
|
Line 3804... |
Line 4193... |
restoreWinAction->setDisabled(false);
|
restoreWinAction->setDisabled(false);
|
}
|
}
|
}
|
}
|
break;
|
break;
|
case QSystemTrayIcon::MiddleClick:
|
case QSystemTrayIcon::MiddleClick:
|
myTrayIcon->showMessage("EziDebug", "Hi,This is my EziDebug.",QSystemTrayIcon::Information,10000);
|
myTrayIcon->showMessage("EziDebug", "EziDebug.",QSystemTrayIcon::Information,10000);
|
break;
|
break;
|
|
|
default:
|
default:
|
break;
|
break;
|
}
|
}
|