addressmapping for ddr4
This commit is contained in:
@@ -17,15 +17,15 @@ xmlAddressDecoder::xmlAddressDecoder(string addressConfigURI)
|
||||
unsigned int to;
|
||||
|
||||
// get channel:
|
||||
TiXmlElement* channel = addressmap->FirstChildElement("channel");
|
||||
|
||||
|
||||
from = getAttribute<unsigned int>(channel, "from");
|
||||
to = getAttribute<unsigned int>(channel, "to");
|
||||
|
||||
channelShift = from;
|
||||
channelMask = pow(2.0, to + 1.0) - pow(2.0, from + 0.0);
|
||||
channelSize = pow(2.0, to - from + 1.0);
|
||||
// TiXmlElement* channel = addressmap->FirstChildElement("channel");
|
||||
//
|
||||
//
|
||||
// from = getAttribute<unsigned int>(channel, "from");
|
||||
// to = getAttribute<unsigned int>(channel, "to");
|
||||
//
|
||||
// channelShift = from;
|
||||
// channelMask = pow(2.0, to + 1.0) - pow(2.0, from + 0.0);
|
||||
// channelSize = pow(2.0, to - from + 1.0);
|
||||
|
||||
// get row:
|
||||
TiXmlElement* row = addressmap->FirstChildElement("row");
|
||||
@@ -58,14 +58,14 @@ xmlAddressDecoder::xmlAddressDecoder(string addressConfigURI)
|
||||
columSize = pow(2.0, to - from + 1.0);
|
||||
|
||||
// get bytes:
|
||||
TiXmlElement* bytes = addressmap->FirstChildElement("bytes");
|
||||
// TiXmlElement* bytes = addressmap->FirstChildElement("bytes");
|
||||
//
|
||||
// from = getAttribute<unsigned int>(bytes, "from");
|
||||
// to = getAttribute<unsigned int>(bytes, "to");
|
||||
|
||||
from = getAttribute<unsigned int>(bytes, "from");
|
||||
to = getAttribute<unsigned int>(bytes, "to");
|
||||
|
||||
bytesShift = from;
|
||||
bytesMask = pow(2.0, to + 1.0) - pow(2.0, from + 0.0);
|
||||
bytesSize = pow(2.0, to - from + 1.0);
|
||||
// bytesShift = from;
|
||||
// bytesMask = pow(2.0, to + 1.0) - pow(2.0, from + 0.0);
|
||||
// bytesSize = pow(2.0, to - from + 1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -80,7 +80,7 @@ xmlAddressDecoder::~xmlAddressDecoder()
|
||||
|
||||
void xmlAddressDecoder::getNode(unsigned int addr, node * n)
|
||||
{
|
||||
n->channel = (addr & channelMask) >> channelShift;
|
||||
n->channel = 0;
|
||||
n->row = (addr & rowMask) >> rowShift;
|
||||
n->bank = (addr & bankMask) >> bankShift;
|
||||
n->colum = (addr & columMask) >> columShift;
|
||||
@@ -122,5 +122,5 @@ unsigned int xmlAddressDecoder::getNumberOfColumsPerRow()
|
||||
|
||||
unsigned int xmlAddressDecoder::getNumberOfBytesPerColumn()
|
||||
{
|
||||
return bytesSize;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user