- Since the control block runs at 20kHz (50µs), in order to synchronize data transfer the 'Sample Time' property of the ADC block will be required to be set at 50µs.
- The clock would refer to a continuous signal providing timing reference. The sampling time would signify the interval at which the system or block executes its logic. In the case of Verilog code generation the clock input is usually the operationg clock, hence this should be connected to 50MHz input.
- Since the sampling rates of the ADC and control block differ, it would make sense to use a Queue block with FIFO set or the Rate Transition block to align data transfer and achieve data synchronization.
- Yes, one clock of 50MHz can be used and enable signals can be derived using counters to control the update rates of the blocks. to implement a counter in Simulink, you can follow:
- Use a Counter block to count clock cycles.
- Use the Compare to Constant block to check when the counter reaches a specific value.
- Use the output of the Compare block as an enable signal for your blocks.
