Altera_Forum
Honored Contributor
15 years agoAllow Any Shift Register Size for Recongnition Option On/Off
Hi!Everybody!
I am confused by the Allow Any Shift Register Size for Recongnition Option in the more settings of Compilation & Analysis settings. ------------------------------------------------------- The following is the resource code. module test(clk,shift,sr_in,sr_out); input clk,shift; input sr_in; output sr_out; reg [63:0]shift_reg; always @(posedge clk) begin if (shift==1'b1) shift_reg[63:1] <= shift_reg[62:0]; shift_reg[0] <= sr_in; end assign sr_out = shift_reg[63]; endmodule --------------------------------------------- As we all know,It's only a Signal-Bit Wide,64-Bit Shift Register.I am confused by that when I set the Allow Any Shift Register Size for Recongnition Option to "ON", the using resource make me very surprise,this is the printscreen: http://images.cnblogs.com/cnblogs_com/tdyizhen1314/257630/r_2on.png However, when I set the Allow Any Shift Register Size for Recongnition Option to "OFF", the following is the printscreen of Compilation report: http://images.cnblogs.com/cnblogs_com/tdyizhen1314/257630/r_2off.png I think,when I set the Allow Any Shift Register Size for Recongnition Option to "ON", Quartus II should use registers to implement it, not combinational logic or Memory bits, and when I set the Option to "OFF", Either registers or combinational logic is possible , So Can you tell me the reason between the two compilation report, thanks!