Adding Vortex Yosys build support

This commit is contained in:
Blaise Tine
2021-09-08 23:04:33 -04:00
parent a25076b9c1
commit a46c32ed4b
6 changed files with 114 additions and 128 deletions

View File

@@ -49,15 +49,18 @@ module VX_multiplier #(
assign result = result_unqual;
end else begin
reg [WIDTHP-1:0] result_pipe [LATENCY-1:0];
for (genvar i = 0; i < LATENCY; i++) begin
always @(posedge clk) begin
if (enable) begin
result_pipe[0] <= result_unqual;
end
end
for (genvar i = 1; i < LATENCY; i++) begin
always @(posedge clk) begin
if (enable) begin
result_pipe[i] <= (0 == i) ? result_unqual : result_pipe[i-1];
result_pipe[i] <= result_pipe[i-1];
end
end
end
end
assign result = result_pipe[LATENCY-1];
end