Comments on: Verilog Generate Configurable RTL Designs https://www.verilogpro.com/verilog-generate-configurable-rtl/ Verilog and Systemverilog Resources for Design and Verification Mon, 27 Jun 2022 07:38:34 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Dale https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-2912 Fri, 04 Jun 2021 09:23:18 +0000 http://www.verilogpro.com/?p=641#comment-2912 in the for loop,what is the meaning of the” gi=0; gi<SIZE; gi=gi+1″ .should gi < size

]]>
By: Meenakshi Agarwal https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1825 Thu, 03 Oct 2019 12:34:40 +0000 http://www.verilogpro.com/?p=641#comment-1825 Nice article Jason, very helpful for beginners.

]]>
By: Jason Yu https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1806 Sun, 08 Sep 2019 02:05:09 +0000 http://www.verilogpro.com/?p=641#comment-1806 In reply to rajeev kumar.

Yes it is certainly synthesizable and can be implemented in FPGA.

]]>
By: rajeev kumar https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1805 Sun, 08 Sep 2019 02:00:21 +0000 http://www.verilogpro.com/?p=641#comment-1805 Sir gray2bin code is synthesizable yes not and can I implement on the FPGA board

]]>
By: Nivetha https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1767 Wed, 31 Jul 2019 04:13:37 +0000 http://www.verilogpro.com/?p=641#comment-1767 Nice work… Keep going…. Nice page…

]]>
By: Jason Yu https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1669 Sat, 01 Jun 2019 16:03:58 +0000 http://www.verilogpro.com/?p=641#comment-1669 In reply to Dhruvkumar Patel.

Thanks for spotting the typo!

]]>
By: Dhruvkumar Patel https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1653 Wed, 29 May 2019 01:02:12 +0000 http://www.verilogpro.com/?p=641#comment-1653 Great article but there are several errors,

module for_loop_synthesis (i_Clock);
input i_Clock;
integer ii=0;
reg [3:0] r_Shift_With_For = 4’h1;
reg [3:0] r_Shift_Regular = 4’h1;

// Performs a shift left using a for loop
always @(posedge i_Clock)
begin
for(ii=0; ii<3; ii=ii+1)
r_Shift_With_For[ii+1] <= r_Shift_With_For[ii];
end

// Performs a shift left using regular statements
always @(posedge i_Clock)
begin
r_Shift_Regular[1] <= r_Shift_Regular[0];
r_Shift_Regular[2] <= r_Shift_Regular[1];
r_Shift_Regular[3] <= r_Shift_Regular[2];
end
endmodule

module for_loop_synthesis_tb (); // Testbench
reg r_Clock = 1'b0;
// Instantiate the Unit Under Test (UUT)
for_loop_synthesis UUT (.i_Clock(r_Clock));
always
#10 r_Clock = !r_Clock;
endmodule

module gray2bin
#(parameter SIZE = 8)
(
input [SIZE-1:0] gray,
output [SIZE-1:0] bin
);

generate
genvar gi;
// generate and endgenerate is optional
// generate (optional)
for (gi=0; gi<SIZE; gi=gi+1) begin : genbit
assign bin[gi] = ^gray[SIZE-1:gi];
end
// endgenerate (optional)
endgenerate
endmodule

module gray2bin_tb(); //Testbench
reg [15:0] in,out;

gray2bin #(16) DUT ( .gray(in), .bin(out) );

integer jj=0;

initial begin

for(jj=0;jj<16;jj=jj+1) begin
in=jj;
#5;
end
end

endmodule

i have corrected all of them for you

thank you for making this cheers

]]>
By: Ethan Zheng https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1504 Fri, 15 Mar 2019 13:49:52 +0000 http://www.verilogpro.com/?p=641#comment-1504 Beautifully written, terse and clear!

]]>
By: Jason Yu https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1503 Fri, 15 Mar 2019 02:29:12 +0000 http://www.verilogpro.com/?p=641#comment-1503 In reply to Francisco.

Yes you can also wrap always and assign statements in a generate.

]]>
By: Francisco https://www.verilogpro.com/verilog-generate-configurable-rtl/#comment-1502 Fri, 15 Mar 2019 00:00:30 +0000 http://www.verilogpro.com/?p=641#comment-1502 Nice post. Seeing that you are using instances of logic gates. Guess I can instantiate any other module, but what about processes such as “always” or “assign”?

]]>