pulp-platform / chimera

Other
9 stars 1 forks source link

JTAG EoC Procedure #54

Open Lore0599 opened 2 hours ago

Lore0599 commented 2 hours ago

When we use the JTAG preloading mode, the current methodology to detect the End Of Computation is by reading the scratch 2 register in Cheshire. In order to do so, the register is polled using the task jtag_poll_bit0. This task, makes use of the Debug Module method read_dmi_exp_backoff which tries to read a location that is scratch 2 in our case. The task loops until the debug module is noit busy anymore, i.e. until the read is correctly performed. At each iteration, excpet for the first one, the DMI is reset to clean the sticky eror. This approach can be dangerous fo tests where the system clock signal is removed, i.e. when for instance the FLLs are tested. As stated by the read_dmi_exp_backoff comment, this function should not be used to perform read operations which have side-effect, for instance when reading SBData0, that is exactly what is done in the Chimera TB. To partially address this problem, the idle_cycles before performing the read, have been increased in this PR.