这个提交包含在:
2026-01-16 11:39:59 +08:00
父节点 1e613835fe
当前提交 45098a644c
共有 429 个文件被更改,包括 17349 次插入 和 11 次删除

查看文件

@ -0,0 +1 @@
set tool_name "Questa Altera FPGA (Verilog)"

查看文件

@ -0,0 +1,590 @@
// Copyright (C) 2025 Altera Corporation. All rights reserved.
// Your use of Altera Corporation's design tools, logic functions
// and other software and tools, and any partner logic
// functions, and any output files from any of the foregoing
// (including device programming or simulation files), and any
// associated documentation or information are expressly subject
// to the terms and conditions of the Altera Program License
// Subscription Agreement, the Altera Quartus Prime License Agreement,
// the Altera IP License Agreement, or other applicable license
// agreement, including, without limitation, that your use is for
// the sole purpose of programming logic devices manufactured by
// Altera and sold by Altera or its authorized distributors. Please
// refer to the Altera Software License Subscription Agreements
// on the Quartus Prime software download page.
// VENDOR "Altera"
// PROGRAM "Quartus Prime"
// VERSION "Version 25.1std.0 Build 1129 10/21/2025 SC Lite Edition"
// DATE "01/16/2026 10:49:35"
//
// Device: Altera 10M02SCM153I7G Package MBGA153
//
//
// This Verilog file should be used for Questa Altera FPGA (Verilog) only
//
`timescale 1 ps/ 1 ps
module Counter (
func,
rst,
clk,
led);
input func;
input rst;
input clk;
output [0:3] led;
// Design Ports Information
// led[3] => Location: PIN_N15, I/O Standard: 3.3-V LVTTL, Current Strength: 8mA
// led[2] => Location: PIN_N14, I/O Standard: 3.3-V LVTTL, Current Strength: 8mA
// led[1] => Location: PIN_M14, I/O Standard: 3.3-V LVTTL, Current Strength: 8mA
// led[0] => Location: PIN_M12, I/O Standard: 3.3-V LVTTL, Current Strength: 8mA
// rst => Location: PIN_J14, I/O Standard: 3.3-V LVTTL, Current Strength: Default
// func => Location: PIN_J12, I/O Standard: 3.3-V LVTTL, Current Strength: Default
// clk => Location: PIN_J9, I/O Standard: 3.3-V LVTTL, Current Strength: Default
wire gnd;
wire vcc;
wire unknown;
assign gnd = 1'b0;
assign vcc = 1'b1;
assign unknown = 1'bx;
tri1 devclrn;
tri1 devpor;
tri1 devoe;
wire \~QUARTUS_CREATED_GND~I_combout ;
wire \~QUARTUS_CREATED_UNVM~~busy ;
wire \led[3]~output_o ;
wire \led[2]~output_o ;
wire \led[1]~output_o ;
wire \led[0]~output_o ;
wire \func~input_o ;
wire \rst~input_o ;
wire \clk~input_o ;
wire \counter[3]~1_combout ;
wire \counter[3]~3_combout ;
wire \counter[3]~_emulated_q ;
wire \counter[3]~2_combout ;
wire \Add1~1_cout ;
wire \Add1~2_combout ;
wire \counter[2]~5_combout ;
wire \counter[2]~_emulated_q ;
wire \counter[2]~4_combout ;
wire \Add1~3 ;
wire \Add1~4_combout ;
wire \counter[1]~7_combout ;
wire \counter[1]~_emulated_q ;
wire \counter[1]~6_combout ;
wire \Add1~5 ;
wire \Add1~6_combout ;
wire \counter[0]~9_combout ;
wire \counter[0]~_emulated_q ;
wire \counter[0]~8_combout ;
hard_block auto_generated_inst(
.devpor(devpor),
.devclrn(devclrn),
.devoe(devoe));
// Location: LCCOMB_X11_Y9_N16
fiftyfivenm_lcell_comb \~QUARTUS_CREATED_GND~I (
// Equation(s):
// \~QUARTUS_CREATED_GND~I_combout = GND
.dataa(gnd),
.datab(gnd),
.datac(gnd),
.datad(gnd),
.cin(gnd),
.combout(\~QUARTUS_CREATED_GND~I_combout ),
.cout());
// synopsys translate_off
defparam \~QUARTUS_CREATED_GND~I .lut_mask = 16'h0000;
defparam \~QUARTUS_CREATED_GND~I .sum_lutc_input = "datac";
// synopsys translate_on
// Location: IOOBUF_X18_Y1_N9
fiftyfivenm_io_obuf \led[3]~output (
.i(!\counter[3]~2_combout ),
.oe(vcc),
.seriesterminationcontrol(16'b0000000000000000),
.devoe(devoe),
.o(\led[3]~output_o ),
.obar());
// synopsys translate_off
defparam \led[3]~output .bus_hold = "false";
defparam \led[3]~output .open_drain_output = "false";
// synopsys translate_on
// Location: IOOBUF_X18_Y1_N2
fiftyfivenm_io_obuf \led[2]~output (
.i(!\counter[2]~4_combout ),
.oe(vcc),
.seriesterminationcontrol(16'b0000000000000000),
.devoe(devoe),
.o(\led[2]~output_o ),
.obar());
// synopsys translate_off
defparam \led[2]~output .bus_hold = "false";
defparam \led[2]~output .open_drain_output = "false";
// synopsys translate_on
// Location: IOOBUF_X18_Y2_N9
fiftyfivenm_io_obuf \led[1]~output (
.i(!\counter[1]~6_combout ),
.oe(vcc),
.seriesterminationcontrol(16'b0000000000000000),
.devoe(devoe),
.o(\led[1]~output_o ),
.obar());
// synopsys translate_off
defparam \led[1]~output .bus_hold = "false";
defparam \led[1]~output .open_drain_output = "false";
// synopsys translate_on
// Location: IOOBUF_X18_Y1_N23
fiftyfivenm_io_obuf \led[0]~output (
.i(!\counter[0]~8_combout ),
.oe(vcc),
.seriesterminationcontrol(16'b0000000000000000),
.devoe(devoe),
.o(\led[0]~output_o ),
.obar());
// synopsys translate_off
defparam \led[0]~output .bus_hold = "false";
defparam \led[0]~output .open_drain_output = "false";
// synopsys translate_on
// Location: IOIBUF_X18_Y6_N22
fiftyfivenm_io_ibuf \func~input (
.i(func),
.ibar(gnd),
.nsleep(vcc),
.o(\func~input_o ));
// synopsys translate_off
defparam \func~input .bus_hold = "false";
defparam \func~input .listen_to_nsleep_signal = "false";
defparam \func~input .simulate_z_as = "z";
// synopsys translate_on
// Location: IOIBUF_X18_Y4_N1
fiftyfivenm_io_ibuf \rst~input (
.i(rst),
.ibar(gnd),
.nsleep(vcc),
.o(\rst~input_o ));
// synopsys translate_off
defparam \rst~input .bus_hold = "false";
defparam \rst~input .listen_to_nsleep_signal = "false";
defparam \rst~input .simulate_z_as = "z";
// synopsys translate_on
// Location: IOIBUF_X18_Y4_N22
fiftyfivenm_io_ibuf \clk~input (
.i(clk),
.ibar(gnd),
.nsleep(vcc),
.o(\clk~input_o ));
// synopsys translate_off
defparam \clk~input .bus_hold = "false";
defparam \clk~input .listen_to_nsleep_signal = "false";
defparam \clk~input .simulate_z_as = "z";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N20
fiftyfivenm_lcell_comb \counter[3]~1 (
// Equation(s):
// \counter[3]~1_combout = (\rst~input_o & ((\counter[3]~1_combout ))) # (!\rst~input_o & (\func~input_o ))
.dataa(gnd),
.datab(\func~input_o ),
.datac(\counter[3]~1_combout ),
.datad(\rst~input_o ),
.cin(gnd),
.combout(\counter[3]~1_combout ),
.cout());
// synopsys translate_off
defparam \counter[3]~1 .lut_mask = 16'hF0CC;
defparam \counter[3]~1 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N4
fiftyfivenm_lcell_comb \counter[3]~3 (
// Equation(s):
// \counter[3]~3_combout = \counter[3]~1_combout $ (!\counter[3]~2_combout )
.dataa(gnd),
.datab(\counter[3]~1_combout ),
.datac(\counter[3]~2_combout ),
.datad(gnd),
.cin(gnd),
.combout(\counter[3]~3_combout ),
.cout());
// synopsys translate_off
defparam \counter[3]~3 .lut_mask = 16'hC3C3;
defparam \counter[3]~3 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: FF_X17_Y4_N5
dffeas \counter[3]~_emulated (
.clk(\clk~input_o ),
.d(\counter[3]~3_combout ),
.asdata(vcc),
.clrn(\rst~input_o ),
.aload(gnd),
.sclr(gnd),
.sload(gnd),
.ena(vcc),
.devclrn(devclrn),
.devpor(devpor),
.q(\counter[3]~_emulated_q ),
.prn(vcc));
// synopsys translate_off
defparam \counter[3]~_emulated .is_wysiwyg = "true";
defparam \counter[3]~_emulated .power_up = "low";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N26
fiftyfivenm_lcell_comb \counter[3]~2 (
// Equation(s):
// \counter[3]~2_combout = (\rst~input_o & ((\counter[3]~_emulated_q $ (\counter[3]~1_combout )))) # (!\rst~input_o & (\func~input_o ))
.dataa(\func~input_o ),
.datab(\rst~input_o ),
.datac(\counter[3]~_emulated_q ),
.datad(\counter[3]~1_combout ),
.cin(gnd),
.combout(\counter[3]~2_combout ),
.cout());
// synopsys translate_off
defparam \counter[3]~2 .lut_mask = 16'h2EE2;
defparam \counter[3]~2 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N6
fiftyfivenm_lcell_comb \Add1~1 (
// Equation(s):
// \Add1~1_cout = CARRY(\counter[3]~2_combout )
.dataa(\counter[3]~2_combout ),
.datab(gnd),
.datac(gnd),
.datad(vcc),
.cin(gnd),
.combout(),
.cout(\Add1~1_cout ));
// synopsys translate_off
defparam \Add1~1 .lut_mask = 16'h00AA;
defparam \Add1~1 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N8
fiftyfivenm_lcell_comb \Add1~2 (
// Equation(s):
// \Add1~2_combout = (\counter[2]~4_combout & ((\func~input_o & (\Add1~1_cout & VCC)) # (!\func~input_o & (!\Add1~1_cout )))) # (!\counter[2]~4_combout & ((\func~input_o & (!\Add1~1_cout )) # (!\func~input_o & ((\Add1~1_cout ) # (GND)))))
// \Add1~3 = CARRY((\counter[2]~4_combout & (!\func~input_o & !\Add1~1_cout )) # (!\counter[2]~4_combout & ((!\Add1~1_cout ) # (!\func~input_o ))))
.dataa(\counter[2]~4_combout ),
.datab(\func~input_o ),
.datac(gnd),
.datad(vcc),
.cin(\Add1~1_cout ),
.combout(\Add1~2_combout ),
.cout(\Add1~3 ));
// synopsys translate_off
defparam \Add1~2 .lut_mask = 16'h9617;
defparam \Add1~2 .sum_lutc_input = "cin";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N16
fiftyfivenm_lcell_comb \counter[2]~5 (
// Equation(s):
// \counter[2]~5_combout = \counter[3]~1_combout $ (\Add1~2_combout )
.dataa(gnd),
.datab(\counter[3]~1_combout ),
.datac(\Add1~2_combout ),
.datad(gnd),
.cin(gnd),
.combout(\counter[2]~5_combout ),
.cout());
// synopsys translate_off
defparam \counter[2]~5 .lut_mask = 16'h3C3C;
defparam \counter[2]~5 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: FF_X17_Y4_N17
dffeas \counter[2]~_emulated (
.clk(\clk~input_o ),
.d(\counter[2]~5_combout ),
.asdata(vcc),
.clrn(\rst~input_o ),
.aload(gnd),
.sclr(gnd),
.sload(gnd),
.ena(vcc),
.devclrn(devclrn),
.devpor(devpor),
.q(\counter[2]~_emulated_q ),
.prn(vcc));
// synopsys translate_off
defparam \counter[2]~_emulated .is_wysiwyg = "true";
defparam \counter[2]~_emulated .power_up = "low";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N14
fiftyfivenm_lcell_comb \counter[2]~4 (
// Equation(s):
// \counter[2]~4_combout = (\rst~input_o & ((\counter[2]~_emulated_q $ (\counter[3]~1_combout )))) # (!\rst~input_o & (\func~input_o ))
.dataa(\func~input_o ),
.datab(\rst~input_o ),
.datac(\counter[2]~_emulated_q ),
.datad(\counter[3]~1_combout ),
.cin(gnd),
.combout(\counter[2]~4_combout ),
.cout());
// synopsys translate_off
defparam \counter[2]~4 .lut_mask = 16'h2EE2;
defparam \counter[2]~4 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N10
fiftyfivenm_lcell_comb \Add1~4 (
// Equation(s):
// \Add1~4_combout = ((\func~input_o $ (\counter[1]~6_combout $ (!\Add1~3 )))) # (GND)
// \Add1~5 = CARRY((\func~input_o & ((\counter[1]~6_combout ) # (!\Add1~3 ))) # (!\func~input_o & (\counter[1]~6_combout & !\Add1~3 )))
.dataa(\func~input_o ),
.datab(\counter[1]~6_combout ),
.datac(gnd),
.datad(vcc),
.cin(\Add1~3 ),
.combout(\Add1~4_combout ),
.cout(\Add1~5 ));
// synopsys translate_off
defparam \Add1~4 .lut_mask = 16'h698E;
defparam \Add1~4 .sum_lutc_input = "cin";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N28
fiftyfivenm_lcell_comb \counter[1]~7 (
// Equation(s):
// \counter[1]~7_combout = \counter[3]~1_combout $ (\Add1~4_combout )
.dataa(gnd),
.datab(\counter[3]~1_combout ),
.datac(gnd),
.datad(\Add1~4_combout ),
.cin(gnd),
.combout(\counter[1]~7_combout ),
.cout());
// synopsys translate_off
defparam \counter[1]~7 .lut_mask = 16'h33CC;
defparam \counter[1]~7 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: FF_X17_Y4_N29
dffeas \counter[1]~_emulated (
.clk(\clk~input_o ),
.d(\counter[1]~7_combout ),
.asdata(vcc),
.clrn(\rst~input_o ),
.aload(gnd),
.sclr(gnd),
.sload(gnd),
.ena(vcc),
.devclrn(devclrn),
.devpor(devpor),
.q(\counter[1]~_emulated_q ),
.prn(vcc));
// synopsys translate_off
defparam \counter[1]~_emulated .is_wysiwyg = "true";
defparam \counter[1]~_emulated .power_up = "low";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N30
fiftyfivenm_lcell_comb \counter[1]~6 (
// Equation(s):
// \counter[1]~6_combout = (\rst~input_o & ((\counter[3]~1_combout $ (\counter[1]~_emulated_q )))) # (!\rst~input_o & (\func~input_o ))
.dataa(\rst~input_o ),
.datab(\func~input_o ),
.datac(\counter[3]~1_combout ),
.datad(\counter[1]~_emulated_q ),
.cin(gnd),
.combout(\counter[1]~6_combout ),
.cout());
// synopsys translate_off
defparam \counter[1]~6 .lut_mask = 16'h4EE4;
defparam \counter[1]~6 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N12
fiftyfivenm_lcell_comb \Add1~6 (
// Equation(s):
// \Add1~6_combout = \counter[0]~8_combout $ (\Add1~5 $ (\func~input_o ))
.dataa(\counter[0]~8_combout ),
.datab(gnd),
.datac(gnd),
.datad(\func~input_o ),
.cin(\Add1~5 ),
.combout(\Add1~6_combout ),
.cout());
// synopsys translate_off
defparam \Add1~6 .lut_mask = 16'hA55A;
defparam \Add1~6 .sum_lutc_input = "cin";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N24
fiftyfivenm_lcell_comb \counter[0]~9 (
// Equation(s):
// \counter[0]~9_combout = \Add1~6_combout $ (\counter[3]~1_combout )
.dataa(\Add1~6_combout ),
.datab(\counter[3]~1_combout ),
.datac(gnd),
.datad(gnd),
.cin(gnd),
.combout(\counter[0]~9_combout ),
.cout());
// synopsys translate_off
defparam \counter[0]~9 .lut_mask = 16'h6666;
defparam \counter[0]~9 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: FF_X17_Y4_N25
dffeas \counter[0]~_emulated (
.clk(\clk~input_o ),
.d(\counter[0]~9_combout ),
.asdata(vcc),
.clrn(\rst~input_o ),
.aload(gnd),
.sclr(gnd),
.sload(gnd),
.ena(vcc),
.devclrn(devclrn),
.devpor(devpor),
.q(\counter[0]~_emulated_q ),
.prn(vcc));
// synopsys translate_off
defparam \counter[0]~_emulated .is_wysiwyg = "true";
defparam \counter[0]~_emulated .power_up = "low";
// synopsys translate_on
// Location: LCCOMB_X17_Y4_N22
fiftyfivenm_lcell_comb \counter[0]~8 (
// Equation(s):
// \counter[0]~8_combout = (\rst~input_o & ((\counter[3]~1_combout $ (\counter[0]~_emulated_q )))) # (!\rst~input_o & (\func~input_o ))
.dataa(\func~input_o ),
.datab(\counter[3]~1_combout ),
.datac(\rst~input_o ),
.datad(\counter[0]~_emulated_q ),
.cin(gnd),
.combout(\counter[0]~8_combout ),
.cout());
// synopsys translate_off
defparam \counter[0]~8 .lut_mask = 16'h3ACA;
defparam \counter[0]~8 .sum_lutc_input = "datac";
// synopsys translate_on
// Location: UNVM_X0_Y8_N40
fiftyfivenm_unvm \~QUARTUS_CREATED_UNVM~ (
.arclk(vcc),
.arshft(vcc),
.drclk(vcc),
.drshft(vcc),
.drdin(vcc),
.nprogram(vcc),
.nerase(vcc),
.nosc_ena(\~QUARTUS_CREATED_GND~I_combout ),
.par_en(vcc),
.xe_ye(vcc),
.se(vcc),
.ardin(23'b11111111111111111111111),
.busy(\~QUARTUS_CREATED_UNVM~~busy ),
.osc(),
.bgpbusy(),
.sp_pass(),
.se_pass(),
.drdout());
// synopsys translate_off
defparam \~QUARTUS_CREATED_UNVM~ .addr_range1_end_addr = -1;
defparam \~QUARTUS_CREATED_UNVM~ .addr_range1_offset = -1;
defparam \~QUARTUS_CREATED_UNVM~ .addr_range2_end_addr = -1;
defparam \~QUARTUS_CREATED_UNVM~ .addr_range2_offset = -1;
defparam \~QUARTUS_CREATED_UNVM~ .addr_range3_offset = -1;
defparam \~QUARTUS_CREATED_UNVM~ .is_compressed_image = "false";
defparam \~QUARTUS_CREATED_UNVM~ .is_dual_boot = "false";
defparam \~QUARTUS_CREATED_UNVM~ .is_eram_skip = "false";
defparam \~QUARTUS_CREATED_UNVM~ .max_ufm_valid_addr = -1;
defparam \~QUARTUS_CREATED_UNVM~ .max_valid_addr = -1;
defparam \~QUARTUS_CREATED_UNVM~ .min_ufm_valid_addr = -1;
defparam \~QUARTUS_CREATED_UNVM~ .min_valid_addr = -1;
defparam \~QUARTUS_CREATED_UNVM~ .part_name = "quartus_created_unvm";
defparam \~QUARTUS_CREATED_UNVM~ .reserve_block = "true";
// synopsys translate_on
assign led[3] = \led[3]~output_o ;
assign led[2] = \led[2]~output_o ;
assign led[1] = \led[1]~output_o ;
assign led[0] = \led[0]~output_o ;
endmodule
module hard_block (
devpor,
devclrn,
devoe);
// Design Ports Information
// ~ALTERA_TMS~ => Location: PIN_G1, I/O Standard: 3.3 V Schmitt Trigger, Current Strength: Default
// ~ALTERA_TCK~ => Location: PIN_J1, I/O Standard: 3.3 V Schmitt Trigger, Current Strength: Default
// ~ALTERA_TDI~ => Location: PIN_H5, I/O Standard: 3.3 V Schmitt Trigger, Current Strength: Default
// ~ALTERA_TDO~ => Location: PIN_H4, I/O Standard: 3.3-V LVTTL, Current Strength: Default
// ~ALTERA_nCONFIG~ => Location: PIN_E8, I/O Standard: 3.3 V Schmitt Trigger, Current Strength: Default
// ~ALTERA_nSTATUS~ => Location: PIN_D6, I/O Standard: 3.3 V Schmitt Trigger, Current Strength: Default
// ~ALTERA_CONF_DONE~ => Location: PIN_E6, I/O Standard: 3.3 V Schmitt Trigger, Current Strength: Default
input devpor;
input devclrn;
input devoe;
wire gnd;
wire vcc;
wire unknown;
assign gnd = 1'b0;
assign vcc = 1'b1;
assign unknown = 1'bx;
wire \~ALTERA_TMS~~padout ;
wire \~ALTERA_TCK~~padout ;
wire \~ALTERA_TDI~~padout ;
wire \~ALTERA_nCONFIG~~padout ;
wire \~ALTERA_nSTATUS~~padout ;
wire \~ALTERA_CONF_DONE~~padout ;
wire \~ALTERA_TMS~~ibuf_o ;
wire \~ALTERA_TCK~~ibuf_o ;
wire \~ALTERA_TDI~~ibuf_o ;
wire \~ALTERA_nCONFIG~~ibuf_o ;
wire \~ALTERA_nSTATUS~~ibuf_o ;
wire \~ALTERA_CONF_DONE~~ibuf_o ;
endmodule