Skip to content

Commit

Permalink
gp4par: Removed spurious "net has no load" warnings for infrred GP_AC…
Browse files Browse the repository at this point in the history
…MP blocks. Fixes #42.
azonenberg committed Oct 19, 2016
1 parent 2688af6 commit f3ead16
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gp4par/make_graphs.cpp
Original file line number Diff line number Diff line change
@@ -251,6 +251,9 @@ void InferExtraNodes(
acmp_id ++);
acmp->m_name = tmp;

//Set a special attribute so that we don't give a "has no loads" warning
acmp->m_attributes["__IGNORE__NOLOAD__"] = "1";

//Add the cell to the module
module->AddCell(acmp);

5 changes: 5 additions & 0 deletions src/gp4par/par_main.cpp
Original file line number Diff line number Diff line change
@@ -117,6 +117,11 @@ bool PostPARDRC(PARGraph* netlist, Greenpak4Device* device)
if( (cell != NULL) && ( (cell->m_type == "GP_IOBUF") || (cell->m_type == "GP_OBUF") ) )
continue;

//If we have a magic attribute set, it's OK
//(for example, inferred ACMP for a VREF we used for another purpose)
if(cell->HasAttribute("__IGNORE__NOLOAD__"))
continue;

//If we have no loads, warn
if(node->GetEdgeCount() == 0)
{
3 changes: 3 additions & 0 deletions src/greenpak4/Greenpak4NetlistCell.h
Original file line number Diff line number Diff line change
@@ -47,6 +47,9 @@ class Greenpak4NetlistCell : public Greenpak4NetlistEntity
bool HasParameter(std::string att)
{ return m_parameters.find(att) != m_parameters.end(); }

bool HasAttribute(std::string att)
{ return m_attributes.find(att) != m_attributes.end(); }

//Indicates whether the cell is an I/O buffer
bool IsIOB()
{ return (m_type == "GP_IBUF") || (m_type == "GP_IOBUF") || (m_type == "GP_OBUF") || (m_type == "GP_OBUFT"); }

0 comments on commit f3ead16

Please sign in to comment.