module_content
stringlengths
18
1.05M
module generic_baseblocks_v2_1_carry_latch_or # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire I, output wire O ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign O = CIN | I; end else begin : USE_FPGA OR2L or2l_inst1 ( .O(O), .DI(CIN), .SRI(I) ); end endgenerate endmodule
module generic_baseblocks_v2_1_carry # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire S, input wire DI, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign COUT = (CIN & S) | (DI & ~S); end else begin : USE_FPGA MUXCY and_inst ( .O (COUT), .CI (CIN), .DI (DI), .S (S) ); end endgenerate endmodule
module generic_baseblocks_v2_1_carry # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire S, input wire DI, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign COUT = (CIN & S) | (DI & ~S); end else begin : USE_FPGA MUXCY and_inst ( .O (COUT), .CI (CIN), .DI (DI), .S (S) ); end endgenerate endmodule
module generic_baseblocks_v2_1_carry # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire S, input wire DI, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign COUT = (CIN & S) | (DI & ~S); end else begin : USE_FPGA MUXCY and_inst ( .O (COUT), .CI (CIN), .DI (DI), .S (S) ); end endgenerate endmodule
module generic_baseblocks_v2_1_carry # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire S, input wire DI, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign COUT = (CIN & S) | (DI & ~S); end else begin : USE_FPGA MUXCY and_inst ( .O (COUT), .CI (CIN), .DI (DI), .S (S) ); end endgenerate endmodule
module generic_baseblocks_v2_1_carry # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire S, input wire DI, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign COUT = (CIN & S) | (DI & ~S); end else begin : USE_FPGA MUXCY and_inst ( .O (COUT), .CI (CIN), .DI (DI), .S (S) ); end endgenerate endmodule
module generic_baseblocks_v2_1_carry # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire S, input wire DI, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign COUT = (CIN & S) | (DI & ~S); end else begin : USE_FPGA MUXCY and_inst ( .O (COUT), .CI (CIN), .DI (DI), .S (S) ); end endgenerate endmodule
module generic_baseblocks_v2_1_carry # ( parameter C_FAMILY = "virtex6" // FPGA Family. Current version: virtex6 or spartan6. ) ( input wire CIN, input wire S, input wire DI, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Instantiate or use RTL code ///////////////////////////////////////////////////////////////////////////// generate if ( C_FAMILY == "rtl" ) begin : USE_RTL assign COUT = (CIN & S) | (DI & ~S); end else begin : USE_FPGA MUXCY and_inst ( .O (COUT), .CI (CIN), .DI (DI), .S (S) ); end endgenerate endmodule
module generic_baseblocks_v2_1_comparator_sel_mask # ( parameter C_FAMILY = "virtex6", // FPGA Family. Current version: virtex6 or spartan6. parameter integer C_DATA_WIDTH = 4 // Data width for comparator. ) ( input wire CIN, input wire S, input wire [C_DATA_WIDTH-1:0] A, input wire [C_DATA_WIDTH-1:0] B, input wire [C_DATA_WIDTH-1:0] M, input wire [C_DATA_WIDTH-1:0] V, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// // Generate variable for bit vector. genvar lut_cnt; ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// // Bits per LUT for this architecture. localparam integer C_BITS_PER_LUT = 1; // Constants for packing levels. localparam integer C_NUM_LUT = ( C_DATA_WIDTH + C_BITS_PER_LUT - 1 ) / C_BITS_PER_LUT; // localparam integer C_FIX_DATA_WIDTH = ( C_NUM_LUT * C_BITS_PER_LUT > C_DATA_WIDTH ) ? C_NUM_LUT * C_BITS_PER_LUT : C_DATA_WIDTH; ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// wire [C_FIX_DATA_WIDTH-1:0] a_local; wire [C_FIX_DATA_WIDTH-1:0] b_local; wire [C_FIX_DATA_WIDTH-1:0] m_local; wire [C_FIX_DATA_WIDTH-1:0] v_local; wire [C_NUM_LUT-1:0] sel; wire [C_NUM_LUT:0] carry_local; ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// generate // Assign input to local vectors. assign carry_local[0] = CIN; // Extend input data to fit. if ( C_NUM_LUT * C_BITS_PER_LUT > C_DATA_WIDTH ) begin : USE_EXTENDED_DATA assign a_local = {A, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; assign b_local = {B, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; assign m_local = {M, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; assign v_local = {V, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; end else begin : NO_EXTENDED_DATA assign a_local = A; assign b_local = B; assign m_local = M; assign v_local = V; end // Instantiate one generic_baseblocks_v2_1_carry and per level. for (lut_cnt = 0; lut_cnt < C_NUM_LUT ; lut_cnt = lut_cnt + 1) begin : LUT_LEVEL // Create the local select signal assign sel[lut_cnt] = ( ( ( a_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) == ( v_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) ) & ( S == 1'b0 ) ) | ( ( ( b_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) == ( v_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) ) & ( S == 1'b1 ) ); // Instantiate each LUT level. generic_baseblocks_v2_1_carry_and # ( .C_FAMILY(C_FAMILY) ) compare_inst ( .COUT (carry_local[lut_cnt+1]), .CIN (carry_local[lut_cnt]), .S (sel[lut_cnt]) ); end // end for lut_cnt // Assign output from local vector. assign COUT = carry_local[C_NUM_LUT]; endgenerate endmodule
module generic_baseblocks_v2_1_comparator_sel_mask # ( parameter C_FAMILY = "virtex6", // FPGA Family. Current version: virtex6 or spartan6. parameter integer C_DATA_WIDTH = 4 // Data width for comparator. ) ( input wire CIN, input wire S, input wire [C_DATA_WIDTH-1:0] A, input wire [C_DATA_WIDTH-1:0] B, input wire [C_DATA_WIDTH-1:0] M, input wire [C_DATA_WIDTH-1:0] V, output wire COUT ); ///////////////////////////////////////////////////////////////////////////// // Variables for generating parameter controlled instances. ///////////////////////////////////////////////////////////////////////////// // Generate variable for bit vector. genvar lut_cnt; ///////////////////////////////////////////////////////////////////////////// // Local params ///////////////////////////////////////////////////////////////////////////// // Bits per LUT for this architecture. localparam integer C_BITS_PER_LUT = 1; // Constants for packing levels. localparam integer C_NUM_LUT = ( C_DATA_WIDTH + C_BITS_PER_LUT - 1 ) / C_BITS_PER_LUT; // localparam integer C_FIX_DATA_WIDTH = ( C_NUM_LUT * C_BITS_PER_LUT > C_DATA_WIDTH ) ? C_NUM_LUT * C_BITS_PER_LUT : C_DATA_WIDTH; ///////////////////////////////////////////////////////////////////////////// // Functions ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Internal signals ///////////////////////////////////////////////////////////////////////////// wire [C_FIX_DATA_WIDTH-1:0] a_local; wire [C_FIX_DATA_WIDTH-1:0] b_local; wire [C_FIX_DATA_WIDTH-1:0] m_local; wire [C_FIX_DATA_WIDTH-1:0] v_local; wire [C_NUM_LUT-1:0] sel; wire [C_NUM_LUT:0] carry_local; ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// generate // Assign input to local vectors. assign carry_local[0] = CIN; // Extend input data to fit. if ( C_NUM_LUT * C_BITS_PER_LUT > C_DATA_WIDTH ) begin : USE_EXTENDED_DATA assign a_local = {A, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; assign b_local = {B, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; assign m_local = {M, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; assign v_local = {V, {C_NUM_LUT * C_BITS_PER_LUT - C_DATA_WIDTH{1'b0}}}; end else begin : NO_EXTENDED_DATA assign a_local = A; assign b_local = B; assign m_local = M; assign v_local = V; end // Instantiate one generic_baseblocks_v2_1_carry and per level. for (lut_cnt = 0; lut_cnt < C_NUM_LUT ; lut_cnt = lut_cnt + 1) begin : LUT_LEVEL // Create the local select signal assign sel[lut_cnt] = ( ( ( a_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) == ( v_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) ) & ( S == 1'b0 ) ) | ( ( ( b_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) == ( v_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] & m_local[lut_cnt*C_BITS_PER_LUT +: C_BITS_PER_LUT] ) ) & ( S == 1'b1 ) ); // Instantiate each LUT level. generic_baseblocks_v2_1_carry_and # ( .C_FAMILY(C_FAMILY) ) compare_inst ( .COUT (carry_local[lut_cnt+1]), .CIN (carry_local[lut_cnt]), .S (sel[lut_cnt]) ); end // end for lut_cnt // Assign output from local vector. assign COUT = carry_local[C_NUM_LUT]; endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module pipeline_registers ( input clk, input reset_n, input [BIT_WIDTH-1:0] pipe_in, output reg [BIT_WIDTH-1:0] pipe_out ); // WARNING!!! THESE PARAMETERS ARE INTENDED TO BE MODIFIED IN A TOP // LEVEL MODULE. LOCAL CHANGES HERE WILL, MOST LIKELY, BE // OVERWRITTEN! parameter BIT_WIDTH = 10, NUMBER_OF_STAGES = 5; // Main generate function for conditional hardware instantiation generate genvar i; // Pass-through case for the odd event that no pipeline stages are // specified. if (NUMBER_OF_STAGES == 0) begin always @ * pipe_out = pipe_in; end // Single flop case for a single stage pipeline else if (NUMBER_OF_STAGES == 1) begin always @ (posedge clk or negedge reset_n) pipe_out <= (!reset_n) ? 0 : pipe_in; end // Case for 2 or more pipeline stages else begin // Create the necessary regs reg [BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:0] pipe_gen; // Create logic for the initial and final pipeline registers always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin pipe_gen[BIT_WIDTH-1:0] <= 0; pipe_out <= 0; end else begin pipe_gen[BIT_WIDTH-1:0] <= pipe_in; pipe_out <= pipe_gen[BIT_WIDTH*(NUMBER_OF_STAGES-1)-1:BIT_WIDTH*(NUMBER_OF_STAGES-2)]; end end // Create the intermediate pipeline registers if there are 3 or // more pipeline stages for (i = 1; i < NUMBER_OF_STAGES-1; i = i + 1) begin : pipeline always @ (posedge clk or negedge reset_n) pipe_gen[BIT_WIDTH*(i+1)-1:BIT_WIDTH*i] <= (!reset_n) ? 0 : pipe_gen[BIT_WIDTH*i-1:BIT_WIDTH*(i-1)]; end end endgenerate endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module t_div_pipelined(); reg clk, start, reset_n; reg [7:0] dividend, divisor; wire data_valid, div_by_zero; wire [7:0] quotient, quotient_correct; parameter BITS = 8; div_pipelined #( .BITS(BITS) ) div_pipelined ( .clk(clk), .reset_n(reset_n), .dividend(dividend), .divisor(divisor), .quotient(quotient), .div_by_zero(div_by_zero), // .quotient_correct(quotient_correct), .start(start), .data_valid(data_valid) ); initial begin #10 reset_n = 0; #50 reset_n = 1; #1 clk = 0; dividend = -1; divisor = 127; #1000 $finish; end // always // #20 dividend = dividend + 1; always begin #10 divisor = divisor - 1; start = 1; #10 start = 0; end always #5 clk = ~clk; endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module button_debounce ( input clk, // clock input reset_n, // asynchronous reset input button, // bouncy button output reg debounce // debounced 1-cycle signal ); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; // These parameters are specified such that you can choose any power // of 2 frequency for a debouncer between 1 Hz and // CLK_FREQUENCY. Note, that this will throw errors if you choose a // non power of 2 frequency (i.e. count_value evaluates to some // number / 3 which isn't interpreted as a logical right shift). I'm // assuming this will not work for DEBOUNCE_HZ values less than 1, // however, I'm uncertain of the value of a debouncer for fractional // hertz button presses. localparam COUNT_VALUE = CLK_FREQUENCY / DEBOUNCE_HZ, WAIT = 0, FIRE = 1, COUNT = 2; reg [1:0] state, next_state; reg [25:0] count; always @ (posedge clk or negedge reset_n) state <= (!reset_n) ? WAIT : next_state; always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin debounce <= 0; count <= 0; end else begin debounce <= 0; count <= 0; case (state) WAIT: begin end FIRE: begin debounce <= 1; end COUNT: begin count <= count + 1; end endcase end end always @ * begin case (state) WAIT: next_state = (button) ? FIRE : state; FIRE: next_state = COUNT; COUNT: next_state = (count > COUNT_VALUE - 1) ? WAIT : state; default: next_state = WAIT; endcase end endmodule
module that // instantiates this one. always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin data_valid <= 0; root <= 0; end else begin data_valid <= start_gen[OUTPUT_BITS-1]; if (root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] > root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]) root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] + 1; else root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]; end end endmodule
module that // instantiates this one. always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin data_valid <= 0; root <= 0; end else begin data_valid <= start_gen[OUTPUT_BITS-1]; if (root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] > root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]) root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] + 1; else root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]; end end endmodule
module that // instantiates this one. always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin data_valid <= 0; root <= 0; end else begin data_valid <= start_gen[OUTPUT_BITS-1]; if (root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] > root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]) root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] + 1; else root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]; end end endmodule
module that // instantiates this one. always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin data_valid <= 0; root <= 0; end else begin data_valid <= start_gen[OUTPUT_BITS-1]; if (root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] > root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]) root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] + 1; else root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]; end end endmodule
module that // instantiates this one. always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin data_valid <= 0; root <= 0; end else begin data_valid <= start_gen[OUTPUT_BITS-1]; if (root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] > root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]) root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] + 1; else root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]; end end endmodule
module that // instantiates this one. always @ (posedge clk or negedge reset_n) begin if (!reset_n) begin data_valid <= 0; root <= 0; end else begin data_valid <= start_gen[OUTPUT_BITS-1]; if (root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] > root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]) root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS] + 1; else root <= root_gen[OUTPUT_BITS*INPUT_BITS-1:OUTPUT_BITS*INPUT_BITS-INPUT_BITS]; end end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_button_debounce(); parameter CLK_FREQUENCY = 66000000, DEBOUNCE_HZ = 2; reg clk, reset_n, button; wire debounce; button_debounce #( .CLK_FREQUENCY(CLK_FREQUENCY), .DEBOUNCE_HZ(DEBOUNCE_HZ) ) button_debounce ( .clk(clk), .reset_n(reset_n), .button(button), .debounce(debounce) ); initial begin clk = 1'bx; reset_n = 1'bx; button = 1'bx; #10 reset_n = 1; #10 reset_n = 0; clk = 0; #10 reset_n = 1; #10 button = 0; end always #5 clk = ~clk; always begin #100 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; #0.1 button = ~button; end endmodule
module t_sqrt_pipelined(); parameter INPUT_BITS = 4; localparam OUTPUT_BITS = INPUT_BITS / 2 + INPUT_BITS % 2; reg [INPUT_BITS-1:0] radicand; reg clk, start, reset_n; wire [OUTPUT_BITS-1:0] root; wire data_valid; // wire [7:0] root_good; sqrt_pipelined #( .INPUT_BITS(INPUT_BITS) ) sqrt_pipelined ( .clk(clk), .reset_n(reset_n), .start(start), .radicand(radicand), .data_valid(data_valid), .root(root) ); initial begin radicand = 16'bx; clk = 1'bx; start = 1'bx; reset_n = 1'bx;; #10 reset_n = 0; clk = 0; #50 reset_n = 1; radicand = 0; // #40 radicand = 81; start = 1; // #10 radicand = 16'bx; start = 0; #10000 $finish; end always #5 clk = ~clk; always begin #10 radicand = radicand + 1; start = 1; #10 start = 0; end // always begin // #80 start = 1; // #10 start = 0; // end endmodule
module t_sqrt_pipelined(); parameter INPUT_BITS = 4; localparam OUTPUT_BITS = INPUT_BITS / 2 + INPUT_BITS % 2; reg [INPUT_BITS-1:0] radicand; reg clk, start, reset_n; wire [OUTPUT_BITS-1:0] root; wire data_valid; // wire [7:0] root_good; sqrt_pipelined #( .INPUT_BITS(INPUT_BITS) ) sqrt_pipelined ( .clk(clk), .reset_n(reset_n), .start(start), .radicand(radicand), .data_valid(data_valid), .root(root) ); initial begin radicand = 16'bx; clk = 1'bx; start = 1'bx; reset_n = 1'bx;; #10 reset_n = 0; clk = 0; #50 reset_n = 1; radicand = 0; // #40 radicand = 81; start = 1; // #10 radicand = 16'bx; start = 0; #10000 $finish; end always #5 clk = ~clk; always begin #10 radicand = radicand + 1; start = 1; #10 start = 0; end // always begin // #80 start = 1; // #10 start = 0; // end endmodule
module t_sqrt_pipelined(); parameter INPUT_BITS = 4; localparam OUTPUT_BITS = INPUT_BITS / 2 + INPUT_BITS % 2; reg [INPUT_BITS-1:0] radicand; reg clk, start, reset_n; wire [OUTPUT_BITS-1:0] root; wire data_valid; // wire [7:0] root_good; sqrt_pipelined #( .INPUT_BITS(INPUT_BITS) ) sqrt_pipelined ( .clk(clk), .reset_n(reset_n), .start(start), .radicand(radicand), .data_valid(data_valid), .root(root) ); initial begin radicand = 16'bx; clk = 1'bx; start = 1'bx; reset_n = 1'bx;; #10 reset_n = 0; clk = 0; #50 reset_n = 1; radicand = 0; // #40 radicand = 81; start = 1; // #10 radicand = 16'bx; start = 0; #10000 $finish; end always #5 clk = ~clk; always begin #10 radicand = radicand + 1; start = 1; #10 start = 0; end // always begin // #80 start = 1; // #10 start = 0; // end endmodule
module t_sqrt_pipelined(); parameter INPUT_BITS = 4; localparam OUTPUT_BITS = INPUT_BITS / 2 + INPUT_BITS % 2; reg [INPUT_BITS-1:0] radicand; reg clk, start, reset_n; wire [OUTPUT_BITS-1:0] root; wire data_valid; // wire [7:0] root_good; sqrt_pipelined #( .INPUT_BITS(INPUT_BITS) ) sqrt_pipelined ( .clk(clk), .reset_n(reset_n), .start(start), .radicand(radicand), .data_valid(data_valid), .root(root) ); initial begin radicand = 16'bx; clk = 1'bx; start = 1'bx; reset_n = 1'bx;; #10 reset_n = 0; clk = 0; #50 reset_n = 1; radicand = 0; // #40 radicand = 81; start = 1; // #10 radicand = 16'bx; start = 0; #10000 $finish; end always #5 clk = ~clk; always begin #10 radicand = radicand + 1; start = 1; #10 start = 0; end // always begin // #80 start = 1; // #10 start = 0; // end endmodule
module t_sqrt_pipelined(); parameter INPUT_BITS = 4; localparam OUTPUT_BITS = INPUT_BITS / 2 + INPUT_BITS % 2; reg [INPUT_BITS-1:0] radicand; reg clk, start, reset_n; wire [OUTPUT_BITS-1:0] root; wire data_valid; // wire [7:0] root_good; sqrt_pipelined #( .INPUT_BITS(INPUT_BITS) ) sqrt_pipelined ( .clk(clk), .reset_n(reset_n), .start(start), .radicand(radicand), .data_valid(data_valid), .root(root) ); initial begin radicand = 16'bx; clk = 1'bx; start = 1'bx; reset_n = 1'bx;; #10 reset_n = 0; clk = 0; #50 reset_n = 1; radicand = 0; // #40 radicand = 81; start = 1; // #10 radicand = 16'bx; start = 0; #10000 $finish; end always #5 clk = ~clk; always begin #10 radicand = radicand + 1; start = 1; #10 start = 0; end // always begin // #80 start = 1; // #10 start = 0; // end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module sign_extender #( parameter INPUT_WIDTH = 8, OUTPUT_WIDTH = 16 ) ( input [INPUT_WIDTH-1:0] original, output reg [OUTPUT_WIDTH-1:0] sign_extended_original ); wire [OUTPUT_WIDTH-INPUT_WIDTH-1:0] sign_extend; generate genvar i; for (i = 0; i < OUTPUT_WIDTH-INPUT_WIDTH; i = i + 1) begin : gen_sign_extend assign sign_extend[i] = (original[INPUT_WIDTH-1]) ? 1'b1 : 1'b0; end endgenerate always @ * begin sign_extended_original = {sign_extend,original}; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule
module glbl (); parameter ROC_WIDTH = 100000; parameter TOC_WIDTH = 0; //-------- STARTUP Globals -------------- wire GSR; wire GTS; wire GWE; wire PRLD; tri1 p_up_tmp; tri (weak1, strong0) PLL_LOCKG = p_up_tmp; wire PROGB_GLBL; wire CCLKO_GLBL; wire FCSBO_GLBL; wire [3:0] DO_GLBL; wire [3:0] DI_GLBL; reg GSR_int; reg GTS_int; reg PRLD_int; //-------- JTAG Globals -------------- wire JTAG_TDO_GLBL; wire JTAG_TCK_GLBL; wire JTAG_TDI_GLBL; wire JTAG_TMS_GLBL; wire JTAG_TRST_GLBL; reg JTAG_CAPTURE_GLBL; reg JTAG_RESET_GLBL; reg JTAG_SHIFT_GLBL; reg JTAG_UPDATE_GLBL; reg JTAG_RUNTEST_GLBL; reg JTAG_SEL1_GLBL = 0; reg JTAG_SEL2_GLBL = 0 ; reg JTAG_SEL3_GLBL = 0; reg JTAG_SEL4_GLBL = 0; reg JTAG_USER_TDO1_GLBL = 1'bz; reg JTAG_USER_TDO2_GLBL = 1'bz; reg JTAG_USER_TDO3_GLBL = 1'bz; reg JTAG_USER_TDO4_GLBL = 1'bz; assign (weak1, weak0) GSR = GSR_int; assign (weak1, weak0) GTS = GTS_int; assign (weak1, weak0) PRLD = PRLD_int; initial begin GSR_int = 1'b1; PRLD_int = 1'b1; #(ROC_WIDTH) GSR_int = 1'b0; PRLD_int = 1'b0; end initial begin GTS_int = 1'b1; #(TOC_WIDTH) GTS_int = 1'b0; end endmodule