|
|
@@ -440,7 +440,7 @@ endmodule
|
|
|
// The head is the current scan axis. Both the core axis index and this bank
|
|
|
// advance every active clock; the updated word returns at the tail. This
|
|
|
// removes the wide dynamic read selector and per-axis write selection.
|
|
|
-module motor_axis_words #(parameter integer AXIS_COUNT=3)
|
|
|
+module motor_axis_words #(parameter integer AXIS_COUNT=3, parameter integer USE_DSP=0)
|
|
|
(input wire clk,rst_n,
|
|
|
input wire [321:0] write_data,output wire [321:0] read_data);
|
|
|
reg [321:0] words [0:AXIS_COUNT-1];
|
|
|
@@ -453,10 +453,8 @@ module motor_axis_words #(parameter integer AXIS_COUNT=3)
|
|
|
end
|
|
|
end
|
|
|
// Eight documented two-register DSP pipelines carry144 zero-initialized
|
|
|
- // state bits. Remaining clocks stay in fabric registers, so the complete
|
|
|
- // delay is still exactly AXIS_COUNT clocks. The half-period reset bit is
|
|
|
- // outside this range. One-axis verification keeps the original bank.
|
|
|
- generate if(AXIS_COUNT>=2)begin:dsp_storage
|
|
|
+ // state bits. When USE_DSP=0, state is stored in clean fabric registers without wasting DSPs.
|
|
|
+ generate if(USE_DSP && AXIS_COUNT>=2)begin:dsp_storage
|
|
|
wire [143:0] dsp_delayed;
|
|
|
genvar d;
|
|
|
for(d=0;d<8;d=d+1)begin:lanes
|
|
|
@@ -480,6 +478,7 @@ module motor_axis_words #(parameter integer AXIS_COUNT=3)
|
|
|
end
|
|
|
assign read_data={words[0][321:176],complete_delay,words[0][31:0]};
|
|
|
end else begin:fabric_storage
|
|
|
+ wire [143:0] dsp_delayed = words[0][175:32];
|
|
|
assign read_data=words[0];
|
|
|
end endgenerate
|
|
|
endmodule
|