Clear Filters
Clear Filters

Unit Delay can't resolve discrete time

4 views (last 30 days)
Steven
Steven on 11 Aug 2011
Hello,
All my unit delay blocks in my current model is getting this error when I run the HDL coder:
"Cannot find valid sample time for clock request from block %s--please ensure that the block has a valid discrete sample time"
I've run the HDL coder on other similar models with unit delay blocks and this error hasn't appeared. Is there a setting I don't have properly set?
- thank you

Answers (1)

Kaustubha Govind
Kaustubha Govind on 11 Aug 2011
What have you set for "Sample time" on the block dialog? This needs to be discrete sample time for HDL code generation.
If you have set -1 (inherited), it is likely that you have some continuous blocks in your model that are propagating a continuous sample time to the Unit Delay block. You should convert your entire model to discrete sample time. Use sample time colors to figure out what blocks have continuous sample time color (black).

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!