[SimToSV] Lower sim.triggered to sv.always#10490
Conversation
|
Currently, it simply reduces the value of sim.triggered to sv.always without performing any merging operation. This will cause all sim.triggered events to execute in parallel. I think it's not the form we want, since it is not aligned with the current lowering path in LowerToHW, so for the moment it's only a prototype. Let me know what you think! @fzi-hielscher 😊 |
|
Hi @nanjo712, the lowering looks fine to me. But couldn't we also add a synthesis guard around the Having a separate SV process for each TriggeredOp is likely going to cause a mess in practice. However, it is technically correct, as we have decided to not establish an order between the operations. My suggestion to fix this would be to let ProceduralizeSim squash all |
|
Sorry, I'm a little confused, and I hope you can help me clarify this part of the logic. For #10489, I think adding a synthesis guard around the For
Did you mean squashing all If we instead update sim.triggered %clock {
scf.if %cond1 {
// operations from the first sim.triggered
}
scf.if %cond2 {
// operations from the second sim.triggered
}
}That is, the common sim.triggered would represent the shared clock trigger, while the original per-trigger enable conditions would be lowered into conditional regions inside the body. |
Sorry for the confusion. Since you added this lowering, I assumed that you decided against converting
Exactly. |
That sounds really nice! Let's do it in the next PR. For this PR, let me add a synthesis guard for sv.always first. Thanks a lot, I really appreciate your feedback! |
568e616 to
1b60bd6
Compare
Lower sim.triggered to sv.always.
Assisted-by: Codex: GPT-5.4