Specman e: 如何打印变量地址?

Specman e: How to print variable's address?

是否可以在 Specman e 中打印变量的地址,就像在 c 中一样:

printf(" variable address = %d \n", &some_variable);

感谢您的帮助

你可以使用这个:

int a = 10;
printf("%p\n", (void *) &a);

没有办法做到这一点。 在e中,没有指针和地址的概念。 另外,如果这是一个在垃圾回收过程中持续存在的变量(例如,如果它是一个字段或 TCM 局部变量),它在内存中的物理地址可能会改变,所以实际上它是没有意义的。