Commit Graph

11 Commits

Author SHA1 Message Date
Makiras e3eab27451 feat(lib): add atClone hook for post-fork state re-initialization
Add a new `atClone()` method to the simulation core and expose it through all language bindings.

This method is intended to be called in a child process after a fork() to re-initialize the state of the Verilated model. This is crucial for supporting robust multi-process simulation environments, such as Python's `multiprocessing`, where forking can lead to an inconsistent state in the simulator's child instances.

Additionally, this commit includes several stability and memory management improvements:
- Fix memory leaks in `DutUnifiedBase` and the C++ wrapper by ensuring allocated resources are properly deallocated.
- Add a null-pointer check in `FlushWaveform` to prevent crashes when a waveform dumper is not present.
- Expose the `atClone` functionality to C++, Go, Java, Lua, Python, and Scala wrappers.
2026-01-29 17:07:30 +08:00
FrankOu2001 bc3570eaaa refactor: Enhance waveform export and rename APIs
- Store waveform and coverage export settings in the DUT class.
- **BREAKING CHANGE**: Renamed waveform control APIs to clarify pause/resume semantics:
  - `OpenWaveform` -> `ResumeWaveformDump`
  - `CloseWaveform` -> `PauseWaveformDump`
  - `WaveformClosed` -> `WaveformPaused`
- Fix syntax error in `template/mem_direct/Makefile`.
2025-09-04 15:38:35 +08:00
Makiras 5abf516100
[fix] quick fix for GetInternalSignal raw ptr to shared_ptr (#40) 2025-06-09 10:00:10 +08:00
yaozhicheng ee41d8bf4b new feat(cpp): add GetInternalSignalList/GetInternalSignal for cpp && test pass 2025-04-30 11:23:00 +08:00
yaozhicheng bbca48b8ae feat: export new API GetXClock/GetXPort/OpenWaveform/CloseWaveform 2025-04-30 11:23:00 +08:00
Makiras fcf7db4e9b add example: vpi interal support for cpp 2025-01-08 11:35:10 +08:00
yaozhicheng 21f8adfe42 add: support cascaded_signals for cpp 2024-08-27 19:15:53 +08:00
Makiras b905acf43e fix VCS for cpp 2024-07-17 10:34:01 +08:00
yaozhicheng 805753f834 uniform dut.xclock, dut.xport 2024-07-17 10:34:01 +08:00
yaozhicheng 3f857c4dbb refine user APIs 2024-07-17 10:34:01 +08:00
Makiras 06751a12f8 optimize mcv output content
add verbose mode and example project mode
todo: add python support ,finetune vcs support
2023-12-11 08:36:32 +00:00