dedupe concore/concoredocker C++ headers and fix Java docker path + simtime bugs#458
Conversation
…ng paths and simtime mutation (ControlCore-Project#456, ControlCore-Project#457)
|
hey @pradeeban @Rahuljagwani... follow-up to #442, same drift problem but in C++ and Java (avoided touching the Verilog as you asked) was looking at the Java path bug and noticed the hpp guard collision while at it, so fixed both in one pass. concore_base.hpp is the new shared file, mirrors what concore_base.py does. java changes are the more critical ones, wrong path bug silently breaks all file I/O in Java docker nodes with no error, just falls back to defaults. happy to add tests for the C++ side if useful, |
|
@pradeeban really wanted to know is this the right direction for the C++ side, or would you prefer keeping the implementations fully separate? kept this minimal as i could. |
|
@pradeeban @Rahuljagwani Also imp....been in mkconcore a bit and hard to test in current shape, everything’s top-level and there are direct exits in flow. if useful, I can take a refactor pass to split it into testable functions and add a focused test suite. happy to take it if so if this is a right direction lmk |
|
@avinxshKD Thanks. Avoid working too much on the mkconcore, concore python classes as they are likely to give additional bugs that maybe too much for the application period. Other than that, ok to proceed on Java (which like I said, is mostly a toy) and C++ versions. Best not to bother with the Verilog version. |
follow-up to #442, same idea but for C++ and Java.
concoredocker.hpp and concore.hpp both had #ifndef CONCORE_HPP, including both in a project silently drops the docker class. also mapParser() had no bounds check on its inner loop, bad iport file = UB. pulled shared utils into concore_base.hpp to stop the drift.
java side: inpath + port + "/" gives /in1/name not /in/1/name so every read/write was silently going to the wrong path. also simtime += delta in write() was supposed to be gone per #385, python and C++ already had that, java didn't.
96 tests pass

closes #456 closes #457