Load source file of the hier_block explicitly (#2559)

* Add a test to make sure that lib modules (loaded via -y option) can be a hier_block.

* Add HDL file of the hier_block to the source list if the module is loaded via -y option.

(Each hier_block is treated as a top module when processing the hier_block.)

* Use "\n" for delimiter as the other files
This commit is contained in:
Yutetsu TAKATSUKASA
2020-09-19 08:13:49 +09:00
committed by GitHub
parent 66d1754d19
commit 1c1b95161b
5 changed files with 60 additions and 4 deletions
+2
View File
@@ -229,6 +229,8 @@ class CMakeEmitter {
*of << deslash(" ${CMAKE_CURRENT_BINARY_DIR}/" + (*child)->hierWrapper(true));
}
*of << " ";
const string vFile = hblockp->vFileIfNecessary();
if (!vFile.empty()) *of << vFile << " ";
const V3StringList& vFiles = v3Global.opt.vFiles();
for (const string& i : vFiles) *of << V3Os::filenameRealPath(i);
*of << " VERILATOR_ARGS ";