Implement a basic integrated event analyzer.
by whitequark 6 years 11 months
Implement a basic integrated event analyzer.

This doesn't yet suspend applets on FIFO high-water mark, nor does it
write any useful format like VCD.

Refs #65.
116413a0
gateware.analyzer: implement an event analyzer.
by whitequark 6 years 11 months
gateware.analyzer: implement an event analyzer.

Refs #65.
d33a4886
firmware: fix EP4 FIFO reset code.
by whitequark 6 years 11 months
firmware: fix EP4 FIFO reset code.

Typo. Which I've spent several hours on. :/
d523176c
applet.selftest: test USB FIFO faults.
by whitequark 6 years 11 months
57714191
Implement unified, zero-configuration reset for ap...
by whitequark 6 years 11 months
Implement unified, zero-configuration reset for applets and FIFOs.

This commit makes sure that every time an interface is claimed,
the CY7C FIFOs and iCE arbiter FIFOs are cleared, and all applet
logic is reset. This makes it possible to stop applets with ^C
and safely restart them without any framing errors, workarounds like
stuffing the pipe with dummy packets to flush it out, or any explicit
code in applets to handle this case.

Fixes #64.

This commit doesn't (yet?) implement device-only reset, i.e. CY7C
automatically issuing the I2C requests on SET INTERFACE. This is
because it isn't clear that this can be done, or desirable, for
indirect applet access; because it isn't essential; because there
are no clear guidelines for writing non-Glasgow host software; and
because we can easily add that later.
5ac4c8d4
Use USB alternate settings to transparently reset ...
by whitequark 6 years 11 months
Use USB alternate settings to transparently reset endpoint FIFOs.

This is necessary to gracefully handle crashes and termination via
e.g. ^C; once the process dies (no matter how) the kernel resets
the interface to the 0th alternate setting, and to actually use
the endpoints in the interface it needs to be set to the 1st
alternate setting, which resets the FIFOs.

Refs #64.
2bf48615
applet.benchmark: new applet.
by whitequark 6 years 12 months
applet.benchmark: new applet.

Fixes #47.

Not exactly functional due to #44 and #64.

benchmark: running benchmark mode source for 4.000 MiB
benchmark: mode source: 4.136 MiB/s
(hangs. after restart:)
benchmark: running benchmark mode sink for 4.000 MiB
benchmark: mode sink: 1.394 MiB/s
(hangs. after restart:)
benchmark: running benchmark mode loopback for 4.000 MiB
(hangs)
b088d735
gateware.lfsr: implement.
by whitequark 6 years 12 months
a5a13309
access: use streaming=False by default in get_in_f...
by whitequark 6 years 12 months
access: use streaming=False by default in get_in_fifo().

streaming=True by default causes confusing bugs and the reason for
its existence in the first place is no longer true any more (it
was added because of FX2 bus flakiness due to the lack of proper
SB_IO registers).
c640513a
applet.nand_flash: new applet.
by whitequark 6 years 12 months
a9bf8e84
Report a bug