Skip to content

backend: Synth wrappers never drive opt.compute, so compute optimises away #232

Description

@DanielKellerM

The generated idma_backend_synth_* wrappers expose EnableCompute / ComputeOps / ComputeTuning but never drive idma_req.opt.compute. There is no req_compute_*_i port and no assign.

src/backend/tpl/idma_backend_synth.sv.tpl:380-411 assigns every opt.* field except compute. In the v0.7.0 deploy, target/rtl/idma_backend_synth_rw_axi.sv:296-319 has 27 assign idma_req... lines and none touch opt.compute; same for every variant. src/midend/idma_nd_midend_synth.sv:347-368 likewise has no compute port.

Two consequences.

1. Synthesis numbers for compute are meaningless. Even elaborated with EnableCompute=1, opt.compute has no driver and constant-propagates to 0: idma_otf_compute.sv:46 eff_compute becomes 0, :51 op_legal becomes 0, :53-56 all sel_* become 0, the passthrough mux wins, and the mxquant/mxdequant/transpose outputs go unused. The whole compute datapath is optimised away. (Chain traced in RTL; I did not measure DC behaviour on an undriven net.)

2. The undriven field reaches live control logic. src/backend/tpl/idma_legalizer.sv.tpl:507-508, generated at target/rtl/idma_legalizer_rw_axi.sv:313-314:

decouple_rw:    req_i.opt.beo.decouple_rw | req_i.opt.compute.enable,
decouple_aw:    req_i.opt.beo.decouple_aw | req_i.opt.compute.enable,

These are not gated by EnableCompute, unlike the size-changing length calc at :284 which is. So the undriven opt.compute.enable reaches the decouple flags unconditionally and any simulation of a synth wrapper yields X on decouple_rw / decouple_aw. Latent today because CI only elaborates the wrappers, it never simulates them.

Suggested fix:

  • add req_compute_*_i ports and the matching assigns under the existing % if compute_eligible: guard in idma_backend_synth.sv.tpl
  • gate idma_legalizer.sv.tpl:507-508 with EnableCompute &&

Found on devel at 77b16cf0; the generated evidence is from tag v0.7.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions