Skip to content

Commit

Permalink
Add SN5640 SIMX platform with default SKU
Browse files Browse the repository at this point in the history
  • Loading branch information
noaOrMlnx committed Jul 14, 2024
1 parent 4d6d808 commit d321226
Show file tree
Hide file tree
Showing 23 changed files with 5,988 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{#
Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#}
{% set default_cable = '300m' %}
{% set ingress_lossless_pool_size = '31502336' %}
{% set ingress_lossy_pool_size = '31502336' %}
{% set egress_lossless_pool_size = '138240000' %}
{% set egress_lossy_pool_size = '31502336' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0, 32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
{%- if dynamic_mode is not defined %}
"size": "{{ ingress_lossless_pool_size }}",
{%- endif %}
"type": "ingress",
"mode": "dynamic"
},
"ingress_lossy_pool": {
{%- if dynamic_mode is not defined %}
"size": "{{ ingress_lossy_pool_size }}",
{%- endif %}
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "{{ egress_lossless_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
"egress_lossy_pool": {
{%- if dynamic_mode is not defined %}
"size": "{{ egress_lossy_pool_size }}",
{%- endif %}
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_profile_lists(port_names) %}
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
"profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
},
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
"profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
}
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
"profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
"profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
"profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
}
{%- endmacro %}


Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{#
Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#}
{% set default_cable = '300m' %}
{% set ingress_lossless_pool_size = '31502336' %}
{% set ingress_lossy_pool_size = '31502336' %}
{% set egress_lossless_pool_size = '138240000' %}
{% set egress_lossy_pool_size = '31502336' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0, 32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
{%- if dynamic_mode is not defined %}
"size": "{{ ingress_lossless_pool_size }}",
{%- endif %}
"type": "ingress",
"mode": "dynamic"
},
"ingress_lossy_pool": {
{%- if dynamic_mode is not defined %}
"size": "{{ ingress_lossy_pool_size }}",
{%- endif %}
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "{{ egress_lossless_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
"egress_lossy_pool": {
{%- if dynamic_mode is not defined %}
"size": "{{ egress_lossy_pool_size }}",
{%- endif %}
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"ingress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"ingress_lossy_profile": {
"pool":"ingress_lossy_pool",
"size":"0",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"egress_lossless_pool",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"9216",
"dynamic_th":"7"
},
"q_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"0",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_profile_lists(port_names) %}
"BUFFER_PORT_INGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
"profile_list" : "ingress_lossless_profile,ingress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
},
"BUFFER_PORT_EGRESS_PROFILE_LIST": {
{% for port in port_names.split(',') %}
"{{ port }}": {
"profile_list" : "egress_lossless_profile,egress_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
}
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
"profile" : "egress_lossless_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
"profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|5-6": {
"profile" : "q_lossy_profile"
}{% if not loop.last %},{% endif %}

{% endfor %}
}
{%- endmacro %}


Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"DEVICE_METADATA": {
"localhost": {
"create_only_config_db_buffers": "true"
}
}
}
Loading

0 comments on commit d321226

Please sign in to comment.