summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r--src/usr/hwpf/hwp/fapiHwpExecInitFile.C15
-rwxr-xr-xsrc/usr/hwpf/hwp/initfiles/sample.initfile15
2 files changed, 14 insertions, 16 deletions
diff --git a/src/usr/hwpf/hwp/fapiHwpExecInitFile.C b/src/usr/hwpf/hwp/fapiHwpExecInitFile.C
index ae354ad68..c3413283c 100644
--- a/src/usr/hwpf/hwp/fapiHwpExecInitFile.C
+++ b/src/usr/hwpf/hwp/fapiHwpExecInitFile.C
@@ -43,6 +43,7 @@
* camvanng 01/20/2012 Support for using a range
* indexes for array attributes
* mjjones 02/21/2012 Use new Target toEcmdString
+ * camvanng 04/12/2012 Right justify SCOM data
*/
#include <fapiHwpExecInitFile.H>
@@ -1411,18 +1412,8 @@ fapi::ReturnCode writeScom(const ifData_t & i_ifData, const uint32_t i_scomNum,
uint16_t l_offset = i_ifData.scoms[i_scomNum].offset;
uint16_t l_len = i_ifData.scoms[i_scomNum].len;
- if ((l_id & IF_TYPE_MASK) == IF_ATTR_TYPE) //It's an attribute
- {
- //Attribute data of different sizes is returned from getAttr
- //as a 64bit right-justified number.
- //Shift data to the right offset
- l_data <<= (64 - (l_offset + l_len));
- }
- else // It's a numerical literal
- {
- //Shift data to the right offset
- l_data >>= l_offset;
- }
+ //Shift data to the right offset; data is right aligned
+ l_data <<= (64 - (l_offset + l_len));
//Create mask
uint64_t l_mask = 0;
diff --git a/src/usr/hwpf/hwp/initfiles/sample.initfile b/src/usr/hwpf/hwp/initfiles/sample.initfile
index f8cd0be75..093d912ba 100755
--- a/src/usr/hwpf/hwp/initfiles/sample.initfile
+++ b/src/usr/hwpf/hwp/initfiles/sample.initfile
@@ -19,11 +19,18 @@ SyntaxVersion = 1
#-- -----------------------------------------------------------------------------
#--
#-- Includes
-#-- Note: Must include the path to the .define file.
+#-- Note:
+# Must specify the path to the .define file here; i.e.
+# "include ./hwp/initfiles/sample.define"
+# Or specify the directories to search for the include file (-I <path to search>)
+# in priority order at the initCompiler command line; i.e.
+# "initCompiler -init ./sample.initfile -outdir . -attr ./fapiAttributeIds.H \
+# -I hwp/initfiles -I hwp"
+#
#-- -----------------------------------------------------------------------------
#--******************************************************************************
#-- -----------------------------------------------------------------------------
-include ./hwp/initfiles/sample.define
+include sample.define
#-- -----------------------------------------------------------------------------
#--******************************************************************************
@@ -116,8 +123,8 @@ scom 0x0000000013013283 {
bits , scom_data ;
0:11 , 0b001111001001 ;
12 , 0b1 ;
- 13 , 0b1 ;
- 14:59, 0b0000001100000110010000000000010000010010000000 ;
+ 13 , 0x1 ;
+ 14:59, 0x00c190010480 ;
}
#--******************************************************************************
OpenPOWER on IntegriCloud