Fixing issues in CycloneV cell sim

This commit is contained in:
Diego 2019-04-11 19:59:03 -05:00
parent 0deaccbaae
commit 643ae9bfc5
1 changed files with 9 additions and 3 deletions

View File

@ -85,7 +85,7 @@ module cyclonev_lcell_comb
begin begin
upper_lut_value = lut4(mask[31:16], dataa, datab, datac, datad); upper_lut_value = lut4(mask[31:16], dataa, datab, datac, datad);
lower_lut_value = lut4(mask[15:0], dataa, datab, datac, datad); lower_lut_value = lut4(mask[15:0], dataa, datab, datac, datad);
lut5 = (datae) ? upper_mask_value : lower_mask_value; lut5 = (datae) ? upper_lut_value : lower_lut_value;
end end
endfunction // lut5 endfunction // lut5
@ -95,15 +95,16 @@ module cyclonev_lcell_comb
input dataa, datab, datac, datad, datae, dataf; input dataa, datab, datac, datad, datae, dataf;
reg upper_lut_value; reg upper_lut_value;
reg lower_lut_value; reg lower_lut_value;
reg out_0, out_1, out_2, out_3;
begin begin
upper_lut_value = lut5(mask[63:32], dataa, datab, datac, datad, datae); upper_lut_value = lut5(mask[63:32], dataa, datab, datac, datad, datae);
lower_lut_value = lut5(mask[31:0], dataa, datab, datac, datad, datae); lower_lut_value = lut5(mask[31:0], dataa, datab, datac, datad, datae);
lut6 = (dataf) ? upper_mask_value : lower_mask_value; lut6 = (dataf) ? upper_lut_value : lower_lut_value;
end end
endfunction // lut6 endfunction // lut6
assign {mask_a, mask_b, mask_c, mask_d} = {lut_mask[15:0], lut_mask[31:16], lut_mask[47:32], lut_mask[63:48]}; assign {mask_a, mask_b, mask_c, mask_d} = {lut_mask[15:0], lut_mask[31:16], lut_mask[47:32], lut_mask[63:48]};
`ifdef ADVANCED_ALM
always @(*) begin always @(*) begin
if(extended_lut == "on") if(extended_lut == "on")
shared_lut_alm = datag; shared_lut_alm = datag;
@ -115,6 +116,11 @@ module cyclonev_lcell_comb
out_2 = lut4(mask_c, dataa, datab, datac, datad); out_2 = lut4(mask_c, dataa, datab, datac, datad);
out_3 = lut4(mask_d, dataa, datab, shared_lut_alm, datad); out_3 = lut4(mask_d, dataa, datab, shared_lut_alm, datad);
end end
`else
`ifdef DEBUG
initial $display("Advanced ALM lut combine is not implemented yet");
`endif
`endif
endmodule // cyclonev_lcell_comb endmodule // cyclonev_lcell_comb