Skip to content

When compiling ace there is a failure about a printf statement #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mithro opened this issue Jun 26, 2018 · 1 comment
Closed

When compiling ace there is a failure about a printf statement #369

mithro opened this issue Jun 26, 2018 · 1 comment

Comments

@mithro
Copy link
Contributor

mithro commented Jun 26, 2018

The following function fails to compile if -D__STDC_FORMAT_MACROS is not added to the compiler flags;

void print_node_bdd(Abc_Ntk_t * ntk) {
	Abc_Obj_t * obj;
	int i;

	Abc_NtkForEachNode(ntk, obj, i)
	{
		DdNode * node = (DdNode*) obj->pData;

		printf("Object: %d\n", obj->Id);
		fflush(0);
		//printf("Fanin: %d\n", Abc_ObjFaninNum(obj)); fflush(0);
		while (1) {
			if (node == Cudd_ReadOne((DdManager*)ntk->pManFunc)) {
				//printf("one!\n");
				break;
			} else if (node == Cudd_ReadLogicZero((DdManager*)ntk->pManFunc)) {
				//printf("zero!\n");
				break;
			}

			printf("\tVar: %hd (%08" PRIXPTR ")\n", Cudd_Regular(node)->index,
					(uintptr_t) node);
			fflush(0);

			DdNode * first_node;
			DdGen* gen = Cudd_FirstNode((DdManager*) ntk->pManFunc, node, &first_node);
            Cudd_GenFree(gen);
			node = Cudd_E(node);

		}
	}
}

See https://github.com/mozilla/rr/blob/master/CMakeLists.txt#L45 and tensorflow/tensorflow#12998 (comment)

@mithro
Copy link
Contributor Author

mithro commented Jun 26, 2018

The issue is the PRIXPTR define ends up missing...

mithro added a commit to mithro/vtr-verilog-to-routing that referenced this issue Jun 26, 2018
kmurray pushed a commit that referenced this issue Jun 27, 2018
litghost added a commit to litghost/vtr-verilog-to-routing that referenced this issue Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant