Skip to content

Continuously read/update UserDMA status #224

Answered by vic9112
vic9112 asked this question in Q&A
Discussion options

You must be logged in to vote

I have solved this problem, following is the current waveform:

Interface

The volatile keyword is used to inform the compiler that a variable's value may change at any time.

Reason for using volatile

  1. Prevent Optimization:
    Compilers often optimize code by caching the values of variables in registers, assuming they do not change unless explicitly modified by the program. When dealing with hardware signals or memory-mapped I/O, the value can change outside the program's control (e.g., due to hardware events). Using volatile prevents the compiler from making such optimizations, ensuring that the code reads the variable from memory every time it is accessed.
  2. Correct Signal Monitoring:
    In HLS…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vic9112
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants