⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 leon_target.vhd

📁 ARM7的源代码
💻 VHD
字号:
------------------------------------------------------------------------------  This file is a part of the LEON VHDL model--  Copyright (C) 2003 Gaisler Research----  This library is free software; you can redistribute it and/or--  modify it under the terms of the GNU Lesser General Public--  License as published by the Free Software Foundation; either--  version 2 of the License, or (at your option) any later version.----  See the file COPYING.LGPL for the full details of the license.------------------------------------------------------------------------------- Entity: 	target-- File:	target.vhd-- Author:	Jiri Gaisler - Gaisler Research-- Description:	LEON target configuration package------------------------------------------------------------------------------library IEEE;use IEEE.std_logic_1164.all;package leon_target istype targettechs is   (gen, virtex, virtex2, atc35, atc25, atc18, fs90, umc18, tsmc25, proasic, axcel);-- synthesis configurationtype syn_config_type is record  targettech	: targettechs;  infer_ram 	: boolean;	-- infer cache and dsu ram automatically   infer_regf 	: boolean;	-- infer regfile automatically   infer_rom	: boolean;	-- infer boot prom automatically  infer_pads	: boolean;	-- infer pads automatically  infer_pci 	: boolean;	-- infer PCI pads automatically  infer_mult	: boolean;	-- infer multiplier automatically  rftype   	: integer;	-- regfile implementation option  targetclk 	: targettechs;  -- use technology specific clock generation  clk_mul  	: integer;	-- PLL clock multiply factor  clk_div  	: integer;	-- PLL clock divide factor  pci_dll   	: boolean;	-- Re-synchronize PCI clock using a DLL  pci_sysclk	: boolean;	-- Use PCI clock as system clockend record;-- processor configurationtype multypes is (none, iterative, m32x8, m16x16, m32x16, m32x32);type divtypes is (none, radix2);type iu_config_type is record  nwindows	: integer;	-- # register windows (2 - 32)  multiplier	: multypes;	-- multiplier type  mulpipe	: boolean;	-- m16x16 pipeline register  divider   	: divtypes;	-- divider type  mac 		: boolean;	-- multiply/accumulate  fpuen		: integer range 0 to 1;	-- FPU enable (integer due to synopsys limitations....sigh!)  cpen		: boolean;	-- co-processor enable   fastjump   	: boolean;	-- enable fast jump address generation  icchold   	: boolean;	-- enable fast branch logic  lddelay	: integer range 1 to 2; -- # load delay cycles (1-2)  fastdecode 	: boolean;	-- optimise instruction decoding (FPGA only)  rflowpow   	: boolean;	-- disable regfile when not accessed  watchpoints	: integer range 0 to 4; -- # hardware watchpoints (0-4)  impl   	: integer range 0 to 15; -- IU implementation ID  version	: integer range 0 to 15; -- IU version IDend record;-- FPU configurationtype fpucoretype  is (meiko, lth, grfpu);  		-- FPU core typetype fpuiftype is (none, serial, parallel); 	        -- FPU interface typetype fpu_config_type is record  core		: fpucoretype;	-- FPU core type  interface	: fpuiftype;	-- FPU inteface type  fregs		: integer;	-- 32 for serial interface, 0 for parallel   version	: integer range 0 to 7; -- FPU version IDend record;-- co-processor configurationtype cptype is (none, cpc); -- CP type-- cache configurationtype dsnoop_type is (none, slow, fast); -- snoop implementation typeconstant PROC_CACHE_MAX	: integer := 4;   -- maximum cacheability rangesconstant PROC_CACHE_ADDR_MSB : integer := 4; -- MSB address bits to decode cacheabilitytype cache_replace_type is (lru, lrr, rnd);  -- cache replacement algorithmconstant MAXSETS  : integer := 4;type cache_config_type is record  isets         : integer range 1 to 4;   -- # of sets in icache  isetsize	: integer;	-- I-cache size per set in Kbytes  ilinesize	: integer;	-- # words per I-cache line  ireplace      : cache_replace_type;         -- icache replacement algorithm  ilock     	: integer;	-- icache locking  dsets         : integer range 1 to 4;   -- # of sets in dcache  dsetsize	: integer;	-- D-cache size per set in Kbytes  dlinesize	: integer;	-- # words per D-cache line  dreplace      : cache_replace_type;         -- icache replacement algorithm  dlock     	: integer;	-- dcache locking  dsnoop    	: dsnoop_type;	-- data-cache snooping  drfast    	: boolean;	-- data-cache fast read-data generation  dwfast    	: boolean;	-- data-cache fast write-data generation  dlram     	: boolean;	-- local data ram enable  dlramsize 	: integer;	-- local data ram size in kbytes  dlramaddr 	: integer;	-- local data ram start address (8 msb)end record;-- mmu configurationtype mmu_tlb_type is (splittlb, combinedtlb);type mmu_tlb_rep is (replruarray, repincrement);  -- cache replacement algorithmtype mmu_config_type is record  enable        : integer range 0 to 1;  itlbnum       : integer range 2 to 64;  dtlbnum       : integer range 2 to 32;  tlb_type      : mmu_tlb_type;  tlb_rep       : mmu_tlb_rep;  tlb_diag      : boolean;end record;-- memory controller configurationtype mctrl_config_type is record  bus8en    	: boolean;	-- enable 8-bit bus operation  bus16en    	: boolean;	-- enable 16-bit bus operation  wendfb   	: boolean;	-- enable wen feed-back to data bus drivers  ramsel5    	: boolean;	-- enable 5th ram select  sdramen    	: boolean;	-- enable sdram controller  sdinvclk   	: boolean;	-- invert sdram clockend record;type boottype is (memory, prom, dual);type boot_config_type is record  boot 		: boottype;	-- select boot source  ramrws   	: integer;	-- ram read waitstates  ramwws   	: integer;	-- ram write waitstates  sysclk   	: integer;	-- cpu clock  baud     	: positive;	-- UART baud rate  extbaud  	: boolean;	-- use external baud rate setting  pabits   	: positive;	-- internal boot-prom address bitsend record;-- PCI configurationtype pcitype is (none, insilicon, target_only, opencores); -- PCI core typetype pci_config_type is record  pcicore   	: pcitype;	-- PCI core type  ahbmasters	: integer;	-- number of ahb master interfaces  ahbslaves 	: integer;	-- number of ahb slave interfaces  arbiter 	: boolean;	-- enable PCI arbiter  fixpri  	: boolean;	-- use fixed arbitration priority  prilevels 	: integer;	-- number of priority levels in arbiter  pcimasters	: integer;	-- number of PCI masters to be handled by arbiter  vendorid  	: integer;	-- PCI vendor ID  deviceid  	: integer;	-- PCI device ID  subsysid  	: integer;	-- PCI subsystem ID  revisionid	: integer;	-- PCI revision ID  classcode 	: integer;	-- PCI class code  pmepads 	: boolean;	-- enable power down pads  p66pad  	: boolean;	-- enable PCI66 pad  pcirstall	: boolean;	-- PCI reset affects complete processorend record;-- debug configurationtype debug_config_type is record  enable    	: boolean;	-- enable debug port  uart     	: boolean;	-- enable fast uart data to console  iureg    	: boolean;	-- enable tracing of iu register writes  fpureg      	: boolean;	-- enable tracing of fpu register writes  nohalt      	: boolean;	-- dont halt on error  pclow       	: integer;	-- set to 2 for synthesis, 0 for debug  dsuenable    	: boolean;	-- enable DSU  dsutrace     	: boolean;	-- enable trace buffer  dsumixed     	: boolean;	-- enable mixed-mode trace buffer  dsudpram     	: boolean;	-- use dual-port ram for trace buffer  tracelines	: integer range 64 to 1024; -- # trace lines (needs 16 bytes/line)end record;-- AMBA configuration typesconstant AHB_MST_MAX	: integer := 4;   -- maximum AHB mastersconstant AHB_SLV_MAX	: integer := 7;   -- maximum AHB slavesconstant AHB_SLV_ADDR_MSB : integer := 4; -- MSB address bits to decode slavessubtype ahb_range_addr_type is std_logic_vector(AHB_SLV_ADDR_MSB-1 downto 0);type ahbslv_addr_type is array (0 to 15) of integer range 0 to AHB_SLV_MAX;type ahb_config_type is record  masters	: integer range 1 to AHB_MST_MAX;  defmst 	: integer range 0 to AHB_MST_MAX-1;  split  	: boolean;	-- add support for SPLIT reponse  testmod	: boolean;	-- add AHB test module (not for synthesis!)end record;constant APB_SLV_MAX	   : integer := 16;  -- maximum APB slavesconstant APB_SLV_ADDR_BITS : integer := 10;  -- address bits to decode APB slavessubtype apb_range_addr_type is std_logic_vector(APB_SLV_ADDR_BITS-1 downto 0);type irq_filter_type is (lvl0, lvl1, edge0, edge1);type irq_filter_vec is array (0 to 31) of irq_filter_type;type irq2type is record  enable   	: boolean;	-- enable chained interrupt controller  channels 	: integer;	-- number of additional interrupts (1 - 32)  filter	: irq_filter_vec; -- irq filter definitionsend record;type peri_config_type is record  cfgreg   	: boolean;	-- enable LEON configuration register  ahbstat  	: boolean;	-- enable AHB status register  wprot  	: boolean;	-- enable RAM write-protection unit  wdog   	: boolean;	-- enable watchdog  irq2en      	: boolean;	-- chained interrupt controller enable  ahbram 	: boolean;	-- enable AHB RAM  ahbrambits 	: integer;	-- address bits in AHB ram  ethen  	: boolean;	-- enable ethernet coreend record;constant irq2none : irq2type := ( enable => false, channels => 32,  filter => (others => lvl1));--constant irq2chan4 : irq2type := ( enable => true, channels => 4,--  filter => (lvl1, lvl1, edge0, edge1, others => lvl0));end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -