瀏覽代碼

projects/boot_stub: Use HF_OSC as clock source

This removes external dependency on a clock

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut 4 年之前
父節點
當前提交
8027676f21

+ 0 - 3
projects/boot_stub/data/top-bitsy-v0.pcf

@@ -3,9 +3,6 @@ set_io -nowarn usb_dp 43
 set_io -nowarn usb_dn 42
 set_io -nowarn usb_pu 38
 
-# Clock
-set_io -nowarn clk_in 35
-
 # Button
 set_io -nowarn btn 10
 

+ 0 - 3
projects/boot_stub/data/top-bitsy-v1.pcf

@@ -3,9 +3,6 @@ set_io -nowarn usb_dp 42
 set_io -nowarn usb_dn 38
 set_io -nowarn usb_pu 37
 
-# Clock
-set_io -nowarn clk_in 35
-
 # Button
 set_io -nowarn btn 2
 

+ 0 - 3
projects/boot_stub/data/top-icebreaker.pcf

@@ -3,9 +3,6 @@ set_io -nowarn usb_dp 31
 set_io -nowarn usb_dn 34
 set_io -nowarn usb_pu 38
 
-# Clock
-set_io -nowarn clk_in 35
-
 # Button
 set_io -nowarn btn 10
 

+ 7 - 7
projects/boot_stub/rtl/top.v

@@ -46,10 +46,7 @@ module top (
 	// USB
 	output wire usb_dp,
 	output wire usb_dn,
-	output wire usb_pu,
-
-	// Clock
-	input  wire clk_in
+	output wire usb_pu
 );
 
 	// FSM
@@ -262,9 +259,12 @@ module top (
 
 	reg [7:0] cnt_reset;
 
-	SB_GB clk_gbuf_I (
-		.USER_SIGNAL_TO_GLOBAL_BUFFER(clk_in),
-		.GLOBAL_BUFFER_OUTPUT(clk)
+	SB_HFOSC #(
+		.CLKHF_DIV("0b10")	// 12 MHz
+	) osc_I (
+		.CLKHFPU(1'b1),
+		.CLKHFEN(1'b1),
+		.CLKHF(clk)
 	);
 
 	assign rst = ~cnt_reset[7];