//----------------------------------------------------------------- // System Generator version 10.1.3 VERILOG source file. // // Copyright(C) 2008 by Xilinx, Inc. All rights reserved. This // text/file contains proprietary, confidential information of Xilinx, // Inc., is distributed under license from Xilinx, Inc., and may be used, // copied and/or disclosed only pursuant to the terms of a valid license // agreement with Xilinx, Inc. Xilinx hereby grants you a license to use // this text/file solely for design, simulation, implementation and // creation of design files limited to Xilinx devices or technologies. // Use with non-Xilinx devices or technologies is expressly prohibited // and immediately terminates your license unless covered by a separate // agreement. // // Xilinx is providing this design, code, or information "as is" solely // for use in developing programs and solutions for Xilinx devices. By // providing this design, code, or information as one possible // implementation of this feature, application or standard, Xilinx is // making no representation that this implementation is free from any // claims of infringement. You are responsible for obtaining any rights // you may require for your implementation. Xilinx expressly disclaims // any warranty whatsoever with respect to the adequacy of the // implementation, including but not limited to warranties of // merchantability or fitness for a particular purpose. // // Xilinx products are not intended for use in life support appliances, // devices, or systems. Use in such applications is expressly prohibited. // // Any modifications that are made to the source code are done at the user's // sole risk and will be unsupported. // // This copyright and support notice must be retained as part of this // text at all times. (c) Copyright 1995-2008 Xilinx, Inc. All rights // reserved. //----------------------------------------------------------------- //----------------------------------------------------------------- // System Generator version 10.1.3 VERILOG source file. // // Copyright(C) 2008 by Xilinx, Inc. All rights reserved. This // text/file contains proprietary, confidential information of Xilinx, // Inc., is distributed under license from Xilinx, Inc., and may be used, // copied and/or disclosed only pursuant to the terms of a valid license // agreement with Xilinx, Inc. Xilinx hereby grants you a license to use // this text/file solely for design, simulation, implementation and // creation of design files limited to Xilinx devices or technologies. // Use with non-Xilinx devices or technologies is expressly prohibited // and immediately terminates your license unless covered by a separate // agreement. // // Xilinx is providing this design, code, or information "as is" solely // for use in developing programs and solutions for Xilinx devices. By // providing this design, code, or information as one possible // implementation of this feature, application or standard, Xilinx is // making no representation that this implementation is free from any // claims of infringement. You are responsible for obtaining any rights // you may require for your implementation. Xilinx expressly disclaims // any warranty whatsoever with respect to the adequacy of the // implementation, including but not limited to warranties of // merchantability or fitness for a particular purpose. // // Xilinx products are not intended for use in life support appliances, // devices, or systems. Use in such applications is expressly prohibited. // // Any modifications that are made to the source code are done at the user's // sole risk and will be unsupported. // // This copyright and support notice must be retained as part of this // text at all times. (c) Copyright 1995-2008 Xilinx, Inc. All rights // reserved. //----------------------------------------------------------------- // synopsys translate_off `ifndef simulating `define simulating 1 `endif // synopsys translate_on `ifndef simulating `define simulating 0 `endif `ifndef xlUnsigned `define xlUnsigned 1 `endif `ifndef xlSigned `define xlSigned 2 `endif `ifndef xlWrap `define xlWrap 1 `endif `ifndef xlSaturate `define xlSaturate 2 `endif `ifndef xlTruncate `define xlTruncate 1 `endif `ifndef xlRound `define xlRound 2 `endif `ifndef xlRoundBanker `define xlRoundBanker 3 `endif `ifndef xlAddMode `define xlAddMode 1 `endif `ifndef xlSubMode `define xlSubMode 2 `endif //----------------------------------------------------------------- // System Generator version 10.1.3 VERILOG source file. // // Copyright(C) 2008 by Xilinx, Inc. All rights reserved. This // text/file contains proprietary, confidential information of Xilinx, // Inc., is distributed under license from Xilinx, Inc., and may be used, // copied and/or disclosed only pursuant to the terms of a valid license // agreement with Xilinx, Inc. Xilinx hereby grants you a license to use // this text/file solely for design, simulation, implementation and // creation of design files limited to Xilinx devices or technologies. // Use with non-Xilinx devices or technologies is expressly prohibited // and immediately terminates your license unless covered by a separate // agreement. // // Xilinx is providing this design, code, or information "as is" solely // for use in developing programs and solutions for Xilinx devices. By // providing this design, code, or information as one possible // implementation of this feature, application or standard, Xilinx is // making no representation that this implementation is free from any // claims of infringement. You are responsible for obtaining any rights // you may require for your implementation. Xilinx expressly disclaims // any warranty whatsoever with respect to the adequacy of the // implementation, including but not limited to warranties of // merchantability or fitness for a particular purpose. // // Xilinx products are not intended for use in life support appliances, // devices, or systems. Use in such applications is expressly prohibited. // // Any modifications that are made to the source code are done at the user's // sole risk and will be unsupported. // // This copyright and support notice must be retained as part of this // text at all times. (c) Copyright 1995-2008 Xilinx, Inc. All rights // reserved. //----------------------------------------------------------------- `timescale 1 ns / 10 ps module xlclkprobe (clk, clr, ce, fakeOutForXst); input clk; input clr; input ce; output fakeOutForXst; assign fakeOutForXst = 1'b0 ; //synopsys translate_off assign clock_pkg.int_clk = clk ; //synopsys translate_on endmodule //----------------------------------------------------------------- // System Generator version 10.1.3 VERILOG source file. // // Copyright(C) 2008 by Xilinx, Inc. All rights reserved. This // text/file contains proprietary, confidential information of Xilinx, // Inc., is distributed under license from Xilinx, Inc., and may be used, // copied and/or disclosed only pursuant to the terms of a valid license // agreement with Xilinx, Inc. Xilinx hereby grants you a license to use // this text/file solely for design, simulation, implementation and // creation of design files limited to Xilinx devices or technologies. // Use with non-Xilinx devices or technologies is expressly prohibited // and immediately terminates your license unless covered by a separate // agreement. // // Xilinx is providing this design, code, or information "as is" solely // for use in developing programs and solutions for Xilinx devices. By // providing this design, code, or information as one possible // implementation of this feature, application or standard, Xilinx is // making no representation that this implementation is free from any // claims of infringement. You are responsible for obtaining any rights // you may require for your implementation. Xilinx expressly disclaims // any warranty whatsoever with respect to the adequacy of the // implementation, including but not limited to warranties of // merchantability or fitness for a particular purpose. // // Xilinx products are not intended for use in life support appliances, // devices, or systems. Use in such applications is expressly prohibited. // // Any modifications that are made to the source code are done at the user's // sole risk and will be unsupported. // // This copyright and support notice must be retained as part of this // text at all times. (c) Copyright 1995-2008 Xilinx, Inc. All rights // reserved. //----------------------------------------------------------------- `timescale 1 ns / 10 ps module xlclockdriver (sysclk, sysclr, sysce, clk, clr, ce); parameter signed [31:0] log_2_period = 1; parameter signed [31:0] period = 2; parameter signed [31:0] use_bufg = 1'b0; parameter signed [31:0] pipeline_regs = 5; input sysclk; input sysclr; input sysce; output clk; output clr; output ce; parameter signed [31:0] max_pipeline_regs = 8; parameter signed [31:0] num_pipeline_regs = (max_pipeline_regs > pipeline_regs)? pipeline_regs : max_pipeline_regs; parameter signed [31:0] factor = num_pipeline_regs/period; parameter signed [31:0] rem_pipeline_regs = num_pipeline_regs - (period * factor) + 1; parameter [log_2_period-1:0] trunc_period = ~period + 1; parameter signed [31:0] period_floor = (period>2)? period : 2; parameter signed [31:0] power_of_2_counter = (trunc_period == period) ? 1 : 0; parameter signed [31:0] cnt_width = (power_of_2_counter & (log_2_period>1)) ? (log_2_period - 1) : log_2_period; parameter [cnt_width-1:0] clk_for_ce_pulse_minus1 = period_floor-2; parameter [cnt_width-1:0] clk_for_ce_pulse_minus2 = (period-3>0)? period-3 : 0; parameter [cnt_width-1:0] clk_for_ce_pulse_minus_regs = ((period-rem_pipeline_regs)>0)? (period-rem_pipeline_regs) : 0; reg [cnt_width-1:0] clk_num; reg temp_ce_vec; (* MAX_FANOUT="REDUCE" *)wire [num_pipeline_regs:0] ce_vec /* synthesis MAX_FANOUT="REDUCE" */ ; wire internal_ce; reg cnt_clr; wire cnt_clr_dly; genvar index; initial begin clk_num = 'b0; end assign clk = sysclk ; assign clr = sysclr ; always @(posedge sysclk) begin : cntr_gen if ((cnt_clr_dly == 1'b1) || (sysclr == 1'b1)) begin:u1 clk_num = {cnt_width{1'b0}}; end else begin:u2 clk_num = clk_num + 1 ; end end generate if (power_of_2_counter == 1) begin:clr_gen_p2 always @(sysclr) begin:u1 cnt_clr = sysclr; end end endgenerate generate if (power_of_2_counter == 0) begin:clr_gen always @(clk_num or sysclr) begin:u1 if ( (clk_num == clk_for_ce_pulse_minus1) | (sysclr == 1'b1) ) begin:u2 cnt_clr = 1'b1 ; end else begin:u3 cnt_clr = 1'b0 ; end end end endgenerate synth_reg_w_init #(1, 0, 'b0000, 1) clr_reg(.i(cnt_clr), .ce(sysce), .clr(sysclr), .clk(sysclk), .o(cnt_clr_dly)); generate if (period > 1) begin:pipelined_ce always @(clk_num) begin:np_ce_gen if (clk_num == clk_for_ce_pulse_minus_regs) begin temp_ce_vec = 1'b1 ; end else begin temp_ce_vec = 1'b0 ; end end for(index=0; index0)?0:1), 1'b0, 1) ce_reg(.i(ce_vec[index+1]), .ce(sysce), .clr(sysclr), .clk(sysclk), .o(ce_vec[index])); end assign ce_vec[num_pipeline_regs] = temp_ce_vec; assign internal_ce = ce_vec[0]; end endgenerate generate if (period > 1) begin:period_greater_than_1 if (use_bufg == 1'b1) begin:use_bufg BUFG ce_bufg_inst(.I(internal_ce), .O(ce)); end else begin:no_bufg assign ce = internal_ce; end end endgenerate generate if (period == 1) begin:period_1 assign ce = sysce; end endgenerate endmodule (* syn_noprune = "true" *) (* optimize_primitives = "false" *) (* dont_touch = "true" *) module default_clock_driver ( ce_1, ce_8, clk_1, clk_8, sysclk, sysce, sysce_clr ); input sysclk; input sysce; input sysce_clr; output ce_1; output ce_8; output clk_1; output clk_8; wire sysce_clr_x0; wire sysce_x0; wire sysclk_x0; wire xlclockdriver_1_ce; wire xlclockdriver_1_clk; wire xlclockdriver_8_ce; wire xlclockdriver_8_clk; assign ce_1 = xlclockdriver_1_ce; assign ce_8 = xlclockdriver_8_ce; assign clk_1 = xlclockdriver_1_clk; assign clk_8 = xlclockdriver_8_clk; assign sysclk_x0 = sysclk; assign sysce_x0 = sysce; assign sysce_clr_x0 = sysce_clr; xlclockdriver #( .log_2_period(1), .period(1), .use_bufg(0)) xlclockdriver_1 ( .sysce(sysce_x0), .sysclk(sysclk_x0), .sysclr(sysce_clr_x0), .ce(xlclockdriver_1_ce), .clk(xlclockdriver_1_clk) ); xlclockdriver #( .log_2_period(4), .period(8), .use_bufg(0)) xlclockdriver_8 ( .sysce(sysce_x0), .sysclk(sysclk_x0), .sysclr(sysce_clr_x0), .ce(xlclockdriver_8_ce), .clk(xlclockdriver_8_clk) ); endmodule module hex_out_cw ( clk,// clock period = 10.0 ns (100.0 Mhz) ce, address0, address1, divider, hex_l, hex_m, hex_r, led8, reset, scl, sda ); input clk;// clock period = 10.0 ns (100.0 Mhz) input ce; input [7:0] address0; input [7:0] address1; input [7:0] divider; input [7:0] hex_l; input [7:0] hex_m; input [7:0] hex_r; input [7:0] led8; input [0:0] reset; output [0:0] scl; output [0:0] sda; wire [7:0] address0_net; wire [7:0] address1_net; (* MAX_FANOUT="REDUCE" *) wire ce_1_sg_x10/* synthesis MAX_FANOUT="REDUCE" */; (* MAX_FANOUT="REDUCE" *) wire ce_8_sg_x2/* synthesis MAX_FANOUT="REDUCE" */; wire clkNet; wire clk_1_sg_x10; wire clk_8_sg_x2; wire [7:0] divider_net; wire [7:0] hex_l_net; wire [7:0] hex_m_net; wire [7:0] hex_r_net; wire [7:0] led8_net; (* syn_keep="true" *)(* keep="true" *)(* preserve_signal="true" *) wire persistentdff_inst_q/* synthesis syn_keep=1 keep=1 preserve_signal=1 */; wire [0:0] reset_net; wire [0:0] scl_net; wire [0:0] sda_net; assign clkNet = clk; assign address0_net = address0; assign address1_net = address1; assign divider_net = divider; assign hex_l_net = hex_l; assign hex_m_net = hex_m; assign hex_r_net = hex_r; assign led8_net = led8; assign reset_net = reset; assign scl = scl_net; assign sda = sda_net; default_clock_driver default_clock_driver_x0 ( .sysce(1'b1), .sysce_clr(1'b0), .sysclk(clkNet), .ce_1(ce_1_sg_x10), .ce_8(ce_8_sg_x2), .clk_1(clk_1_sg_x10), .clk_8(clk_8_sg_x2) ); hex_out hex_out_x0 ( .address0(address0_net), .address1(address1_net), .ce_1(ce_1_sg_x10), .ce_8(ce_8_sg_x2), .clk_1(clk_1_sg_x10), .clk_8(clk_8_sg_x2), .divider(divider_net), .hex_l(hex_l_net), .hex_m(hex_m_net), .hex_r(hex_r_net), .led8(led8_net), .reset(reset_net), .scl(scl_net), .sda(sda_net) ); xlclkprobe clk_probe ( .ce(1'b1), .clk(clkNet), .clr(1'b0) ); xlpersistentdff persistentdff_inst ( .clk(clkNet), .d(persistentdff_inst_q), .q(persistentdff_inst_q) ); endmodule module xlpersistentdff ( clk, d, q ); input clk; input d; output q; endmodule