summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/ifcompiler/initScom.C
diff options
context:
space:
mode:
authorCamVan Nguyen <ctnguyen@us.ibm.com>2012-05-22 08:44:39 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-05-30 10:26:38 -0500
commit7b99c2041cfe126bb85325a3d18ca69d279f54ad (patch)
treeb249b0bf4773e2677ec8620eab3074e8e1acb310 /src/usr/hwpf/ifcompiler/initScom.C
parent99d1dab56d4e067cb4ee4b089cd3456acba6a89c (diff)
downloadblackbird-hostboot-7b99c2041cfe126bb85325a3d18ca69d279f54ad.tar.gz
blackbird-hostboot-7b99c2041cfe126bb85325a3d18ca69d279f54ad.zip
SCOM Initfile: Support for associated attributes.
Change-Id: Ie86bce0abaa12b986a7858723625c8e305a899d9 RTC: 41742 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1093 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/ifcompiler/initScom.C')
-rwxr-xr-xsrc/usr/hwpf/ifcompiler/initScom.C29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/usr/hwpf/ifcompiler/initScom.C b/src/usr/hwpf/ifcompiler/initScom.C
index bfd686832..edd030e56 100755
--- a/src/usr/hwpf/ifcompiler/initScom.C
+++ b/src/usr/hwpf/ifcompiler/initScom.C
@@ -32,6 +32,7 @@
// camvanng 02/14/12 Support binary and hex scom addresses
// Support for array at beginning of scom address
// Fix bug in string size when converting decimal to hex string
+// camvanng 05/07/12 Support for associated target attributes
// End Change Log *********************************************************************************
/**
@@ -53,6 +54,7 @@
extern void yyerror(const char * s);
extern init::ScomList * yyscomlist; // only use this during parsing
+std::map<string,string> yytarget; //generic target name & corresponding real name
namespace init {
extern ostringstream dbg; // debug output
@@ -114,9 +116,7 @@ Scom::Scom(BINSEQ::const_iterator & bli, Symbols * i_symbols):
// Read col heads
for(size_t i = 0; i < numcols; ++i)
{
- uint32_t var_tag = Rpn::extract16(bli);
- Rpn col_name_rpn(iv_symbols);
- col_name_rpn.append(iv_symbols->get_rpn_id(var_tag));
+ Rpn col_name_rpn(bli,iv_symbols);
iv_col_vars.push_back(col_name_rpn);
iv_cols_rpn.push_back(iv_row_rpn); // copy in blank row RPNs for this column
}
@@ -203,12 +203,19 @@ void Scom::add_col(const string & i_colname)
Rpn col_rpn(s,iv_symbols); // = iv_symbols->use_symbol(s);
// add check - Can't add any more cols after EXPR column dg001a
- if(iv_col_vars.size() && s != "EXPR")
+ if(iv_col_vars.size())
{
Rpn exp_rpn("EXPR",iv_symbols);
if(exp_rpn == iv_col_vars.back()) // expr col already added - can't add any more cols
{
- yyerror("EXPR must be the last column");
+ if (s == "EXPR")
+ {
+ yyerror("Multiple EXPR columns specified.");
+ }
+ else
+ {
+ yyerror("EXPR must be the last column");
+ }
}
}
@@ -1216,6 +1223,18 @@ void ScomList::listing(BINSEQ & bin_seq,ostream & olist)
olist << endl;
}
+ if (yytarget.size())
+ {
+ olist << "------------------- TARGET MAPPING ------------------------\n\n"
+ << endl;
+ std::map<string,string>::iterator i;
+ for (i = yytarget.begin(); i != yytarget.end(); i++)
+ {
+ olist << i->first << setfill(' ') << setw(30 - i->first.length())
+ << " = " << i->second << endl;
+ }
+ }
+
olist << iv_symbols->listing() << endl;
olist << "------------------- SCOM TABLES ------------------------\n\n"
<< endl;
OpenPOWER on IntegriCloud