Z-turn-Board-V2-Diary

Phase 1 [Vivado]

FIXME: Create project with “Project is an extensible Vitis platform (?)”

Accessible to the PL:

Limited to the PS:

Lets blink, the available ones, around 1Hz +- 1.


Code:

library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.NUMERIC_STD.all;       -- Operations: addition/..

-- ------------------------------------------ --
-- =                 Entity                 = --
-- ------------------------------------------ --
-- Description: Functions:
--      Blink RGB and buzzer
-- Downscaler:
--      Count up to CLK's frequency. Keep the MSbits.
-- -
entity Blink is
    Generic(
        N: natural := 27);  -- Primitive downscaling
    Port(
        CLK        : in  STD_LOGIC;
        RESET      : in  STD_LOGIC;
        --
    	BUZZER     : out STD_LOGIC;
    	RGB        : out STD_LOGIC_VECTOR(2 downto 0));
end Blink;

-- ------------------------------------------------ --
-- =                 Architecture                 = --
-- ------------------------------------------------ --
architecture Behavioral of Blink is
    signal state    : std_logic_vector(N - 1 downto 0) := (others => '0');    -- downscale to 1b0Hz
begin
    -- Downscale: Count up to 2**N, close to CLK's frequency.
    -- -
    process (CLK, RESET)
        variable v: natural range 2**N - 1 downto 0 := 0;
    begin
        state <= std_logic_vector(to_unsigned(v, N));
        if rising_edge(CLK) then
--            if RESET = '1' then         -- Reset
--                v := 0;
--            else
                  v := v + 1;
--            end if;
        end if;
    end process;

    -- Blink around 1Hz +- 1, by following the MSB - 1 bit.
    -- -
    RGB     <= state(N - 1 downto N - 3);
    BUZZER  <= state(N - 2);

end Behavioral;

Procedure:

Outline:

Steps

Add Zynq

img: adding Zynq

Block automation

img: Block automation

Remove extraneous (optional). IMPORTANT: Leave SD enabled (used for transfer of VHDL to the PL).

img: Remove highlighted

img: Removing MIO

img: Removing CLK

img: Removing AXI

Create wrapper

img: Wrapper

Set default CLK (after wrapper (in order to set “reset”))

img: Default CLK

Add module (VHDL)

img: Module

Automate

img: Connection automation

Make ports(pins) external

img: External

Save block design –

Set pins through “Open Elaborated Design”

img: Ports

Find the corresponding pins in the schematic

img: RGB: 2

img Buzzer: 2

Save changes: Will create constraints.xdc file.

img: Ports

Generate bitstream –

Export hardware (or platform): IMPORTANT: “Include Bitstream”

img: Export

img: Export: Include bitstream

Final [state]

img: Final

img: Final: 2


TODO: Second method: Export bitsream and use Vitis:Template:FSBL


Phase 2: Open Vitis