diff options
author | James McKenzie <root@ka-ata-killa.panaceas.james.local> | 2025-05-01 00:01:51 +0100 |
---|---|---|
committer | James McKenzie <root@ka-ata-killa.panaceas.james.local> | 2025-05-01 00:01:51 +0100 |
commit | d27f19b99a155bc9a758776426e16c39dfec1ff4 (patch) | |
tree | dc612ff4424ed3f1319e614a01aca64885be2fb2 /fpga/smh-ac415/examples/04_touch | |
parent | 9486ded473236e49d70faa9598e355291e9e1f52 (diff) | |
download | hp_instrument_lcds-d27f19b99a155bc9a758776426e16c39dfec1ff4.tar.gz hp_instrument_lcds-d27f19b99a155bc9a758776426e16c39dfec1ff4.tar.bz2 hp_instrument_lcds-d27f19b99a155bc9a758776426e16c39dfec1ff4.zip |
tidy up smh-ac415
Diffstat (limited to 'fpga/smh-ac415/examples/04_touch')
-rw-r--r-- | fpga/smh-ac415/examples/04_touch/touch/touch.qpf | 30 | ||||
-rw-r--r-- | fpga/smh-ac415/examples/04_touch/touch/touch.qsf | 59 | ||||
-rw-r--r-- | fpga/smh-ac415/examples/04_touch/touch/touch.qws | bin | 0 -> 1846 bytes | |||
-rw-r--r-- | fpga/smh-ac415/examples/04_touch/touch/touch.v | 38 | ||||
-rw-r--r-- | fpga/smh-ac415/examples/04_touch/实验现象.txt | 2 |
5 files changed, 129 insertions, 0 deletions
diff --git a/fpga/smh-ac415/examples/04_touch/touch/touch.qpf b/fpga/smh-ac415/examples/04_touch/touch/touch.qpf new file mode 100644 index 0000000..6a3b058 --- /dev/null +++ b/fpga/smh-ac415/examples/04_touch/touch/touch.qpf @@ -0,0 +1,30 @@ +# -------------------------------------------------------------------------- #
+#
+# Copyright (C) 1991-2013 Altera Corporation
+# Your use of Altera Corporation's design tools, logic functions
+# and other software and tools, and its AMPP 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, Altera MegaCore Function 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
+# applicable agreement for further details.
+#
+# -------------------------------------------------------------------------- #
+#
+# Quartus II 64-Bit
+# Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Full Version
+# Date created = 02:54:06 June 02, 2023
+#
+# -------------------------------------------------------------------------- #
+
+QUARTUS_VERSION = "13.0"
+DATE = "02:54:06 June 02, 2023"
+
+# Revisions
+
+PROJECT_REVISION = "touch"
diff --git a/fpga/smh-ac415/examples/04_touch/touch/touch.qsf b/fpga/smh-ac415/examples/04_touch/touch/touch.qsf new file mode 100644 index 0000000..9bfa3c8 --- /dev/null +++ b/fpga/smh-ac415/examples/04_touch/touch/touch.qsf @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------- #
+#
+# Copyright (C) 1991-2013 Altera Corporation
+# Your use of Altera Corporation's design tools, logic functions
+# and other software and tools, and its AMPP 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, Altera MegaCore Function 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
+# applicable agreement for further details.
+#
+# -------------------------------------------------------------------------- #
+#
+# Quartus II 64-Bit
+# Version 13.0.1 Build 232 06/12/2013 Service Pack 1 SJ Full Version
+# Date created = 02:54:06 June 02, 2023
+#
+# -------------------------------------------------------------------------- #
+#
+# Notes:
+#
+# 1) The default values for assignments are stored in the file:
+# touch_assignment_defaults.qdf
+# If this file doesn't exist, see file:
+# assignment_defaults.qdf
+#
+# 2) Altera recommends that you do not modify this file. This
+# file is updated automatically by the Quartus II software
+# and any changes you make may be lost or overwritten.
+#
+# -------------------------------------------------------------------------- #
+
+
+set_global_assignment -name FAMILY "Cyclone IV E"
+set_global_assignment -name DEVICE EP4CE15F23C8
+set_global_assignment -name TOP_LEVEL_ENTITY touch
+set_global_assignment -name ORIGINAL_QUARTUS_VERSION "13.0 SP1"
+set_global_assignment -name PROJECT_CREATION_TIME_DATE "02:54:06 JUNE 02, 2023"
+set_global_assignment -name LAST_QUARTUS_VERSION "13.0 SP1"
+set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
+set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
+set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
+set_global_assignment -name ERROR_CHECK_FREQUENCY_DIVISOR 1
+set_global_assignment -name NOMINAL_CORE_SUPPLY_VOLTAGE 1.2V
+set_global_assignment -name VERILOG_FILE touch.v
+set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
+set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
+set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
+set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "2.5 V"
+set_location_assignment PIN_AB16 -to led
+set_location_assignment PIN_T22 -to sys_clk
+set_location_assignment PIN_U20 -to sys_rst_n
+set_location_assignment PIN_G9 -to touch_key
+set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
\ No newline at end of file diff --git a/fpga/smh-ac415/examples/04_touch/touch/touch.qws b/fpga/smh-ac415/examples/04_touch/touch/touch.qws Binary files differnew file mode 100644 index 0000000..7232112 --- /dev/null +++ b/fpga/smh-ac415/examples/04_touch/touch/touch.qws diff --git a/fpga/smh-ac415/examples/04_touch/touch/touch.v b/fpga/smh-ac415/examples/04_touch/touch/touch.v new file mode 100644 index 0000000..dcf9d12 --- /dev/null +++ b/fpga/smh-ac415/examples/04_touch/touch/touch.v @@ -0,0 +1,38 @@ +`timescale 1ns/1ns
+
+module touch
+(
+ input wire sys_clk ,
+ input wire sys_rst_n ,
+ input wire touch_key ,
+
+ output reg led
+);
+
+wire touch_en ;
+
+//reg define
+reg touch_key_dly1 ;
+reg touch_key_dly2 ;
+
+assign touch_en = touch_key_dly2 & (~touch_key_dly1);
+
+always@(posedge sys_clk or negedge sys_rst_n)
+ if(sys_rst_n == 1'b0)
+ begin
+ touch_key_dly1 <= 1'b0;
+ touch_key_dly2 <= 1'b0;
+ end
+ else
+ begin
+ touch_key_dly1 <= touch_key;
+ touch_key_dly2 <= touch_key_dly1;
+ end
+
+always@(posedge sys_clk or negedge sys_rst_n)
+ if(sys_rst_n == 1'b0)
+ led <= 1'b1;
+ else if(touch_en == 1'b1)
+ led <= ~led;
+
+endmodule
diff --git a/fpga/smh-ac415/examples/04_touch/实验现象.txt b/fpga/smh-ac415/examples/04_touch/实验现象.txt new file mode 100644 index 0000000..41b7e47 --- /dev/null +++ b/fpga/smh-ac415/examples/04_touch/实验现象.txt @@ -0,0 +1,2 @@ +现象:点按触摸按键,可以开关led灯。
+测试:可以测试触摸按键是否正常。
\ No newline at end of file |