iCE40 Ultra Plus 5k — 如何设置 PLL(无需专有 GUI 工具)(续)
iCE40 Ultra Plus 5k — how to set PLL (without propietary GUI tools) (continued)
在此中,建议我使用现有的库来测试 iCE40 Ultra Plus 5k 的 PLL。
我买了 Icebreaker V1.0e 开发板,它看起来像这样:
外部 12 MHz 振荡器连接到 Lattice iCE40UP5k 的引脚 35 (标记为绿色) (封装 SG48).
Pin 35 has function: IOT_46b_G0
, type: DPIO/GBIN0
and is located
in bank: 0
).
当我搜索上面发布的库时,我在第 98 页找到了一个不错的原语 SB_PLL40_PAD
。这个原语的描述与 Icebreaker V1.0e原理图。这是描述:
请注意与上面的引脚描述相符!现在,我想在我的 VHDL 中使用它,所以一开始我只为这个原语编写了一个 VHDL 包装器:
-- A:
library ieee;
use ieee.std_logic_1164.all;
-- B:
entity pll_icebreaker is port(
C1_1: in std_ulogic;
C1_2: out std_ulogic;
C1_3: out std_ulogic;
C1_4: out std_ulogic;
C1_5: in std_ulogic;
C1_6: in std_ulogic_vector (6 downto 0);
C1_7: in std_ulogic;
C1_8: in std_ulogic;
C1_9: in std_ulogic
);
end pll_icebreaker;
-- C:
architecture logic_001 of pll_icebreaker is
-- D:
component SB_PLL_40_PAD is port (
PACKAGEPIN: in std_ulogic;
PLLOUTGLOBAL: out std_ulogic;
PLLOUTCORE: out std_ulogic;
LOCK: out std_ulogic;
EXTFEEDBACK: in std_ulogic;
DYNAMICDELAY: in std_ulogic_vector (6 downto 0);
RESETB: in std_ulogic;
BYPASS: in std_ulogic;
LATCHINPUTVALUE: in std_ulogic
);
end component;
begin
-- E:
C1: SB_PLL_40_PAD port map(
PACKAGEPIN => C1_1,
PLLOUTGLOBAL => C1_2,
PLLOUTCORE => C1_3,
LOCK => C1_4,
EXTFEEDBACK => C1_5,
DYNAMICDELAY => C1_6,
RESETB => C1_7,
BYPASS => C1_8,
LATCHINPUTVALUE => C1_9
);
end architecture logic_001;
现在我尝试使用此 makefile
目标编译此 VHDL 设计 all
(仅使用 FOSS 工具):
# A:
file_main = pll_icebreaker
file_pcf = icebreaker
module_top = pll_icebreaker
entity_top = $(module_top)
####################################################################################################
# B:
all:
yosys \
-m ghdl \
-p "ghdl $(file_main).vhdl -e $(entity_top); write_verilog $(file_main).v"
yosys \
-p "synth_ice40 -top $(module_top) -blif $(file_main).blif" \
$(file_main).v
arachne-pnr \
-d 5k \
-P sg48 \
-o $(file_main).asc \
-p $(file_pcf).pcf $(file_main).blif
icepack $(file_main).asc $(file_main).bin
我的工具链抱怨找不到模块 SB_PLL_40_PAD
:
2.2.1. Analyzing design hierarchy..
Top module: \pll_icebreaker
ERROR: Module `\SB_PLL_40_PAD' referenced in module `\pll_icebreaker' in cell `\c1' is not part of the design.
make: *** [makefile:81: all] Error 1
怎么会? Lattice 技术库不是在 Yosys 工具中实现的吗?我有点困惑...我该如何解决这个问题?
看来我看不懂了。 Lattice 技术库提到 SB_PLL40_PAD
:
而我用的是SB_PLL_40_PAD
...所以当然不行!现在可以编译了!
所以我从这里开始,以创建一个很好的 PLL 示例,该示例使用 FPGA 中预先存在的硬件!
在此
我买了 Icebreaker V1.0e 开发板,它看起来像这样:
外部 12 MHz 振荡器连接到 Lattice iCE40UP5k 的引脚 35 (标记为绿色) (封装 SG48).
Pin 35 has function:
IOT_46b_G0
, type:DPIO/GBIN0
and is located in bank:0
).
当我搜索上面发布的库时,我在第 98 页找到了一个不错的原语 SB_PLL40_PAD
。这个原语的描述与 Icebreaker V1.0e原理图。这是描述:
请注意与上面的引脚描述相符!现在,我想在我的 VHDL 中使用它,所以一开始我只为这个原语编写了一个 VHDL 包装器:
-- A:
library ieee;
use ieee.std_logic_1164.all;
-- B:
entity pll_icebreaker is port(
C1_1: in std_ulogic;
C1_2: out std_ulogic;
C1_3: out std_ulogic;
C1_4: out std_ulogic;
C1_5: in std_ulogic;
C1_6: in std_ulogic_vector (6 downto 0);
C1_7: in std_ulogic;
C1_8: in std_ulogic;
C1_9: in std_ulogic
);
end pll_icebreaker;
-- C:
architecture logic_001 of pll_icebreaker is
-- D:
component SB_PLL_40_PAD is port (
PACKAGEPIN: in std_ulogic;
PLLOUTGLOBAL: out std_ulogic;
PLLOUTCORE: out std_ulogic;
LOCK: out std_ulogic;
EXTFEEDBACK: in std_ulogic;
DYNAMICDELAY: in std_ulogic_vector (6 downto 0);
RESETB: in std_ulogic;
BYPASS: in std_ulogic;
LATCHINPUTVALUE: in std_ulogic
);
end component;
begin
-- E:
C1: SB_PLL_40_PAD port map(
PACKAGEPIN => C1_1,
PLLOUTGLOBAL => C1_2,
PLLOUTCORE => C1_3,
LOCK => C1_4,
EXTFEEDBACK => C1_5,
DYNAMICDELAY => C1_6,
RESETB => C1_7,
BYPASS => C1_8,
LATCHINPUTVALUE => C1_9
);
end architecture logic_001;
现在我尝试使用此 makefile
目标编译此 VHDL 设计 all
(仅使用 FOSS 工具):
# A:
file_main = pll_icebreaker
file_pcf = icebreaker
module_top = pll_icebreaker
entity_top = $(module_top)
####################################################################################################
# B:
all:
yosys \
-m ghdl \
-p "ghdl $(file_main).vhdl -e $(entity_top); write_verilog $(file_main).v"
yosys \
-p "synth_ice40 -top $(module_top) -blif $(file_main).blif" \
$(file_main).v
arachne-pnr \
-d 5k \
-P sg48 \
-o $(file_main).asc \
-p $(file_pcf).pcf $(file_main).blif
icepack $(file_main).asc $(file_main).bin
我的工具链抱怨找不到模块 SB_PLL_40_PAD
:
2.2.1. Analyzing design hierarchy..
Top module: \pll_icebreaker
ERROR: Module `\SB_PLL_40_PAD' referenced in module `\pll_icebreaker' in cell `\c1' is not part of the design.
make: *** [makefile:81: all] Error 1
怎么会? Lattice 技术库不是在 Yosys 工具中实现的吗?我有点困惑...我该如何解决这个问题?
看来我看不懂了。 Lattice 技术库提到 SB_PLL40_PAD
:
而我用的是SB_PLL_40_PAD
...所以当然不行!现在可以编译了!
所以我从这里开始,以创建一个很好的 PLL 示例,该示例使用 FPGA 中预先存在的硬件!