Combined the 3 various APIs used in EmitC* passes to handle file opening/splitting into a single one. This removes a lot of copy paste and makes everything consistent. All C++ file handling goes through `EmitCBaseVisitor` using the `openNewOutputHeaderFile`, `openNewOutputSourceFile` and `closOutputFile` methods. To emit a new kind of file, always derive a new class from `EmitCBaseVisitor`, and use the above APIs, they will take care of everything else in a consistent matter. Subsequently also removed V3OutSCFile, and instead included verilated_sc.h (which included the systemc header itself) in the two files that need it (the primary model header, and the root module header). Functional changes: - The PCH header did not use to have a corresponding AstCFile. Now it does, though this makes no difference in the output - All 'slow' sources now have '__Slow' in the name automatically (the only one missing was for the ConstPool files) Rest of the output is identical except for the header line now being present in all generated C++ files. |
||
|---|---|---|
| .. | ||
| t | ||
| .gdbinit | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Makefile | ||
| Makefile_obj | ||
| driver.py | ||
| input.vc | ||
| input.xsim.vc | ||