aboutsummaryrefslogtreecommitdiff
path: root/src/rtl
diff options
context:
space:
mode:
authorJoachim StroĢˆmbergson <joachim@assured.se>2019-02-12 11:54:37 +0100
committerJoachim StroĢˆmbergson <joachim@assured.se>2019-02-12 11:54:37 +0100
commitff2a396c31ab12532eb26e733582936e1203040a (patch)
treebc4c655fc849f1b8d6b0eb0de4a66fc2c6cb59c2 /src/rtl
parentaf310d8af1a9dbceeecb23a9aacde8365d183828 (diff)
(1) Mapped all accessible IOs on the iCEstick and allocated ports on the PMOD headers for the FPGA_MKM application. (2) Connected the tamper alarm to the counter and can observe that it toggles in sync with the LED.
Diffstat (limited to 'src/rtl')
-rw-r--r--src/rtl/fpga_mkm.v15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/rtl/fpga_mkm.v b/src/rtl/fpga_mkm.v
index de96ffa..6725ed9 100644
--- a/src/rtl/fpga_mkm.v
+++ b/src/rtl/fpga_mkm.v
@@ -38,7 +38,15 @@
//======================================================================
module fpga_mkm(
- input wire clk_in,
+ input wire clk,
+
+ input wire sclk,
+ input wire mosi,
+ output wire miso,
+
+ // Tamper and alarm
+ input wire tamper,
+ output wire alarm,
output wire rled1,
output wire rled2,
@@ -62,11 +70,14 @@ module fpga_mkm(
assign rled4 = counter_reg[24];
assign gled5 = counter_reg[25];
+ assign miso = 1'h0;
+ assign alarm = counter_reg[25];
+
//----------------------------------------------------------------
// reg_update
//----------------------------------------------------------------
- always @ (posedge clk_in)
+ always @ (posedge clk)
begin : reg_update
counter_reg <= counter_reg + 1;
end