Compare commits

...

3 Commits

Author SHA1 Message Date
2ad40946d1 update treetormt 2025-06-12 19:53:46 +00:00
50075b1acc Merge remote-tracking branch 'origin/decision-tree-nudge-boundaries' 2025-06-12 19:52:02 +00:00
Nathan Huey
fda251f051 First try boundary nudging 2025-06-11 16:55:23 -07:00
5 changed files with 149 additions and 65 deletions

5
.gitignore vendored
View File

@@ -1,5 +1,6 @@
data.* data.*
__pycache__ __pycache__
*.json *.json
data/*
data/* .DS_Store
.ipynb_checkpoints/

File diff suppressed because one or more lines are too long

View File

@@ -89,7 +89,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "switch", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
@@ -103,7 +103,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.12.7" "version": "3.12.9"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -247,7 +247,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "cs216", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
@@ -261,7 +261,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.13.3" "version": "3.12.9"
} }
}, },
"nbformat": 4, "nbformat": 4,

View File

@@ -117,8 +117,8 @@
"[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n", "[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n",
"id mapping: \n", "id mapping: \n",
"[['dst_range', 'dst_meta'], ['src_range', 'src_meta'], ['protocl_range', 'protocl_meta'], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]\n", "[['dst_range', 'dst_meta'], ['src_range', 'src_meta'], ['protocl_range', 'protocl_meta'], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]\n",
"TCAM bits: 13312\n", "TCAM bits: 13184\n",
"RAM bits: 522\n" "RAM bits: 504\n"
] ]
} }
], ],
@@ -263,8 +263,8 @@
"[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n", "[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n",
"id mapping: \n", "id mapping: \n",
"[['dst_range', 'dst_meta'], ['src_range', 'src_meta'], ['protocl_range', 'protocl_meta'], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]\n", "[['dst_range', 'dst_meta'], ['src_range', 'src_meta'], ['protocl_range', 'protocl_meta'], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]\n",
"TCAM bits: 3520\n", "TCAM bits: 3320\n",
"RAM bits: 522\n" "RAM bits: 504\n"
] ]
} }
], ],
@@ -274,6 +274,14 @@
"print(f\"RAM bits: {ram_bits}\")" "print(f\"RAM bits: {ram_bits}\")"
] ]
}, },
{
"cell_type": "markdown",
"id": "2504b1ba",
"metadata": {},
"source": [
"# Priority Aware Prefix Expansion"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 9,
@@ -368,8 +376,8 @@
"[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n", "[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n",
"id mapping: \n", "id mapping: \n",
"[['dst_range', 'dst_meta'], ['src_range', 'src_meta'], ['protocl_range', 'protocl_meta'], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]\n", "[['dst_range', 'dst_meta'], ['src_range', 'src_meta'], ['protocl_range', 'protocl_meta'], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]\n",
"TCAM bits: 2120\n", "TCAM bits: 2152\n",
"RAM bits: 522\n" "RAM bits: 504\n"
] ]
} }
], ],
@@ -382,7 +390,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "switch", "display_name": "Python 3 (ipykernel)",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },