mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 01:54:10 +00:00
Merge pull request #1858 from YosysHQ/eddie/fix1856
kernel: include "kernel/constids.inc"
This commit is contained in:
commit
371af7da38
|
@ -42,7 +42,7 @@ int RTLIL::IdString::last_created_idx_ptr_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define X(_id) IdString RTLIL::ID::_id;
|
#define X(_id) IdString RTLIL::ID::_id;
|
||||||
#include "constids.inc"
|
#include "kernel/constids.inc"
|
||||||
#undef X
|
#undef X
|
||||||
|
|
||||||
dict<std::string, std::string> RTLIL::constpad;
|
dict<std::string, std::string> RTLIL::constpad;
|
||||||
|
|
|
@ -377,7 +377,7 @@ namespace RTLIL
|
||||||
|
|
||||||
namespace ID {
|
namespace ID {
|
||||||
#define X(_id) extern IdString _id;
|
#define X(_id) extern IdString _id;
|
||||||
#include "constids.inc"
|
#include "kernel/constids.inc"
|
||||||
#undef X
|
#undef X
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -516,7 +516,7 @@ void yosys_setup()
|
||||||
already_setup = true;
|
already_setup = true;
|
||||||
|
|
||||||
#define X(_id) RTLIL::ID::_id = "\\" # _id;
|
#define X(_id) RTLIL::ID::_id = "\\" # _id;
|
||||||
#include "constids.inc"
|
#include "kernel/constids.inc"
|
||||||
#undef X
|
#undef X
|
||||||
|
|
||||||
#ifdef WITH_PYTHON
|
#ifdef WITH_PYTHON
|
||||||
|
|
1
tests/various/.gitignore
vendored
1
tests/various/.gitignore
vendored
|
@ -3,3 +3,4 @@
|
||||||
/write_gzip.v
|
/write_gzip.v
|
||||||
/write_gzip.v.gz
|
/write_gzip.v.gz
|
||||||
/run-test.mk
|
/run-test.mk
|
||||||
|
/plugin.so
|
||||||
|
|
15
tests/various/plugin.cc
Normal file
15
tests/various/plugin.cc
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#include "kernel/rtlil.h"
|
||||||
|
|
||||||
|
YOSYS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
struct TestPass : public Pass {
|
||||||
|
TestPass() : Pass("test", "test") { }
|
||||||
|
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||||
|
{
|
||||||
|
size_t argidx = 1;
|
||||||
|
extra_args(args, argidx, design);
|
||||||
|
log("Plugin test passed!\n");
|
||||||
|
}
|
||||||
|
} TestPass;
|
||||||
|
|
||||||
|
YOSYS_NAMESPACE_END
|
6
tests/various/plugin.sh
Normal file
6
tests/various/plugin.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
set -e
|
||||||
|
rm -f plugin.so
|
||||||
|
CXXFLAGS=$(../../yosys-config --cxxflags)
|
||||||
|
CXXFLAGS=${CXXFLAGS// -I\/usr\/local\/share\/yosys\/include/ -I..\/..\/share\/include}
|
||||||
|
../../yosys-config --exec --cxx ${CXXFLAGS} --ldflags -shared -o plugin.so plugin.cc
|
||||||
|
../../yosys -m ./plugin.so -p "test" | grep -q "Plugin test passed!"
|
Loading…
Reference in a new issue