Skip to content

Commit 58350a7

Browse files
committed
example: Fix PLL for fomu and use CORE instead of PAD variant
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
1 parent c9591ef commit 58350a7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

example/rtl/sysmgr_pll.v

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ module sysmgr_pll (
3131

3232
// Clock frequency input depends on board
3333
`ifdef BOARD_FOMU_HACKER
34+
`define CLK_IN_FABRIC
3435
`define CLK_IN_48M
3536
`elsif BOARD_FOMU_PVT1
37+
`define CLK_IN_FABRIC
3638
`define CLK_IN_48M
3739
`endif
3840

@@ -49,8 +51,12 @@ module sysmgr_pll (
4951

5052
initial
5153
rst_cnt <= 4'h8;
54+
`else
55+
`ifdef CLK_IN_FABRIC
56+
SB_PLL40_2F_CORE #(
5257
`else
5358
SB_PLL40_2F_PAD #(
59+
`endif
5460
`ifdef CLK_IN_48M
5561
// clk_in is 48 MHz
5662
.DIVR(4'b0000),
@@ -73,7 +79,11 @@ module sysmgr_pll (
7379
.ENABLE_ICEGATE_PORTA(1'b0),
7480
.ENABLE_ICEGATE_PORTB(1'b0)
7581
) pll_I (
82+
`ifdef CLK_IN_FABRIC
83+
.REFERENCECLK (clk_in),
84+
`else
7685
.PACKAGEPIN (clk_in),
86+
`endif
7787
.PLLOUTCOREA (),
7888
.PLLOUTGLOBALA (clk_2x),
7989
.PLLOUTCOREB (),

0 commit comments

Comments
 (0)