[setups/examples] add iCESugar Minimal #76
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Name Minimal may not be the most descriptive. The purpose of this PR is to modify the MinimalBoot example of the iCESugar for using the "external" clock from pin 35, instead of the internal oscillator.
On the Fomu, we could use SB_PLL40_CORE for instantiating the PLL, regardless of the clk input being internal or external. That is because of the bank where the clk input is located (
IOB_11b_G5 DPIO/GBIN 1 COMP_of_IOB_10a F4
). On the iCESugar, that isIOT_46b_G0 DPIO/GBIN 0 B3 35
. As explained in https://github.com/wuxx/icesugar/blob/master/doc/LatticeSemi/SBTICETechnologyLibrary201708.pdf, SB_PLL40_PAD needs to be used.Therefore, SB_PLL40_PAD was added to
setups/osflow/devices/ice40/sb_ice40_components.vhd
. Compared to iCESugar MinimalBoot, this one (iCESugar Minimal) instantiates SB_PLL40_PAD instead of SB_PLL40_CORE, and removes the internal oscillator instantiation. All extensions are disabled except Zicsr. However, the UART is preserved. That is, the ProcessorTop_MinimalBoot template is used.Moreover, pin 35 of the UP5K is connected to a pin of the ARM on the board, through jumper J1. See https://github.com/raw/wuxx/icesugar/master/schematic/iCESugar-v1.5.pdf. We are not sure whether the purpose is for the ARM to send a clock to the FPGA, or for the FPGA to send a clock to the ARM. The source of the firmware on the ARM seems not to be available: https://github.com/wuxx/icesugar/tree/master/firmware. Hence, @juanmard asked about the purpose of this connection in wuxx/icesugar#29. However, there is a comment in the readme: https://github.com/wuxx/icesugar/blob/master/README_en.md#icelink
Therefore, we adjusted the PLL for
icepll -i 12 -o 22
, and it works!/cc @juanmard