亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? makehex.vhd

?? Actel Fusion System Management Development Kit UART Example. Contains Libero design using CoreABC. P
?? VHD
?? 第 1 頁 / 共 2 頁
字號:
-- ********************************************************************/ 
-- Copyright 2007 Actel Corporation.  All rights reserved.
-- IP Engineering 
--
-- ANY USE OR REDISTRIBUTION IN PART OR IN WHOLE MUST BE HANDLED IN 
-- ACCORDANCE WITH THE ACTEL LICENSE AGREEMENT AND MUST BE APPROVED 
-- IN ADVANCE IN WRITING.  
--  
-- File:  makehex.vhd
--     
-- Description: Simple APB Bus Controller
--              Creates Hex Image Files  
--
-- Rev: 2.3   01Mar07 IPB  : Production Release   
--
-- Notes:
--   Converts the instructions encoded in instruction.txt into HEX files
--   
--
-- *********************************************************************/ 

library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;

use work.misc.all;
use work.textio.all;
use work.support.all;

use std.textio.all;


entity MAKEHEX is
  generic ( ENABLE   : boolean;
            ID       : integer range 0 to 9 ;
            FAMILY   : integer range 0 to 99;
            AWIDTH   : integer range 1 to 16;  
            DWIDTH   : integer range 8 to 32;   
            SDEPTH   : integer range 1 to 16;    
            ICWIDTH  : integer range 1 to 16;  
            IIWIDTH  : integer range 1 to 31;  
            IFWIDTH  : integer range 0 to 28;
            TESTMODE : integer range 0 to 99
           );
end MAKEHEX;


architecture RTL of MAKEHEX is

constant IWWIDTH    : integer := 32+16+4+6;   -- =58
constant SWIDTH     : integer := calc_swidth(SDEPTH);

constant AW : integer := AWIDTH;
constant DW : integer := DWIDTH;
constant SW : integer := max(1,SWIDTH);
constant IW : integer := ICWIDTH;

constant RAMDEPTH : integer := 2**IW;
constant RAMWIDTH : integer := AW+DW+SW+6;

constant NROWS   : integer := 1+ (RAMDEPTH-1)/512 ;
constant NCOLS   : integer := 1+ (RAMWIDTH-1)/9 ;
constant NRAMS   : integer :=  NCOLS*NROWS ;
constant RIDEPTH : integer :=  NRAMS*512 ;
constant RIWIDTH : integer :=  log2r(RIDEPTH);

constant APA  : boolean := (FAMILY=14);

component INSTRUCTIONS 
  generic ( AWIDTH   : integer range 1 to 16;  
            DWIDTH   : integer range 8 to 32;   
            SWIDTH   : integer range 0 to 4 ;    
            ICWIDTH  : integer range 1 to 16;  
            IIWIDTH  : integer range 1 to 32;
            IFWIDTH  : integer range 0 to 28;     
            IWWIDTH  : integer range 1 to 64;
            EN_MULT  : integer range 0 to 3;
            EN_INC   : integer range 0 to 1;
            ID       : integer range 0 to 9;
            TESTMODE : integer range 0 to 99
           );
  port     ( ADDRESS     : in  std_logic_vector(ICWIDTH-1 downto 0);
             INSTRUCTION : out std_logic_vector(IWWIDTH-1 downto 0)        
           );
end component;

signal  ADDRESS       : std_logic_vector(ICWIDTH-1 downto 0);
signal  INSTRUCTION   : std_logic_vector(IWWIDTH-1 downto 0);
signal  INSTRUCTIONX  : std_logic_vector(IWWIDTH-1 downto 0);
signal  INSCOMPRESSED : std_logic_vector(IWWIDTH-1+9 downto 0); -- RAM may be wider than instructions
    
constant DEBUG : BOOLEAN := FALSE;


subtype BYTEX       is std_logic_vector (7 downto 0);
type BYTE_ARRAYX    is array ( INTEGER range <>) of BYTEX;

