formatNoValue.append(";");\r
}\r
\r
- if (!userValue.isNull()) {\r
- ret = formatValue.arg(name).arg(getTypeString()).arg(userValue.toString());\r
- }\r
- else if (!defaultValue.isNull()) {\r
- ret = formatValue.arg(name).arg(getTypeString()).arg(defaultValue.toString());\r
+ QString typeStr = "";\r
+ QString valueStr = "";\r
+ if ((type == Boolean)||(type == Bit)) {\r
+ typeStr = "std_logic";\r
+ if (!userValue.isNull()) {\r
+ valueStr = "'"+userValue.toString()+"'";\r
+ ret = formatValue.arg(name).arg(typeStr).arg(valueStr);\r
+ }\r
+ else if (!defaultValue.isNull()) {\r
+ valueStr = "'"+defaultValue.toString()+"'";\r
+ ret = formatValue.arg(name).arg(typeStr).arg(valueStr);\r
+ }\r
+ else {\r
+ ret = formatNoValue.arg(name).arg(typeStr);\r
+ }\r
}\r
else {\r
- ret = formatNoValue.arg(name).arg(getTypeString());\r
+ typeStr = getTypeString();\r
+ if (!userValue.isNull()) {\r
+ ret = formatValue.arg(name).arg(typeStr).arg(userValue.toString());\r
+ }\r
+ else if (!defaultValue.isNull()) {\r
+ ret = formatValue.arg(name).arg(typeStr).arg(defaultValue.toString());\r
+ }\r
+ else {\r
+ ret = formatNoValue.arg(name).arg(typeStr);\r
+ }\r
}\r
}\r
else if (context == BlockParameter::Instance) {\r
}\r
else {\r
if (!userValue.isNull()) {\r
- ret = format.arg(name).arg(userValue.toString());\r
+ if ((type == Boolean)||(type == Bit)) {\r
+ ret = format.arg(name).arg("'"+userValue.toString()+"'");\r
+ }\r
+ else {\r
+ ret = format.arg(name).arg(userValue.toString());\r
+ }\r
}\r
else if (!defaultValue.isNull()) {\r
- ret = format.arg(name).arg(defaultValue.toString());\r
+ if ((type == Boolean)||(type == Bit)) {\r
+ ret = format.arg(name).arg("'"+defaultValue.toString()+"'");\r
+ }\r
+ else {\r
+ ret = format.arg(name).arg(defaultValue.toString());\r
+ }\r
}\r
else {\r
// abnormal case\r