Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHow about creating a custom hardware peripheral which asserts waitrequest during the measurement interval? The peripheral could contain a small counter which provides a fixed waitrequest interval, or it could base its waitrequest on an external signal which is active during the measurement (if that signal is available). You'd have the NiosII execute a non-cached data read or write to the peripheral during the measurement, and the niosII would stall until waitrequest is deasserted.
You didn't provide details on how the measurement is fired off, but if it's being controlled by a nios2-controlled peripheral, you might be able to build the waitrequest logic into the measurement peripheral itself. This seems more elegant. I'll assume that the measurement is triggered by one or more register writes to a peripheral - if so, simply change the hardware so that on the final register write, the peripheral asserts waitrequest until the measurement is complete.