summaryrefslogtreecommitdiffhomepage
path: root/src/ethernet_params.v
diff options
context:
space:
mode:
authorPrivate Island Networks Inc <opensource@privateisland.tech>2025-12-21 20:51:04 -0500
committerPrivate Island Networks Inc <opensource@privateisland.tech>2025-12-21 20:51:04 -0500
commit7b1b5e7eb712d41888398934834cae730e0aa5a0 (patch)
tree8b8aba85e19a079fbbd4962c57ff89ca701c6e4d /src/ethernet_params.v
parentf4bdc9f4365d3a3ce3f906e68cd018cb57561e56 (diff)
betsy: preliminary beta snapshot
Diffstat (limited to 'src/ethernet_params.v')
-rw-r--r--src/ethernet_params.v36
1 files changed, 26 insertions, 10 deletions
diff --git a/src/ethernet_params.v b/src/ethernet_params.v
index dcb7dba..406f46f 100644
--- a/src/ethernet_params.v
+++ b/src/ethernet_params.v
@@ -1,7 +1,8 @@
/*
- * ethernet_params.v
+ * ethernet_params.v
*
- * Copyright (C) 2018, 2019, 2020 Mind Chasers Inc.
+ * Copyright (C) 2024-2025 Private Island Networks Inc.
+ * Copyright (C) 2018-2023 Mind Chasers Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,22 +19,37 @@
* function: Ethernet related parameters
*
*/
+
+
+`ifdef INCLUDED
+localparam TX_SRC_SEL_PHY0 = 3'b000,
+ TX_SRC_SEL_PHY1 = 3'b001,
+ TX_SRC_SEL_PHY2 = 3'b010,
+ TX_SRC_SEL_MLE = 3'b110,
+ TX_SRC_SEL_UC = 3'b111;
+
+localparam PHY_TYPE_SGMII = 2'b00,
+ PHY_TYPE_RGMII = 2'b01,
+ PHY_TYPE_1000BASE_X = 2'b10,
+ PHY_TYPE_OTHER = 2'b11;
localparam MTU = 1520; // Ethernet is actually 1500+framing (max 18)
localparam IPG = 96; // Inter-packet Gap Bits
-localparam SZ_ETH_HEADER = 14; // w/o VLAN
-localparam SZ_IPV4_HEADER = 20; // w/o Options
+localparam SZ_ETH_HEADER = 14; // MAC SRC, DEST, ETHER TYPE, w/o VLAN
+localparam SZ_IPV4_HEADER = 20; // w/o Options
localparam SZ_UDP_HEADER = 8;
localparam TX_MODE_AN = 3'b000,
-TX_MODE_IDLE = 3'b001,
-TX_MODE_XMT_PKT = 3'b010, // anything >= to this is a mode where a packet is transmitted
-TX_MODE_XMT_METRICS = 3'b011,
-TX_MODE_XMT_CUSTOM = 3'b100;
+ TX_MODE_IDLE = 3'b001,
+ TX_MODE_XMT_PKT = 3'b010, // anything >= to this is a mode where a packet is transmitted
+ TX_MODE_XMT_METRICS = 3'b011,
+ TX_MODE_XMT_CUSTOM = 3'b100;
// Note: The Length/Type field is transmitted and received with the high order octet first.
localparam ETHER_TYPE_IPV4 = 16'h0800,
-ETHER_TYPE_IPV6 = 16'h86DD,
-ETHER_TYPE_ARP = 16'h0806;
+ ETHER_TYPE_IPV6 = 16'h86DD,
+ ETHER_TYPE_ARP = 16'h0806;
+
+`endif

Highly Recommended Verilog Books