Skip to content

Conversation

jjin62
Copy link

@jjin62 jjin62 commented Oct 9, 2025

  1. Add a new precision attribute flag for optical analog values (e.g., gain, tilt, power), instead of using double/float point type which would introduce NaN issue.
  2. Add support for optical attenuator in experimental extensions, derived from openconfig-optical-attenuator.yang.
  3. Add support for optical amplifier in experimental extensions, derived from openconfig-optical-amplifier.yang.

1. Add a new precision attribute flag for optical analog values (e.g., gain, tilt, power), instead of using double/float point type which would introduce NaN issue.
2. Add support for optical attenuator in experimental extensions, derived from openconfig-optical-attenuator.yang.
3. Add support for optical amplifier in experimental extensions, derived from openconfig-optical-amplifier.yang.

Signed-off-by: Lu.Mao <[email protected]>
@jjin62
Copy link
Author

jjin62 commented Oct 9, 2025

  1. Introducing two new SAI objects OTN-OA and OTN-ATTENUATOR using SAI experimental extension mechanism. OA and ATTENUATOR are optical modules which can form a simplest optical amplifier.
  2. Gauged/Analog values (optical power, gain, attenuation etc..) are usually represented in a float point format (double or float). However, double/float data type is prohibited in SAI to avoid NaN issue (see meta/Makefile compile flag "-Wfloat-equal"). Therefore, a @precision tag is introduced to represent the number of digits after the decimal point. Any integer type with a @precision tag can be used to represent a decimal type.
    Ref SAI Support optical transport device - proposed by sonic-wg-otn #2216

@jjin62 jjin62 closed this Oct 9, 2025
@jjin62 jjin62 reopened this Oct 9, 2025
Copy link

Commenter does not have sufficient privileges for PR 2217 in repo opencomputeproject/SAI

return 0 unless defined $precision;

# Must be an integer >= 0
if ($precision =~ /^\d+$/) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ to new line, and add empty libe before return same in line 434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants