-
Notifications
You must be signed in to change notification settings - Fork 24
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
CoreIR Changes/Fixes #607
base: master
Are you sure you want to change the base?
CoreIR Changes/Fixes #607
Changes from 4 commits
7c02ee1
2ad24a0
996c228
a1141cc
bb9a975
07cd1f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ TARGET = dylib | |
prefix?=/usr/local | ||
endif | ||
|
||
COREDEBUG = True | ||
|
||
COREIRCONFIG ?= g++ | ||
CXX ?= g++ | ||
|
@@ -27,7 +28,7 @@ CFLAGS = -Wall -fPIC | |
CXXFLAGS = -std=c++11 -Wall -fPIC -Werror | ||
|
||
ifdef COREDEBUG | ||
CXXFLAGS += -O0 -g3 -D_GLIBCXX_DEBUG | ||
CXXFLAGS += -O0 -g3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason for this removal? |
||
endif | ||
|
||
export CXX | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,15 +20,41 @@ bool ModuleDef::checkTypes(Wireable* a, Wireable* b) { | |
//TODO This might not be valid if: | ||
// 2 outputs are connected to the same input | ||
|
||
//cout << "Got types" << endl; | ||
|
||
if (ta == c->Flip(tb) ) { | ||
//cout << "ta flipped" << endl; | ||
return false; | ||
} | ||
|
||
//cout << "Flipped types" << endl; | ||
|
||
|
||
// Potential fix for Inout Connections | ||
// cout << "Finding BitInOut Connection in ModuleDef" << std::endl; | ||
// if ((ta->getKind() == ta->TypeKind::TK_BitInOut) | (tb->getKind() == tb->TypeKind::TK_BitInOut)) | ||
// { | ||
// cout << "Found BitInOut Connection" << std::endl; | ||
// return false; | ||
// } | ||
// | ||
// if ((ta->getKind() == ta->TypeKind::TK_Array) && (tb->getKind() == ta->TypeKind::TK_Array)) | ||
// { | ||
// if (ta->getLen() == tb->getLen()) // Arrays must be same length | ||
// { | ||
// if (ta->elemType == c->Flip(tb->elemType)) // Arrays must have flipped elements | ||
// { | ||
// cout << "Arrays with same length, flipped elements" << endl; | ||
// return false; | ||
// } | ||
// | ||
// if ((ta->elemType->getKind() == ta->TypeKind::TK_BitInOut) && ((tb->elemType->getKind() == tb->TypeKind::TK_BitIn) | (tb->elemType->getKind() == tb->TypeKind::TK_Bit))) | ||
// { | ||
// cout << "1 BitInOut Array, 1 " << tb->toString() << endl; | ||
// return false; | ||
// } | ||
// if ((tb->elemType->getKind() == tb->TypeKind::TK_BitInOut) && ((ta->elemType->getKind() == ta->TypeKind::TK_BitIn) | (ta->elemType->getKind() == ta->TypeKind::TK_Bit))) | ||
// { | ||
// cout << "2 BitInOut Array, 1 " << ta->toString() << endl; | ||
// return false; | ||
// } | ||
// } | ||
// } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you submit the code in the comments as a separate PR? Or you could include it in this PR, but it would be good to include a test case that shows what this fixes. |
||
Error e; | ||
e.message(a->getContainer()->getName() + ": Cannot wire together"); | ||
e.message(" " + a->toString() + " : " + a->getType()->toString()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think should be checked in, seems like a debugging setting for yourself? FYI you can pass this as a flag to make, e.g.
make COREDEBUG=1
, rather than setting it in the file explicitly