-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0253eda
commit 2cbafb9
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
aec_800g.py | ||
Implementation of Vendor specific XcvrMemMap for CMIS Rev 5.0 | ||
""" | ||
|
||
from ..public.cmis import CmisMemMap | ||
from ...fields.xcvr_field import ( | ||
CodeRegField, | ||
DateField, | ||
HexRegField, | ||
NumberRegField, | ||
RegBitField, | ||
RegGroupField, | ||
StringRegField, | ||
) | ||
from ...fields import consts | ||
|
||
class CmisAec800gMemMap(CmisMemMap): | ||
def __init__(self, codes): | ||
super(CmisAec800gMemMap, self).__init__(codes) | ||
|
||
self.VENDOR_CUSTOM = RegGroupField(consts.VENDOR_CUSTOM, | ||
NumberRegField(consts.TARGET_MODE, self.getaddr(0x0, 64), ro=False) | ||
) | ||
|
||
def getaddr(self, page, offset, page_size=128): | ||
return page * page_size + offset |