-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I can't get the volume envelope function of APU channels 1&2 working without somehow inverting the clock that goes into the COUNT cells HEVO...HAFO (CH1) and FENA...FENO (CH2). They are counting in the wrong direction. I checked the schematic with the die shot and can't find any wrong connections that could cause that. So I think one of the following things must be the case:
- AOI_MUX_2 has an inverter, changing it to AO_MUX_2 so to speak
- COUNT has its outputs switched
- COUNT triggers on opposite clock edge
When I modify the behavior of the COUNT cells in any way (or multiple ways at once), they are causing the APU to break everywhere else they are used. This is why I can only think of the AOI_MUX_2 cells being the culprit here. I haven't simulated everything yet, so I can't say if changing them to "AO without I" will break anything else.
It is also possible that silly me has a totally wrong understanding of the COUNT cells. I see them as flip-flops that toggle on a falling clock edge and can be asynchronously set to D whenever LOAD is high. At least this is how they work for me correctly in other places. Here's a truth table:
CLK D LOAD | COUT
--------------------------
x D H | D (async. load)
H->L x L | !COUT (toggle)
L->H x L | COUT (keep)
_
Q is always the inverse of COUT.
Please let me know if I misunderstood their function.