summaryrefslogtreecommitdiffstats
path: root/smh-ac415-fpga/examples/04_touch/touch
diff options
context:
space:
mode:
authorJames McKenzie <root@ka-ata-killa.panaceas.james.local>2025-04-18 12:37:26 +0100
committerJames McKenzie <root@ka-ata-killa.panaceas.james.local>2025-04-18 12:37:26 +0100
commitbc24ae901b74c5b673837d7f83423c1f7aa45c29 (patch)
tree7918065c9bd7fbb3e4382f6b3af03af40a7ecb4c /smh-ac415-fpga/examples/04_touch/touch
parenta865ea7cabc1a3b9362f6eee30d2a3bc7a5205e5 (diff)
downloadhp_instrument_lcds-bc24ae901b74c5b673837d7f83423c1f7aa45c29.tar.gz
hp_instrument_lcds-bc24ae901b74c5b673837d7f83423c1f7aa45c29.tar.bz2
hp_instrument_lcds-bc24ae901b74c5b673837d7f83423c1f7aa45c29.zip
fish
Diffstat (limited to 'smh-ac415-fpga/examples/04_touch/touch')
-rw-r--r--smh-ac415-fpga/examples/04_touch/touch/touch.qpf30
-rw-r--r--smh-ac415-fpga/examples/04_touch/touch/touch.qsf59
-rw-r--r--smh-ac415-fpga/examples/04_touch/touch/touch.qwsbin0 -> 1846 bytes
-rw-r--r--smh-ac415-fpga/examples/04_touch/touch/touch.v38
4 files changed, 127 insertions, 0 deletions
diff --git a/smh-ac415-fpga/examples/04_touch/touch/touch.qpf b/smh-ac415-fpga/examples/04_touch/touch/touch.qpf
new file mode 100644
index 0000000..6a3b058
--- /dev/null
+++ b/smh-ac415-fpga/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/smh-ac415-fpga/examples/04_touch/touch/touch.qsf b/smh-ac415-fpga/examples/04_touch/touch/touch.qsf
new file mode 100644
index 0000000..9bfa3c8
--- /dev/null
+++ b/smh-ac415-fpga/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/smh-ac415-fpga/examples/04_touch/touch/touch.qws b/smh-ac415-fpga/examples/04_touch/touch/touch.qws
new file mode 100644
index 0000000..7232112
--- /dev/null
+++ b/smh-ac415-fpga/examples/04_touch/touch/touch.qws
Binary files differ
diff --git a/smh-ac415-fpga/examples/04_touch/touch/touch.v b/smh-ac415-fpga/examples/04_touch/touch/touch.v
new file mode 100644
index 0000000..dcf9d12
--- /dev/null
+++ b/smh-ac415-fpga/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