Ejemplo n.º 1
0
	/*
	 * function    	: GetOperationControl
	 * design	      : Receive Debugging Information by Using BDDIManager
	 * caller		    : CommandHandler::SetManagerForGetOperation
	 */
	void BDDIManager::GetOperationControl(GUI_COMMAND Command)
	{
		sc_object *p_Object = sc_find_object(Command.Argu1);
		sc_module *p_Module = static_cast<sc_module*>(p_Object);	

		if(strcmp(Command.Argu2, "par") == 0)	{
			if(strcmp(Command.Argu3, "read") == 0)	{
				unsigned int dw_Index = (unsigned int)strtoul(Command.Argu4, NULL, 10);
				p_Module->GetBDDI()->BDDIGetParameterValues(dw_Index, Command.Argu5);

				//printf("\nget parameter value : %s\n", Command.Argu5);
			}
			else	{
				assert(0);
			}
		}
		else if(strcmp(Command.Argu2, "reg") == 0)	{
			if(strcmp(Command.Argu3, "read") == 0)	{
				unsigned int dw_Index = (unsigned int)strtoul(Command.Argu4, NULL, 10);
				p_Module->GetBDDI()->BDDIGetRegisterValues(dw_Index, Command.Argu5);

				//printf("\nget register value : %s\n", Command.Argu5);
			}
			else	{
				assert(0);
			}
		}
		else if(strcmp(Command.Argu2, "mem") == 0)	{
			if(strcmp(Command.Argu3, "read") ==0)	{
				unsigned int dw_Address = (unsigned int)strtoul(Command.Argu4, NULL, 16);

				MemoryViewValue = "";

				cout << MemoryViewValue << endl;

				p_Module->GetBDDI()->BDDIGetMemoryView(dw_Address, MemoryViewValue);

				p_CallBackManager->SendBackJson(MemoryViewValue, "MemoryViewCallBack");
			}
		}
		else if(strcmp(Command.Argu2, "assem") == 0)	{

		}
		else	{
			// Invalid Command : This command does not exist.
			assert(0);
		}
	}
Ejemplo n.º 2
0
	/*
	 * function    	: PutOperationControl
	 * design	      : Transfer Debugging Information by Using BDDIManager
	 * caller		    : CommandHandler::SetManagerForPutOperation
	 */
	void BDDIManager::PutOperationControl(GUI_COMMAND Command)
	{
		sc_object *p_Object = sc_find_object(Command.Argu1);
		sc_module *p_Module = static_cast<sc_module*>(p_Object);

		if(strcmp(Command.Argu2, "par") == 0)	{
			if(strcmp(Command.Argu3, "write") == 0)	{
				unsigned int dw_Index = (unsigned int)strtoul(Command.Argu4, NULL, 10);
				p_Module->GetBDDI()->BDDISetParameterValues(dw_Index, Command.Argu5);
			}
			else	{
				// Invalid Command : Breakpoint of parameter is not supported.
				assert(0);
			}
		}
		else if(strcmp(Command.Argu2, "reg") == 0)	{
			if(strcmp(Command.Argu3, "write") == 0)	{
				unsigned int dw_Index = (unsigned int)strtoul(Command.Argu4, NULL, 10);
				p_Module->GetBDDI()->BDDISetRegisterValues(dw_Index, Command.Argu5);
			}
			else	{
				assert(0);
			}
		}
		else if(strcmp(Command.Argu2, "mem") == 0)	{
			if(strcmp(Command.Argu3, "write") == 0)	{
					unsigned int dw_Address = (unsigned int)strtoul(Command.Argu4, NULL, 16);
					unsigned int dw_Value = (unsigned int)strtoul(Command.Argu5, NULL, 16);
					p_Module->GetBDDI()->BDDISetMemoryAddressValue(dw_Address, dw_Value);
			}
		}
		else if(strcmp(Command.Argu2, "assem") == 0)	{

		}
		else	{
			// Invalid Command : This command does not exist.
			assert(0);
		}
	}
Ejemplo n.º 3
0
bool uvm_component::has_child(const char* leaf_name) {
  string full_name = prepend_name(string(leaf_name));
  if (sc_find_object(full_name.c_str())) 
    return true;
  return false; 
}