- Muchas notas - Fran Acién

20230419 - Chiniese Ice40up5k FPGA PICO

FPGA: ICE40UP5K SG48 Clock: 12 MHz

ede66757bd681da1277e321716e7e0b9.png

ad3acbed55b9e2e789f2d8979a7d35a2.png

Getting started

  • Download Radiant
  • Create a project

2bdbe4fe065e2469a5b17b2b4856d396.png

  • Select Synplify Pro
  • Create a VHDL file with the next code
library ieee;
use ieee.std_logic_1164.all;
use IEEE.NUMERIC_STD.ALL;

entity main is
  port (
    i_clock : in std_logic;
    o_led : out std_logic;
    i_button : in std_logic;
    o_otherled : out std_logic
  ) ;
end entity main;

architecture arch of main is

    constant CLOCK_FREQUENCY : integer := 12000000; -- input clock frequency (12 MHz)
    signal counter : unsigned(31 downto 0) := (others => '0'); -- 32-bit counter to measure 1 second
    signal r_led : std_logic := '0';
begin

    PROC_LIGHT : process( i_clock )
    begin
        if rising_edge(i_clock) then -- detect rising edge of input clock
                counter <= counter + 1; -- increment counter on each clock cycle
                if counter = to_unsigned(CLOCK_FREQUENCY, counter'length) then -- check if counter reaches 1 second
                    r_led <= not r_led; -- toggle the LED on and off
                    counter <= (others => '0'); -- reset the counter to start again
                end if;
            end if; 
    end process ; -- PROC_LIGHT
  
  o_otherled <= i_button;
  o_led <= r_led;

end arch ; -- arch
  • Synthesize Design
  • Go to Tools > Device Constraint Editor and put the next constraints

fe204a2ec2ff9794a9fe0ac9c0bd21bb.png

  • Then go to strategy1 > edit > Bitstream > Output Format > Raw Bit File ASCII
  • Run Export Files
  • Copy the exported .rbt file under impl1 into the STEPLink folder when you connect the fpga through USB

CONCLUSION

After a couple of days trying to upload some code I concluded that the board is not working as expected.