function to_char( x: std_logic_vector) return character is
variable x1 :integer range 0 to 15;
variable c  : character;
begin
  x1 := conv_integer(x);
  case x1 is
    when 0  => c := '0';
    when 1  => c := '1';
    when 2  => c := '2';
    when 3  => c := '3';
    when 4  => c := '4';
    when 5  => c := '5';
    when 6  => c := '6';
    when 7  => c := '7';
    when 8  => c := '8';
    when 9  => c := '9';
    when 10 => c := 'A';
    when 11 => c := 'B';
    when 12 => c := 'C';
    when 13 => c := 'D';
    when 14 => c := 'E';
    when 15 => c := 'F';
  end case;
  return(c);
end to_char;
       
    
function create_ihex(n,addr : integer;  bytes : byte_arrayx ) return string is
variable p : integer;
variable str : string(1 to 80);
variable x   : std_logic_vector(31 downto 0);
variable csum : std_logic_vector(7 downto 0);
begin
 p := 1;
 csum := ( others => '0');
 str := ( others => NUL );
 str(1) := ':';
 x := conv_std_logic_vector(n,32);  
 str(2) :=to_char(x(7 downto 4));
 str(3) :=to_char(x(3 downto 0));
 csum := csum + x(7 downto 0);
 x := conv_std_logic_vector(addr,32);
 for i in 0 to 3 loop
   str(4+i) := to_char(x(15-4*i downto 12-4*i));
 end loop;
 csum := csum + x(15 downto 8) + x(7 downto 0);
 x := conv_std_logic_vector(0,32);  -- record type
 str(8) :=to_char(x(7 downto 4));
 str(9) :=to_char(x(3 downto 0));
 csum := csum + x(7 downto 0); 
 for i in 0 to n-1 loop
   str(10+2*i) :=to_char(bytes(i)(7 downto 4));
   str(11+2*i) :=to_char(bytes(i)(3 downto 0));
   csum := csum + bytes(i);
 end loop;
 csum := 1 -csum -1;
 str(10+2*n) := to_char(csum(7 downto 4));
 str(11+2*n) := to_char(csum(3 downto 0));
 return(str(1 to 80));
end create_ihex;    
    
--:020000021000EC
    
function create_addr_ihex(addr : integer ) return string is
variable p : integer;
variable str : string(1 to 80);
variable x   : std_logic_vector(31 downto 0);
variable csum : std_logic_vector(7 downto 0);
begin
 p := 1;
 csum := ( others => '0');
 str := ( others => NUL );
 str(1) := ':';
 x := conv_std_logic_vector(2,32);  
 str(2) :=to_char(x(7 downto 4));
 str(3) :=to_char(x(3 downto 0));
 csum := csum + x(7 downto 0);
 x := conv_std_logic_vector(0,32);
 for i in 0 to 3 loop
   str(4+i) := to_char(x(15-4*i downto 12-4*i));
 end loop;
 csum := csum + x(15 downto 8) + x(7 downto 0);
 x := conv_std_logic_vector(02,32); -- record type
 str(8) :=to_char(x(7 downto 4));
 str(9) :=to_char(x(3 downto 0));
 csum := csum + x(7 downto 0); 
 x := conv_std_logic_vector(addr,32);   -- record type 2
 x(15 downto 0) := x(19 downto 4);      -- shift by 4
 str(10) :=to_char(x(15 downto 12));
 str(11) :=to_char(x(11 downto 8));
 str(12) :=to_char(x(7 downto 4));
 str(13) :=to_char(x(3 downto 0));
 csum := csum + x(15 downto 8);
 csum := csum + x(7 downto 0);
 csum := 1 -csum -1;
 str(10+2*2) := to_char(csum(7 downto 4));
 str(11+2*2) := to_char(csum(3 downto 0));
 return(str(1 to 80));
end create_addr_ihex;   
        
begin
    
-------------------------------------------------------------------------------------------------
-- VHDL Code with Instruction Sequence
-- Note this gives out a 58 bit instruction heavily populated with dont cares


UINS : INSTRUCTIONS  generic map
          ( AWIDTH   => AWIDTH,  
            DWIDTH   => DWIDTH,   
            SWIDTH   => SWIDTH,    
            EN_MULT  => 1,           -- assume MULT and no INC
            EN_INC   => 0,           -- INC's will be mapped to ADDS
            ICWIDTH  => ICWIDTH, 
            IIWIDTH  => IIWIDTH, 
            IFWIDTH  => IFWIDTH, 
            IWWIDTH  => IWWIDTH, 
            ID       => ID,
            TESTMODE => TESTMODE
           )
  port map ( ADDRESS     => ADDRESS,    
             INSTRUCTION => INSTRUCTIONX      
           );

