efabless/caravel

Clock monitor function on caravan

RTimothyEdwards opened this issue · 2 comments

The clock monitor function redirects the core and user clocks to pins 14 and 15 for monitoring; this is used in hardware tests of the clock switching and DLL function, and speed tests of the CPU. Unfortunately, in the caravan chip, pins 14 and 15 are not GPIOs, and so this function is completely missing.

Proposed: Extend the housekeeping definition so that both clocks can be routed to two different pins, one set pins 14 and 15, and the other set pins GPIO[30] and GPIO[31] (GPIO[32] to GPIO[37] are already assigned to special functions). The new housekeeping definition will be used immediately for the next tapeout for caravan only. For the following tapeout, it will be incorporated back into caravel (also see the previous issue on the product ID; that will be incorporated and there will once again be a single housekeeping module for both caravel and caravan).

@mo-hosni : I pushed a correction for this error. The modification is all in housekeeping.v, but to keep it from conflicting with caravel, I renamed it to housekeeping_alt.v. If you are doing all synthesis and P&R in this branch, you might want to change it back to just "housekeeping" so that caravan_core.v does not need to be changed, but then we will want to be careful about merging this branch into main and invalidating caravel by changing the definition of housekeeping. I'll leave it to you to decide which way works best.

housekeeping_alt was hardened as a macro and integrated in caravan_core.
PR: #465
commit: 6b5aa27