[Cryptech-Commits] [user/shatov/ice40mkm] 01/01: Minimalistic blinking LED design to check whether iCE40 is operational.

git at cryptech.is git at cryptech.is
Mon Sep 13 08:29:46 UTC 2021


This is an automated email from the git hooks/post-receive script.

meisterpaul1 at yandex.ru pushed a commit to branch mkm_test1
in repository user/shatov/ice40mkm.

commit 8979966af45953008f8f41c0b91e5baef42f8e91
Author: Pavel V. Shatov (Meister) <meisterpaul1 at yandex.ru>
AuthorDate: Mon Sep 13 11:27:48 2021 +0300

    Minimalistic blinking LED design to check whether iCE40 is operational.
---
 src/mkm_test1.pcf |  5 +++++
 src/mkm_test1.sdc |  1 +
 src/mkm_test1.v   | 28 ++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)

diff --git a/src/mkm_test1.pcf b/src/mkm_test1.pcf
new file mode 100644
index 0000000..cfdac09
--- /dev/null
+++ b/src/mkm_test1.pcf
@@ -0,0 +1,5 @@
+set_io leds[0] 45 -io_std SB_LVCMOS
+set_io leds[1] 48 -io_std SB_LVCMOS
+set_io leds[2] 47 -io_std SB_LVCMOS
+set_io leds[3] 46 -io_std SB_LVCMOS
+
diff --git a/src/mkm_test1.sdc b/src/mkm_test1.sdc
new file mode 100644
index 0000000..c1dfc34
--- /dev/null
+++ b/src/mkm_test1.sdc
@@ -0,0 +1 @@
+create_clock  -period 20.83 -name {clk_osc_hf} [get_nets {clk_osc_hf}] 
diff --git a/src/mkm_test1.v b/src/mkm_test1.v
new file mode 100644
index 0000000..64f1b5d
--- /dev/null
+++ b/src/mkm_test1.v
@@ -0,0 +1,28 @@
+module mkm_test1
+(
+    output [3:0] leds   // {red, yellow, green, blue}
+                        // PCB: | BLUE | RED | YELLOW | GREEN |
+);
+
+    wire clk_osc_hf;    // 48 MHz
+    
+    SB_HFOSC #
+    (
+        .CLKHF_DIV  ("0b00")
+    )
+    SB_HFOSC_inst
+    (
+        .CLKHFPU    (1'b1),
+        .CLKHFEN    (1'b1),
+        .CLKHF      (clk_osc_hf)
+    ) /* synthesis ROUTE_THROUGH_FABRIC = 0 */;
+    
+    reg [26:0] cnt = 27'd0;
+    
+    always @(posedge clk_osc_hf)
+        //
+        cnt <= cnt + 1'b1;
+        
+    assign leds = cnt[26:23];
+
+endmodule



More information about the Commits mailing list