Line 56... |
Line 56... |
m_fpga->kill();
|
m_fpga->kill();
|
exit(0);
|
exit(0);
|
}
|
}
|
|
|
class EQSPISCOPE : public SCOPE {
|
class EQSPISCOPE : public SCOPE {
|
|
int m_oword[2], m_iword[2], m_p;
|
public:
|
public:
|
EQSPISCOPE(FPGA *fpga, unsigned addr, bool vecread)
|
EQSPISCOPE(FPGA *fpga, unsigned addr, bool vecread)
|
: SCOPE(fpga, addr, false, false) {};
|
: SCOPE(fpga, addr, false, false) {};
|
~EQSPISCOPE(void) {}
|
~EQSPISCOPE(void) {}
|
virtual void decode(DEVBUS::BUSW val) const {
|
virtual void decode(DEVBUS::BUSW val) {
|
int cyc, cstb, dstb, ack, back, accepted, valid, word,
|
int cyc, cstb, dstb, ack, back, accepted, valid, word,
|
out, cs, sck, mod, odat, idat;
|
out, cs, sck, mod, odat, idat;
|
|
|
cyc = (val>>31)&1;
|
cyc = (val>>31)&1;
|
cstb = (val>>30)&1;
|
cstb = (val>>30)&1;
|
Line 79... |
Line 80... |
sck = (val>>10)&1;
|
sck = (val>>10)&1;
|
mod = (val>> 8)&3;
|
mod = (val>> 8)&3;
|
odat = (val>> 4)&15;
|
odat = (val>> 4)&15;
|
idat = (val )&15;
|
idat = (val )&15;
|
|
|
printf("%s%s%s%s%s%s%s %02x %02x %s%s %d %x-> ->%x",
|
m_p = (m_p^1)&1;
|
(cyc)?"C ":" ",
|
if (mod&2) {
|
(cstb)?"C":" ",
|
m_oword[m_p] = (m_oword[m_p]<<4)|odat;
|
(dstb)?"D":" ",
|
m_iword[m_p] = (m_iword[m_p]<<4)|idat;
|
|
} else {
|
|
m_oword[m_p] = (m_oword[m_p]<<1)|(odat&1);
|
|
m_iword[m_p] = (m_iword[m_p]<<1)|((idat&2)?1:0);
|
|
}
|
|
|
|
printf("%s%s%s%s%s%s%s %02x %02x %s%s %d %x.%d-> ->%x.%d",
|
|
(cyc)?"CYC ":" ",
|
|
(cstb)?"CSTB":" ",
|
|
(dstb)?"DSTB":" ",
|
(ack)?"AK":" ",
|
(ack)?"AK":" ",
|
(back)?"+":" ",
|
(back)?"+":" ",
|
(accepted)?"ACC":" ",
|
(accepted)?"ACC":" ",
|
(valid)?"V":" ",
|
(valid)?"V":" ",
|
word<<1, out<<2,
|
word<<1, out<<2,
|
(cs)?" ":"CS",
|
(cs)?" ":"CS",
|
(sck)?"CK":" ",
|
(sck)?"CK":" ",
|
(mod), odat, idat);
|
(mod), odat, (odat&1)?1:0, idat, (idat&2)?1:0);
|
|
|
|
printf(" / %08x -> %08x", m_oword[m_p], m_iword[m_p]);
|
|
|
}
|
}
|
};
|
};
|
|
|
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|