Commit d0729b4
Fixed busy logic for SCA read/write commands
* Fixed busy logic for SCA read/write commands
Both read and write commands should wait for the busy flag to be cleared before being executed.
In particular, the current implementation of the Sea::read() function stored the `command` variable only once, and then directly tests the channel busy state with `barRead(sc_regs::SCA_RD_CMD.index)`. When the busy is cleared, the initial value of the `command` variable is passed to the `checkError()` function, and an exception is thrown because the busy bit was still set when the `barRead(sc_regs::SCA_RD_CMD.index)` was initially called to set the `command` variable.
The proposed change in the busy logic guarantees that the `command` variable gets fresher at each loop, until the busy flag is cleared or the timeout is reached.1 parent e1a125b commit d0729b4
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
0 commit comments