tcl: add memory testing functions for board diagnostics