jesd204_rx: add parameter for input pipeline stages

Pipeline stages must be implemented on register so placer can spread it
cross the device. Use the shreg_extract attribute to avoid SRL
inference.
main
Laszlo Nagy 2019-04-04 14:53:53 +01:00 committed by Laszlo Nagy
parent 6c6d14722d
commit b90c2e79dc
3 changed files with 20 additions and 6 deletions

View File

@ -50,13 +50,21 @@ module pipeline_stage #(
) (
input clk,
input [WIDTH-1:0] in,
output reg [WIDTH-1:0] out
output [WIDTH-1:0] out
);
generate if (REGISTERED == 1) begin
always @(posedge clk) out <= in;
generate if (REGISTERED == 0) begin
assign out = in;
end else begin
always @(*) out <= in;
(* shreg_extract = "no" *) reg [REGISTERED*WIDTH-1:0] in_dly;
always @(posedge clk) in_dly <= {in_dly,in};
assign out = in_dly[REGISTERED*WIDTH-1 -: WIDTH];
end endgenerate
endmodule

View File

@ -46,7 +46,8 @@
module jesd204_rx #(
parameter NUM_LANES = 1,
parameter NUM_LINKS = 1
parameter NUM_LINKS = 1,
parameter NUM_INPUT_PIPELINE = 1
) (
input clk,
input reset,
@ -183,7 +184,7 @@ end
pipeline_stage #(
.WIDTH(3 * CW + DW),
.REGISTERED(1)
.REGISTERED(NUM_INPUT_PIPELINE)
) i_input_pipeline_stage (
.clk(clk),
.in({

View File

@ -81,6 +81,11 @@ set_parameter_property NUM_LINKS DISPLAY_NAME "Number of Links"
set_parameter_property NUM_LINKS ALLOWED_RANGES 1:8
set_parameter_property NUM_LINKS HDL_PARAMETER true
add_parameter NUM_INPUT_PIPELINE INTEGER 1
set_parameter_property NUM_INPUT_PIPELINE DISPLAY_NAME "Number of input pipeline stages"
set_parameter_property NUM_INPUT_PIPELINE ALLOWED_RANGES 1:3
set_parameter_property NUM_INPUT_PIPELINE HDL_PARAMETER true
#ad_ip_parameter PORT_ENABLE_RX_EOF BOOLEAN false false
#ad_ip_parameter PORT_ENABLE_LMFC_CLK BOOLEAN false false
#ad_ip_parameter PORT_ENABLE_LMFC_EDGE BOOLEAN false false