Skip to content

Commit 54446c8

Browse files
committed
[swt] Trigger SWT bar write immediately with SWT_LOW write
1 parent d0729b4 commit 54446c8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/Swt/Swt.cxx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,13 @@ void Swt::read(std::vector<SwtWord>& words, TimeOut msTimeOut, SwtWord::Size wor
9292
uint32_t Swt::write(const SwtWord& swtWord)
9393
{
9494
// prep the swt word
95-
barWrite(sc_regs::SWT_WR_WORD_L.index, swtWord.getLow());
96-
if (swtWord.getMed() || swtWord.getHigh()) {
97-
barWrite(sc_regs::SWT_WR_WORD_M.index, swtWord.getMed());
98-
}
9995
if (swtWord.getHigh()) {
10096
barWrite(sc_regs::SWT_WR_WORD_H.index, swtWord.getHigh());
10197
}
102-
103-
// perform write
104-
barWrite(sc_regs::SWT_CMD.index, 0x1);
105-
barWrite(sc_regs::SWT_CMD.index, 0x0); //void cmd to sync clocks
98+
if (swtWord.getMed() || swtWord.getHigh()) {
99+
barWrite(sc_regs::SWT_WR_WORD_M.index, swtWord.getMed());
100+
}
101+
barWrite(sc_regs::SWT_WR_WORD_L.index, swtWord.getLow()); // The LOW bar write, triggers the write operation
106102

107103
return barRead(sc_regs::SWT_MON.index);
108104
}

0 commit comments

Comments
 (0)