From 0408ead89eb3da768b5d0cb202127fd527c933c4 Mon Sep 17 00:00:00 2001
From: Friedrich Beckmann <friedrich.beckmann@hs-augsburg.de>
Date: Tue, 18 Mar 2025 13:20:17 +0100
Subject: add de1_ledsw

---
 pnr/de1_ledsw/de1_ledsw_pins.tcl | 21 +++++++++++++++++++++
 pnr/de1_ledsw/makefile           | 11 +++++++++++
 src/de1_ledsw.vhd                | 13 +++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 pnr/de1_ledsw/de1_ledsw_pins.tcl
 create mode 100644 pnr/de1_ledsw/makefile
 create mode 100644 src/de1_ledsw.vhd

diff --git a/pnr/de1_ledsw/de1_ledsw_pins.tcl b/pnr/de1_ledsw/de1_ledsw_pins.tcl
new file mode 100644
index 0000000..90cc518
--- /dev/null
+++ b/pnr/de1_ledsw/de1_ledsw_pins.tcl
@@ -0,0 +1,21 @@
+# Pin Configuration 
+set_location_assignment PIN_L22 -to SW[0]
+set_location_assignment PIN_L21 -to SW[1]
+set_location_assignment PIN_M22 -to SW[2]
+set_location_assignment PIN_V12 -to SW[3]
+set_location_assignment PIN_W12 -to SW[4]
+set_location_assignment PIN_U12 -to SW[5]
+set_location_assignment PIN_U11 -to SW[6]
+set_location_assignment PIN_M2  -to SW[7]
+set_location_assignment PIN_M1  -to SW[8]
+set_location_assignment PIN_L2  -to SW[9]
+set_location_assignment PIN_R20 -to LEDR[0]
+set_location_assignment PIN_R19 -to LEDR[1]
+set_location_assignment PIN_U19 -to LEDR[2]
+set_location_assignment PIN_Y19 -to LEDR[3]
+set_location_assignment PIN_T18 -to LEDR[4]
+set_location_assignment PIN_V19 -to LEDR[5]
+set_location_assignment PIN_Y18 -to LEDR[6]
+set_location_assignment PIN_U18 -to LEDR[7]
+set_location_assignment PIN_R18 -to LEDR[8]
+set_location_assignment PIN_R17 -to LEDR[9]
diff --git a/pnr/de1_ledsw/makefile b/pnr/de1_ledsw/makefile
new file mode 100644
index 0000000..9b6782d
--- /dev/null
+++ b/pnr/de1_ledsw/makefile
@@ -0,0 +1,11 @@
+SIM_PROJECT_NAME = de1_ledsw
+PROJECT = $(SIM_PROJECT_NAME)
+
+FAMILY = "Cyclone II"
+DEVICE = EP2C20F484C7
+PROGFILEEXT = sof
+
+SOURCE_FILES = ../../src/de1_ledsw.vhd 
+
+include ../makefile
+
diff --git a/src/de1_ledsw.vhd b/src/de1_ledsw.vhd
new file mode 100644
index 0000000..67e8b02
--- /dev/null
+++ b/src/de1_ledsw.vhd
@@ -0,0 +1,13 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+-- Simple module that connects the SW switches to the LEDR lights
+entity de1_ledsw is 
+port ( SW   : in      std_ulogic_vector(9 downto 0);
+       LEDR : out     std_ulogic_vector(9 downto 0));  -- red LEDs
+end entity;
+
+architecture rtl of de1_ledsw is
+begin
+  LEDR <= SW;
+end architecture rtl;
-- 
cgit v1.2.3