đŸ”Ŧ ICE 2: Microblaze Custom Hardware#

📌 Objectives#

  • Students should know how to integrate custom hardware with the Microblaze architecture

📜 Synopsis#

In this ICE, you will add a counter with LEDs to the Microblaze hardware design then use a C program to interact with the counter through the serial terminal.

🧮 Procedure#

đŸ’ģ Code Snippets#

My_Counter_IP_slave_lite_v1_0_S00_AXI.vhd#

    LED : out std_logic_vector(7 downto 0);
    component lec10 is
    generic (N: integer := 4);
    port(
        clk: in  STD_LOGIC;
        reset_n : in  STD_LOGIC;
        ctrl: in std_logic_vector(1 downto 0);
        D: in unsigned (N-1 downto 0);
        Q: out unsigned (N-1 downto 0));
    end component;

    signal Q : unsigned (7 downto 0);
    X"000000" & std_logic_vector(Q)
    counter: lec10 
    generic map (8)
    port map(
        clk => S_AXI_ACLK, 
        reset_n => S_AXI_ARESETN, 
        ctrl =>    slv_reg1(1 downto 0),
        D => unsigned(slv_reg0(7 downto 0)), 
        Q => Q);
    LED <= std_logic_vector(Q);

My_Counter_IP.vhd#

    LED : out std_logic_vector(7 downto 0); 
    LED : out std_logic_vector(7 downto 0); 
    LED => LED,