Skip to content

Conversation

@vidas
Copy link
Member

@vidas vidas commented Jan 21, 2026

Sysemu among other things is designed to take a role of co-simulator in DV checking of the chips it emulates.

Changes here fix what has diverged from the last time it was used in cosim context.

This PR only supports running ET-SoC-1 cosim. Erbium related changes to follow.

@vidas vidas requested a review from glguida January 21, 2026 14:07
@glguida
Copy link
Member

glguida commented Jan 21, 2026

A few notes:

  1. It would have been much appreciated if in the commit logs we would've left some comments to explain WHY this was needed for cosim. Especially the stuff we're disabling.
  2. Re 1, why we have to disable the SP plic but not the rest of SP?
  3. one commit message is a lie: you are not enabling etsoc1 to build on emu.mk, you are enabling erbium.

Please clean it up, and I would personally prefer a separate emu.mk for erbium. or comment that this is for erbium.

vidas added 6 commits January 22, 2026 12:09
cosim doesn't SP PLIC to exist (wasn't present in bemu).
When it was added to sysemu, SYS_EMU guard was inconsistent:
it disabled headers, but not the sp_plic region, thus failing to compile.

This change disables SP PLIC as it always was in cosim context.
When compiling in cosim context, different logger version
is substituted that has no buffer dump functionality.
When sysemu is used in cosim context, it is compiled
using c++11 standard. Modern amenities must go.
Each version (emu-et.mk and emu-er.mk) will be
used to build different breeds of cosim.
Cosim will handle emu_x.mk selection itself.
Omission appeared after compiling without SYS_EMU defined.
@vidas vidas force-pushed the erbium-cosim-experiments branch from e09a6da to e58905f Compare January 22, 2026 12:52
@vidas
Copy link
Member Author

vidas commented Jan 22, 2026

@glguida
Thank you for review!

2. Re 1, why we have to disable the SP plic but not the rest of SP?

The SP PLIC was never available in bemu, and while cosim may potentially live with it added, I decided not to risk introducing changes at this moment. Also, apparently it didn't even compile in non-SYS_EMU mode before.

3. one commit message is a lie: you are not enabling etsoc1 to build on emu.mk, you are enabling erbium.

It was indeed for ET-SoC-1 build of cosim so we could verify integration with known passing tests. Now that it's done, I've added another commit that "splits" emu.mk into chip specific versions emu-et.mk and emu-er.mk (this same PR).

/* sram */ 0x000200E000ull,
/* dram */ 0x0040000000ull, /* Actually MRAM */
/* sysreg */ 0x0080000000ull,
/* plic */ 0x00C0000000ull,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The grouping separators are useful for readability. Why are you removing them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tahoma
In cosim context sysemu source is compiled as part of DV/cosim source tree, where several things are set to build with c++11 standard. Modifying the DV infrastructure to work with c++17 headers isn't easily achievable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay. That's unfortunate. Thank you for the explanation.

}

#endif // EMU_HAS_SVCPROC
#endif // EMU_HAS_SVCPROC && SYS_EMU
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#endif // EMU_HAS_SVCPROC && defined(SYS_EMU)

@glguida
Copy link
Member

glguida commented Jan 27, 2026

@vidas you completely ignored what I wrote earlier. The first commit is not for etsoc-1, also it makes no sense to have two commits for emu.mk, one (wrongly) speaking of etsoc1 in their commit message, the other splitting it.

Please clean up this.

Lol, I was really distracted when I saw this. Nope, this is fine. Merging.

@glguida glguida merged commit 0826f76 into aifoundry-org:master Jan 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants