nld_dm9314.cpp: add RS mode to netlist 9314 (#10016)

This commit is contained in:
goldnchild 2022-07-01 09:03:47 -07:00 committed by GitHub
parent a840e199e5
commit 8d3f76a569
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,19 @@ namespace netlist::devices {
if (m_SQ[i]())
{
/* R-S Mode */
// FIXME: R-S mode is not yet implemented!
// RS mode is just an "extension of regular D mode"
// The way RS mode works is that D and S bar go high (keeps old value)
// S bar going low sets output high
// D going low and S bar high sets output low
// S bar going low AND D going low sets output low (D takes precedence)
if (!m_EQ())
{
if (!m_D[i]()) // if D low and SQ high we clear the bit
{
m_last_Q &= ~(1 << i);
m_Q[i].push((m_last_Q & (1<<i))>>i, delay);
}
}
}
else
{