12.07.2015 Views

Simulator Configuration Guide for Synopsys Models

Simulator Configuration Guide for Synopsys Models

Simulator Configuration Guide for Synopsys Models

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A: Using LMTV with <strong>Synopsys</strong> <strong>Models</strong><strong>Simulator</strong> <strong>Configuration</strong> <strong>Guide</strong>$lm_monitor_vec_map() and$lm_monitor_vec_unmap()Use these commands to enable or disable direct mapping between the user-definedvariable var_name and a model instance's internal register window_element. Thismapping allows you to read from, write to, or trace the internal register through youruser-defined variable. You must define this variable with a width corresponding to thatof the predefined window somewhere in the design hierarchy (typically in the testbench)be<strong>for</strong>e using these commands. Note that these commands only work in SWIFTSmartModel mode.Using $lm_monitor_vec_map(), you can access arrays of registers, which is useful <strong>for</strong>addressing specific memory locations, as in the memory window elements feature. Inaddition, $lm_monitor_vec_map() allows dynamic window creation.Syntax$lm_monitor_vec_map (var_name, inst_path, “window_element” [,index]);$lm_monitor_vec_unmap ([var_name,] inst_path);Argumentsvar_nameinst_pathwindow_elementindexThe name of a user-defined variable to map towindow_element. The variable must be alreadydefined somewhere in the design hierarchy. Thedefault <strong>for</strong> $lm_monitor_vec_unmap() is to unmap allmapped variables <strong>for</strong> that instance.The path name to the SmartModel instance whoseinternal register is to be mapped to the user-definedvariable var_name.The name of the internal register to be mapped tovar_name. Can be part of an array.The index of the array, if the window element is amemory window. The default is 0.ExamplesThe following example defines three variables and maps them to specific memorylocations in the memory array UMEM <strong>for</strong> memory model instance “U1”. Note thatthese tasks cannot be per<strong>for</strong>med using $lm_monitor_enable(). Although the examplefeatures an array of registers, the tasks are equally useful <strong>for</strong> scalar windows, where youcan omit the index option or set it to 0.// Assume a 4Kx8 memory model, on a controller board.278 <strong>Synopsys</strong>, Inc. October 6, 2003

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!