Skip to content

Commit

Permalink
Vendor specific mem_mps file
Browse files Browse the repository at this point in the history
  • Loading branch information
AnoopKamath authored Sep 28, 2023
1 parent 0253eda commit 2cbafb9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions sonic_platform_base/sonic_xcvr/mem_maps/credo/aec_800g.py
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

0 comments on commit 2cbafb9

Please sign in to comment.