1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Make FNS_WIDTH an internal parameter in PTP CDC module

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich 2023-09-21 16:30:29 -07:00
parent 98b4fbb56d
commit aad30d09a1
5 changed files with 6 additions and 11 deletions

View File

@ -227,8 +227,7 @@ if (TX_PTP_TS_ENABLE) begin : tx_ptp
ptp_clock_cdc #(
.TS_WIDTH(PTP_TS_WIDTH),
.NS_WIDTH(6),
.FNS_WIDTH(16)
.NS_WIDTH(6)
)
tx_ptp_cdc (
.input_clk(logic_clk),
@ -303,8 +302,7 @@ if (RX_PTP_TS_ENABLE) begin : rx_ptp
ptp_clock_cdc #(
.TS_WIDTH(PTP_TS_WIDTH),
.NS_WIDTH(6),
.FNS_WIDTH(16)
.NS_WIDTH(6)
)
rx_ptp_cdc (
.input_clk(logic_clk),

View File

@ -256,8 +256,7 @@ if (TX_PTP_TS_ENABLE) begin : tx_ptp
ptp_clock_cdc #(
.TS_WIDTH(PTP_TS_WIDTH),
.NS_WIDTH(6),
.FNS_WIDTH(16)
.NS_WIDTH(6)
)
tx_ptp_cdc (
.input_clk(logic_clk),
@ -332,8 +331,7 @@ if (RX_PTP_TS_ENABLE) begin : rx_ptp
ptp_clock_cdc #(
.TS_WIDTH(PTP_TS_WIDTH),
.NS_WIDTH(6),
.FNS_WIDTH(16)
.NS_WIDTH(6)
)
rx_ptp_cdc (
.input_clk(logic_clk),

View File

@ -35,7 +35,6 @@ module ptp_clock_cdc #
(
parameter TS_WIDTH = 96,
parameter NS_WIDTH = 4,
parameter FNS_WIDTH = 16,
parameter LOG_RATE = 3,
parameter PIPELINE_OUTPUT = 0
)
@ -77,6 +76,8 @@ initial begin
end
end
parameter FNS_WIDTH = 16;
parameter TS_NS_WIDTH = TS_WIDTH == 96 ? 30 : 48;
parameter PHASE_CNT_WIDTH = LOG_RATE;

View File

@ -34,7 +34,6 @@ VERILOG_SOURCES += ../../rtl/$(DUT).v
# module parameters
export PARAM_TS_WIDTH := 96
export PARAM_NS_WIDTH := 4
export PARAM_FNS_WIDTH := 16
export PARAM_LOG_RATE := 3
export PARAM_PIPELINE_OUTPUT := 0

View File

@ -243,7 +243,6 @@ def test_ptp_clock_cdc(request, ts_width):
parameters['TS_WIDTH'] = ts_width
parameters['NS_WIDTH'] = 4
parameters['FNS_WIDTH'] = 16
parameters['LOG_RATE'] = 3
parameters['PIPELINE_OUTPUT'] = 0