Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILA uncomfortable to use when using many probes #2717

Open
martijnbastiaan opened this issue May 9, 2024 · 1 comment
Open

ILA uncomfortable to use when using many probes #2717

martijnbastiaan opened this issue May 9, 2024 · 1 comment

Comments

@martijnbastiaan
Copy link
Member

I've got this beauty:

  debugIla :: Signal freeclk ()
  debugIla = ila
    ((ilaConfig $
         "ila_probe_maybeAlignedRxData0"
      :> "ila_probe_gtwiz_userdata_tx_in"
      :> "ila_probe_reset_rx_done"
      :> "ila_probe_reset_tx_done"
      :> "ila_probe_rst_all_in"
      :> "ila_probe_validAlign"
      :> "ila_probe_alignRst"
      :> "ila_probe_prbsErrors"
      :> "ila_probe_alignBits"
      :> "ila_probe_metaBits"
      :> "ila_probe_alignedAlignBits"
      :> "ila_probe_alignedMetaBits"
      :> "ila_probe_linkUp"
      :> "ila_probe_stats_txRetries"
      :> "ila_probe_stats_rxRetries"
      :> "ila_probe_stats_rxFullRetries"
      :> "ila_probe_stats_failAfterUps"
      :> "capture"
      :> "trigger"
      :> Nil) { advancedTriggers = True, stages = 1, depth = D2048 })
    freeclk
    (xpmCdcArraySingle rx_clk freeclk maybeAlignedRxData0)
    (xpmCdcArraySingle tx_clk freeclk gtwiz_userdata_tx_in)
    (xpmCdcArraySingle rx_clk freeclk reset_rx_done)
    (xpmCdcArraySingle tx_clk freeclk reset_tx_done)
    (unsafeToActiveHigh rst_all_in)
    (xpmCdcArraySingle rx_clk freeclk validAlign)
    (xpmCdcArraySingle rx_clk freeclk (unsafeToActiveHigh alignRst))
    (xpmCdcMaybeLossy  rx_clk freeclk (Just <$> prbsErrors))
    (xpmCdcMaybeLossy  rx_clk freeclk (Just <$> alignBits))
    (xpmCdcMaybeLossy  rx_clk freeclk (Just <$> metaBits))
    (xpmCdcMaybeLossy  rx_clk freeclk maybeAlignedAlignBits)
    (xpmCdcMaybeLossy  rx_clk freeclk maybeAlignedMetaBits)
    (xpmCdcSingle rx_clk freeclk result.linkUp)
    ((.txRetries) <$> stats)
    ((.rxRetries) <$> stats)
    ((.rxFullRetries) <$> stats)
    ((.failAfterUps) <$> stats)
    (pure True :: Signal freeclk Bool) -- capture
    (    xpmCdcSingle tx_clk freeclk userDataTx
    .&&. xpmCdcSingle rx_clk freeclk userDataRx
    .&&. unsafeToActiveLow rst_all_in
    ) -- trigger

I feel this it is now very error prone to add a probe, as I cannot easily see which probe name matches to which signal. We should use an inst like invocation:

ila
  ilaConfig{advancedTriggers = True, stages = 1, depth = D2048}
  freeclk
  (Port @"ila_probe_maybeAlignedRxData0" (xpmCdcArraySingle rx_clk freeclk maybeAlignedRxData0))
  (Port @"foo" ...)
  (Port @"bar" ...)
@basile-henry
Copy link
Collaborator

basile-henry commented May 20, 2024

(Port @"foo" ...)

And then you can go one step further and use a typeclass to name ports that contain multiple signals. This way you can do Port @"some_dataflow" x and get names for "some_dataflow_valid", "some_dataflow_ready" and "some_dataflow_dat" (for example). This is also useful for top level/synthesis units. 😄

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

No branches or pull requests

2 participants