-------------------------------------------------------------------------------------------------
-- Remove Dont Cares

process(INSTRUCTIONX)
begin
  for j in INSTRUCTIONX'range loop
    if INSTRUCTIONX(j)='0' or INSTRUCTIONX(j)='1' then
      INSTRUCTION(j) <= INSTRUCTIONX(j);
    else
      INSTRUCTION(j) <= '0';
    end if;
  end loop;
end process;    

-- Compress the 58 Bit instruction to the Miniumn Size based on AW,DW,SW
process(INSTRUCTION)
begin   
  INSCOMPRESSED <= ( others => '0');
  INSCOMPRESSED(5 downto 0) <= INSTRUCTION(5 downto 0);
  if SW>0 then
    INSCOMPRESSED(SW-1+6 downto 6) <= INSTRUCTION(SW-1+6 downto 6); 
  end if;   
  INSCOMPRESSED(AW-1+SW+6 downto SW+6)        <= INSTRUCTION(AW-1+4+6 downto 4+6);        
  INSCOMPRESSED(DW-1+AW+SW+6 downto AW+SW+6 ) <= INSTRUCTION(DW-1+16+4+6 downto 16+4+6 ); 
end process;


-------------------------------------------------------------------------------------------------
    
process
file FSTR             : text ; 
file FSTRC            : text ; 
file Fmem             : text ; 
file Fhex             : text ; 
variable INS          : std_logic_vector(IWWIDTH-1 downto 0);
variable addr         : integer;
variable dbits        : integer;
variable data         : std_logic_vector(8 downto 0);
variable dataw        : std_logic_vector(72 downto 0);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品视频一区二区| 亚洲视频在线一区二区| 色综合久久九月婷婷色综合| 全国精品久久少妇| 一区二区三区中文字幕在线观看| 日韩精品资源二区在线| 欧美私人免费视频| 成人免费高清视频| 久久99国产精品尤物| 亚洲第一二三四区| 最新国产成人在线观看| 国产偷国产偷精品高清尤物| 欧美一区二区性放荡片| 欧美日韩一区二区三区视频| 91色九色蝌蚪| 国产a级毛片一区| 国产一区欧美二区| 麻豆91在线观看| 亚洲成人av中文| 亚洲免费大片在线观看| 国产精品久久看| 国产日韩精品一区二区浪潮av | 91蝌蚪porny| 国产酒店精品激情| 韩国三级在线一区| 美女视频黄免费的久久 | 欧美午夜精品久久久| av午夜精品一区二区三区| 风间由美一区二区三区在线观看 | 在线视频观看一区| 色先锋资源久久综合| 99国产精品久久| 成人免费看片app下载| 不卡的电视剧免费网站有什么| 国产精品影音先锋| 国产成人午夜精品5599| 国产成人av一区二区三区在线| 加勒比av一区二区| 国产精品一区二区久久精品爱涩| 韩国成人福利片在线播放| 另类小说图片综合网| 狠狠色丁香久久婷婷综合_中 | av高清不卡在线| 91丝袜美女网| 欧美日韩一级黄| 欧美日韩国产精品自在自线| 91精品国产综合久久久久| 日韩一区二区在线免费观看| 欧美成人a∨高清免费观看| 久久视频一区二区| 国产精品欧美久久久久无广告 | 国产精品素人视频| 亚洲免费视频成人| 日韩精品电影一区亚洲| 久久99精品国产| 国产·精品毛片| 在线中文字幕一区| 欧美一区二区私人影院日本| 久久―日本道色综合久久| 国产女人水真多18毛片18精品视频| 中文字幕一区二区三区四区| 亚洲制服丝袜av| 美女精品一区二区| 国产.欧美.日韩| 精品视频免费看| 2023国产精品自拍| 中文字幕一区二区三区在线不卡 | 日韩电影在线免费看| 精品无码三级在线观看视频 | 精品粉嫩aⅴ一区二区三区四区| 26uuu另类欧美| 久久se精品一区精品二区| 国产精品66部| 国产毛片精品视频| 色综合久久久久综合| 欧美日韩免费观看一区三区| 欧美成人福利视频| 日韩久久一区二区| 日本亚洲视频在线| 波多野结衣一区二区三区| 欧美午夜理伦三级在线观看| 91麻豆精品91久久久久久清纯| 久久蜜桃av一区精品变态类天堂 | 99在线热播精品免费| 3d成人h动漫网站入口| 国产精品美女视频| 日本美女视频一区二区| www.99精品| 日韩精品一区二区三区四区 | 久久午夜免费电影| 亚洲超碰精品一区二区| 东方欧美亚洲色图在线| 国产欧美精品一区二区三区四区 | 日日骚欧美日韩| 国产成人精品一区二区三区四区| 欧美日韩一区不卡| 中文字幕色av一区二区三区| 麻豆精品视频在线| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美成人激情免费网| 亚洲免费观看高清完整版在线| 国产精品一二三四五| 欧美二区三区的天堂| 亚洲日本在线视频观看| 国产精品一区不卡| 欧美人动与zoxxxx乱| 樱花草国产18久久久久| 国产v综合v亚洲欧| 精品国产一区二区三区av性色| 亚洲成av人在线观看| 日本高清不卡aⅴ免费网站| 中文字幕 久热精品 视频在线| 九一久久久久久| 日韩一二三四区| 日韩精品一二区| 欧美日韩不卡一区二区| 一区二区在线观看av| 激情综合五月婷婷| 欧美天堂一区二区三区| 亚洲乱码国产乱码精品精98午夜| 夫妻av一区二区| 国产午夜精品美女毛片视频| 国产乱一区二区| 久久久精品免费网站| 国产精品一区二区你懂的| 亚洲精品一区二区三区影院| 久久精品国产久精国产| 日韩欧美精品三级| 蜜臀av一区二区在线免费观看| 欧美一级爆毛片| 狠狠色2019综合网| 欧美精品一区二区在线播放| 国产原创一区二区三区| 亚洲精品一区二区三区福利| 韩国午夜理伦三级不卡影院| 久久夜色精品一区| 国产成人综合亚洲网站| 亚洲国产高清aⅴ视频| av高清久久久| 成人app下载| 中文字幕av一区二区三区免费看| www.激情成人| 亚洲综合色视频| 在线观看91精品国产麻豆| 日韩成人午夜电影| 日韩午夜精品电影| 国产一区二区三区在线观看精品 | 久久久午夜电影| 国产成人精品一区二区三区四区| 中文字幕av在线一区二区三区| 99久久精品国产一区二区三区| 亚洲人成在线播放网站岛国| 欧美少妇一区二区| 麻豆91免费观看| 国产欧美va欧美不卡在线| 99国产精品久久久久久久久久久| 亚洲精品中文字幕乱码三区| 欧美视频一区二区三区在线观看 | 91国产丝袜在线播放| 丝袜亚洲精品中文字幕一区| 欧美xxxx在线观看| 成年人国产精品| 亚洲成人久久影院| 26uuu精品一区二区三区四区在线| 成人网在线免费视频| 亚洲综合久久av| 日韩精品一区二区三区在线观看| 成人开心网精品视频| 亚洲高清久久久| 国产亚洲污的网站| 欧美三级三级三级爽爽爽| 国产综合久久久久影院| 亚洲欧美色图小说| 精品国产乱码久久久久久蜜臀| www.亚洲在线| 热久久一区二区| 1区2区3区国产精品| 日韩三级伦理片妻子的秘密按摩| 不卡大黄网站免费看| 美国一区二区三区在线播放| 国产精品入口麻豆九色| 欧美欧美欧美欧美| 国产99久久久国产精品免费看| 亚洲国产欧美一区二区三区丁香婷| 精品盗摄一区二区三区| 在线视频观看一区| 粉嫩久久99精品久久久久久夜| 日韩二区三区在线观看| 国产精品成人免费| 久久综合丝袜日本网| 欧美亚洲综合久久| 粉嫩13p一区二区三区| 日本亚洲天堂网| 亚洲在线一区二区三区| 国产日产欧美精品一区二区三区| 8x8x8国产精品| 日本韩国欧美国产| 成人av综合在线| 国产精品99精品久久免费| 日韩激情中文字幕|