天天看點

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

FPGA Xilinx_ISE初學及使用流程

  • 背景
    • FPGA
    • ISE
  • ISE使用流程

背景

最近在做畢設,選了一個關于FPGA的課題。雖然在大學期間學了VHDL,QuartusII軟體,但在拿到這個題目的時候還是感覺一臉懵逼,才開始對FPGA真正的了解。

FPGA

  1. FPGA是什麼?

    FPGA(field programble gate array),現場可程式設計邏輯門陣列;

    就是通過程式設計可以改變内部結構的晶片;

  2. 優勢:與ASIC(專用內建晶片)相比,可以減少時間成本和人力成本,減少一個晶片再生産的成本和規模;
  3. 應用領域:

    通信/算法/嵌入式/安防監控/工業自動化;

  4. 主要FPGA廠商

    1)xilinx 開發平台ISE

    2)Altera 開放平台QuartusII

    3)Actel 開放平台libero

    4)Atmel

ISE

由于vivado的誕生,ISE停留在了ISE 14.7,但是ISE 14.7是支援spartan 6的。

ISE使用流程

1)建立工程

file——new project(工程路徑不能出現中文)

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

晶片選型:

family晶片類型/device晶片編号/package封裝

preferred language:選擇VHDL或者verilog進行程式設計

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

接着點選next,finish建立工程結束。

2)添加源代碼

點選所選的晶片,右鍵,點選new source。

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程
FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

用VHDL程式設計就選擇vhdl module

用verilog就選擇verilog module

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

輸入輸出管腳配置設定;然後finish進入如下界面

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

開始編寫結構體部分。

本示例用vhdl編寫分頻器做示範

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

然後點選左下角進行綜合,check syntax(檢查文法)。沒錯的話進行仿真

3)仿真

左上角implementation切換為simulation

選中你的behavioral檔案,右鍵添加new source

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

如果是vhdl檔案,選擇vhdl test bench;如果是Verilog,選擇verilog test fixture。

在本文這兒建立vhdl test bench,代碼如下

--------------------------------------------------------------------------------
-- Company: 
-- Engineer:
--
-- Create Date:   10:41:30 03/06/2020
-- Design Name:   
-- Module Name:   E:/laji/baud/baud_tb.vhd
-- Project Name:  baud
-- Target Device:  
-- Tool versions:  
-- Description:   
-- 
-- VHDL Test Bench Created by ISE for module: baud
-- 
-- Dependencies:
-- 
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
-- Notes: 
-- This testbench has been automatically generated using types std_logic and
-- std_logic_vector for the ports of the unit under test.  Xilinx recommends
-- that these types always be used for the top-level I/O of a design in order
-- to guarantee that the testbench will bind correctly to the post-implementation 
-- simulation model.
--------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
 
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--USE ieee.numeric_std.ALL;
 
ENTITY baud_tb IS
END baud_tb;
 
ARCHITECTURE behavior OF baud_tb IS 
 
    -- Component Declaration for the Unit Under Test (UUT)
 
    COMPONENT baud
    PORT(
         clkin : IN  std_logic;
         rst : IN  std_logic;
         clkout : OUT  std_logic
        );
    END COMPONENT;
    

   --Inputs
   signal clkin : std_logic := '0';
   signal rst : std_logic := '0';

 	--Outputs
   signal clkout : std_logic;

   -- Clock period definitions

BEGIN
 
	-- Instantiate the Unit Under Test (UUT)
   uut: baud PORT MAP (
          clkin => clkin,
          rst => rst,
          clkout => clkout
        );

   -- Clock process definitions

   -- Stimulus process
    -- hold reset state for 100 ns.
		process
		begin
		rst<='1';
      wait for 100 ns;	
      rst<='0';
      wait for 5 ms;	
      end process;
		
				process
		begin
		clkin<='1';
      wait for 100 ns;	
      clkin<='0';
      wait for 100 ns;	
      end process;


END;

           

然後點選左下角behavioral check syntax,文法檢查;

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

然後點選simulate behavior model,檢視仿真結果;

FPGA Xilinx_ISE初學及使用流程背景ISE使用流程

4)引腳配置設定

Implementation-user constraints-I/O PIN planning post

查手冊

生成ucf檔案

5)實作implementation design (翻譯,映射,布線布局)

Generate programming files 生成bit流檔案。

6)下載下傳驗證

後面的步驟還沒買開發闆,是以暫時沒有圖。

上面就是xilinx使用ise進行開發的流程。