summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mkm_test1.pcf5
-rw-r--r--src/mkm_test1.sdc1
-rw-r--r--src/mkm_test1.v28
3 files changed, 34 insertions, 0 deletions
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