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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? memorylib.vhd

?? nand flash NAND01GR3B (st)的仿真模型 (VHDL) 的
?? VHD
?? 第 1 頁 / 共 3 頁
字號:
--   --           _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/--         _/                   _/  ____________________________________________ --         _/                  _/  /                                           / --         _/_/               _/  /                                NAND01GR3B / --          _/_/_/           _/  /                                           /  --             _/_/         _/  /                                     1Gbit / --              _/_/       _/  /        8 bit, 2112 Byte Page, 1.8 V, NAND / --                _/      _/  /                                           / --                _/     _/  /                     VHDL Behavioral Model / --                _/    _/  /                               Version 3.0 / --             _/_/    _/  /                                           /--          _/_/_/    _/  /     Copyright (c) 2006 STMicroelectronics / --        _/_/_/     _/  /___________________________________________/ --  _/_/_/_/_/      _/    --  --
----------------------------------------------------------------------------------------
--                                    MEMORY LIST PACKAGE                             --
----------------------------------------------------------------------------------------
--                                                                                    --
--           Implements the memory array by a double list of memory cells.            --
--           Each cell is linked to the next cell and to the previous cell.           --
-- Is possible to acces to the head of the list, to the tail and also to the middle.  --
--                                                                                    -- 
----------------------------------------------------------------------------------------

library IEEE; 
   use IEEE.std_logic_1164.all;
   use IEEE.std_logic_TextIO.all;
   use IEEE.Std_Logic_Arith.all;

library Std;
   use STD.TextIO.all;

library Work;
   use work.data.all;
   use work.StringLib.all;

package MemoryLib is

   type memory_cell;                                  -- the memory cell

   type cell_pointer is access memory_cell;           -- the pointer to the memory cell

   type memory_cell is record

        prev, nexto: cell_pointer;                    -- pointers to the previous cell and to the next cell
        value      : DataMem_type;                   
        endAddr    : AddrMem_Type;                 

   end record;

   type modality is (reading, writing, erasing);      -- reading the memory, writing in the memory or erasing the memory ?
   type balance  is (left, centre, right);            -- middle is balanced ?

   type memory_rec is record

        head, middle, tail: cell_pointer;
        bal_value: balance;

   end record;

   constant FF: DataMem_type:= (Others => '1');


   ------------------------------------------------------------------------
   -------  Public Procedures: they can be used in the model  -------------
   ------------------------------------------------------------------------

   -- Used to init the memory list
   procedure InitMemory(variable memory: inout memory_rec);    

   -- Used to write or to erase the memory
   procedure putMemory(variable memory: inout memory_rec; variable add: in AddrMem_type; variable data: in DataMem_type);

   -- Used to read a memory cell
   procedure getMemory(variable memory: in memory_rec; variable add: in AddrMem_type; variable data: out DataMem_type);

   -- Used to read a vector of memory cells
   procedure getMemoryBuffer(variable memory: in memory_rec; variable firstAdd: in AddrMem_type; variable numData: in natural; variable dataVector: out MemBuffer_type);
   
   -- Used to load a memory file in the memory list
   procedure LoadMemoryFile(FileName: in String; variable memory: inout memory_rec);

   -- Used to save into a file the memory list
   procedure SaveMemoryFile(FileName: in String; variable memory: in memory_rec);

   -- Used to display the memory list
   procedure PrintList(variable memory: in memory_rec);

   -- Used to display the two passed values
   procedure PrintData(variable add:in AddrMem_type; variable data: in DataMem_type);

   --------------------------------------------------------------------------
   ------  Private Procedures: they must be used only in this package  ------
   --------------------------------------------------------------------------
   
   -- Insert a cell to the head of the memory list
   procedure AddCellToHead(variable head: inout cell_pointer; variable add: in AddrMem_type; variable data: in DataMem_type; variable insdel_num: inout integer);

   -- Add a cell to the tail of the memory list
   procedure AddCellToTail(variable tail: inout cell_pointer; variable data: in DataMem_type; variable insdel_num: inout integer);

   -- Erase a cell of the memory list
   procedure EraseCell(variable memory: inout memory_rec; variable pointer: inout cell_pointer; variable insdel_num: inout integer);

   -- Erase the head of the memory list
   procedure EraseHead(variable head_pnt: inout cell_pointer; variable insdel_num: inout integer);

   -- Erase the tail of the memory list
   procedure EraseTail(variable tail: inout cell_pointer; variable insdel_num: inout integer);

   -- Insert a cell in the memory list
   procedure InsertCell(variable pointer: in cell_pointer; variable add: in AddrMem_type; variable data: in DataMem_type; variable insdel_num: inout integer);

   -- Return an error message when you try to write into a not empty cell
   procedure WriteError;

   -- Return an error message if the specified address is out of range
   procedure AddressError; 

   -- Update the position of the middle pointer of the memory list
   procedure UpdateMiddle(variable memory: inout memory_rec; variable add: in AddrMem_type; variable mode: in modality; variable insdel_num: inout integer);

   -- Search for the right position for a read or an update operation
   procedure SearchForRightPosition(variable middle: in cell_pointer; variable pnt: inout cell_pointer; variable next_pnt: out cell_pointer; variable add: in AddrMem_type; variable mode: in modality; variable writeError: out boolean);

end MemoryLib;


----------------------------------------------------------------
--------  Package Body - procedures implementation  ------------
----------------------------------------------------------------

package body MemoryLib is


   ------------------------------------------------
   -------  Initialization of the memory ----------
   ------------------------------------------------
   
   procedure InitMemory(variable memory: inout memory_rec) is
   variable pointer: cell_pointer;
   begin

     pointer:= new memory_cell;
     memory.head:= pointer;
     memory.middle:= pointer;                     -- pointer to the middle of the list
     memory.tail:= pointer;
     memory.bal_value:= centre;                   -- the memory is balanced

     pointer.value:= (others => '1');
     pointer.endAddr:= Last_Addr;

     pointer.prev:= null;
     pointer.nexto:= null;

   end;

   ----------------------------------------------------
   ---------  Print only a value of the list  ---------
   ----------------------------------------------------

   procedure PrintData(variable add: in AddrMem_type; variable data: in DataMem_type) is
   variable msg: line;
   begin

     write(msg, String'(" address =  "));
     write(msg, add);
     
     write(msg, String'("      "));

     write(msg, String'(" data =  "));
     write(msg, data);
     writeline(output, msg);

   end;


   ----------------------------------------------------
   ---------  Print the values of the list  -----------
   ----------------------------------------------------

   procedure PrintList(variable memory: in memory_rec) is
   variable pnt: cell_pointer;
   variable msg: line;
   begin

     pnt:= memory.head;
     while pnt /= null loop

        write(msg, pnt.value);
        write(msg, String'("  "));
        write(msg, pnt.endAddr);
        writeline(output,msg);
        
        pnt:= pnt.nexto;

     end loop;

     pnt:= memory.middle;

     write(msg, String'(" middle.value =  "));
     write(msg, pnt.value);
     write(msg, String'(" middle.endAddr =  "));
     write(msg, pnt.endAddr);
     write(msg, String'("    balance = "));
     
     if memory.bal_value = left then 
        write(msg, String'("left"));
     elsif memory.bal_value = centre then 
        write(msg, String'("centre"));
     else 
        write(msg, String'("right"));
     end if;
     
     writeline(output, msg);

   end;


   -----------------------------------------------------
   ----------  Searching in the memory list  -----------
   -----------------------------------------------------

   procedure SearchForRightPosition(variable middle: in cell_pointer; variable pnt: inout cell_pointer; variable next_pnt: out cell_pointer; variable add: in AddrMem_type; variable mode: in modality; variable writeError: out boolean) is
   variable search_pnt: cell_pointer;
   begin

     search_pnt:= middle;               -- searching starts from middle of the list
     pnt:= search_pnt;
     writeError:= false;

        if add < middle.endAddr then       -- search direction is left
     
           while add < search_pnt.endAddr
           
                 loop 
                        search_pnt:= search_pnt.prev;
                 end loop;
        
              if add > search_pnt.endAddr then 
       
                  if mode = writing then 
                        
                        pnt:= search_pnt.nexto;
                        next_pnt := pnt.nexto;

                  else 
                        pnt:= null;   -- mode = erasing or mode = reading; the cell is already to FF
                        next_pnt := search_pnt.nexto;
                     
                  end if;

                  writeError:= false;

               else        -- add = search_pnt.endAddr        
                  if mode = writing then 
               
                     if search_pnt.value = FF then 
                        search_pnt.endAddr:= search_pnt.endAddr - 1;
                        pnt:= search_pnt.nexto;
                        writeError:= false;

                     --elsif mode = reading then pnt:= search_pnt;         -- the value not is FF   
                        
                     else 
                          pnt:= search_pnt;
                          writeError:= true;             -- address is already written in the memory

                     end if;
                     
                   else                        -- mode = erasing or reading
                      pnt:= search_pnt;
                      writeError:= false;
                   end if;
               
                 next_pnt := pnt.nexto;

              end if;

        else                                 -- search direction is right 
     
          while add > search_pnt.endAddr 

              loop 
                  search_pnt:= search_pnt.nexto;
              end loop;

              if add < search_pnt.endAddr then              -- pnt:= search_pnt;

                 if mode = writing then 

                        pnt:= search_pnt;
                 else 
                        pnt:= null;   -- mode = erasing or mode = reading; the cell is already to FF
                     
                 end if;
                
                 next_pnt:= search_pnt;
                 writeError:= false;
            
              else   -- add = search_pnt.endAddr
             
                 if mode = writing then

                    if search_pnt.value = FF then 
                       search_pnt.endAddr:= search_pnt.endAddr - 1;
                       pnt:= search_pnt.nexto;

                    --elsif mode = reading then pnt:= search_pnt;   

                    else 
                        pnt:= search_pnt;
                        writeError:= true;      -- address is already written in the memory
                   
                    end if;
                   
                 else 
                     pnt:= search_pnt;   -- mode = erasing or reading
                     writeError:= false;

                 end if;
               
               next_pnt := search_pnt.nexto;
             end if;
       
        end if;

     -- In each case the right position is between pnt and pnt.prev

   end;


   ---------------------------------------------------------
   --------  Insert a cell in the memory list  -------------
   ---------------------------------------------------------

   procedure InsertCell(variable pointer: in cell_pointer; variable add: in AddrMem_type; variable data: in DataMem_type; variable insdel_num: inout integer) is
   variable ins_pnt, prev_pnt: cell_pointer;
   variable i: integer;
   variable myadd: AddrMem_type;
   variable mydata: DataMem_type;
   variable mypointer: cell_pointer;
   begin

      -- Insert the new two cells between pnt and pnt.prev

      myadd:= add;
      mydata:= data;
      mypointer:= pointer;
     
      for i in 1 to 2 loop
    
        ins_pnt:= new memory_cell;
        prev_pnt:= mypointer.prev;

        ins_pnt.value:= mydata;
        ins_pnt.endAddr:= myadd;

        ins_pnt.nexto:= mypointer;
        ins_pnt.prev:= prev_pnt;
        prev_pnt.nexto:= ins_pnt;
        mypointer.prev:= ins_pnt;

        if (i = 1) then 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久影音资源网| 欧美色欧美亚洲另类二区| 欧美xxxxx裸体时装秀| 日韩国产高清影视| 777午夜精品视频在线播放| 婷婷综合五月天| 777午夜精品视频在线播放| 亚洲国产精品自拍| 欧美人妇做爰xxxⅹ性高电影| 午夜私人影院久久久久| 欧美一区二区人人喊爽| 久久国内精品自在自线400部| 精品国产乱码久久久久久夜甘婷婷| 极品少妇xxxx精品少妇| 中文天堂在线一区| 日本高清无吗v一区| 午夜欧美在线一二页| 日韩限制级电影在线观看| 九九精品视频在线看| 国产精品每日更新| 色婷婷亚洲婷婷| 日韩avvvv在线播放| 久久久青草青青国产亚洲免观| 成人综合婷婷国产精品久久| 一区二区三区加勒比av| 日韩视频在线一区二区| 成人av在线电影| 日韩主播视频在线| 久久综合网色—综合色88| 波多野结衣视频一区| 图片区小说区区亚洲影院| 久久天堂av综合合色蜜桃网| 一本色道久久综合亚洲91| 日本成人中文字幕| 亚洲国产精品成人综合色在线婷婷| 91碰在线视频| 激情亚洲综合在线| 亚洲精品国产一区二区三区四区在线| 宅男噜噜噜66一区二区66| 成人精品电影在线观看| 日本不卡高清视频| 亚洲激情自拍偷拍| 久久久欧美精品sm网站 | 亚洲成人免费视| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 色爱区综合激月婷婷| 久久丁香综合五月国产三级网站| 亚洲欧洲99久久| 久久午夜羞羞影院免费观看| 91福利区一区二区三区| 国产综合色在线| 五月激情丁香一区二区三区| 国产精品盗摄一区二区三区| 欧美不卡一区二区三区| 欧美日韩一区久久| 99re成人在线| 国产成人精品亚洲午夜麻豆| 日韩电影免费在线观看网站| 亚洲视频在线一区二区| 国产日韩av一区二区| 91精品黄色片免费大全| 欧美亚日韩国产aⅴ精品中极品| 成人一区在线观看| 久久精品久久99精品久久| 亚洲国产成人av网| 亚洲黄色性网站| 亚洲欧洲日韩av| 国产欧美一区二区精品忘忧草 | 五月天久久比比资源色| 18成人在线视频| 国产精品国产三级国产aⅴ无密码| 精品国一区二区三区| 日韩一区二区三区精品视频| 在线播放视频一区| 欧美日韩一区二区三区在线看| 97精品国产露脸对白| caoporn国产一区二区| 丁香一区二区三区| 处破女av一区二区| 不卡一区二区三区四区| 99视频国产精品| 91影院在线观看| 色婷婷综合激情| 欧美亚洲精品一区| 欧美私模裸体表演在线观看| 日本黄色一区二区| 欧美日韩精品一区二区在线播放| 欧美日韩一二区| 欧美人动与zoxxxx乱| 欧美一区二区三区四区久久| 日韩欧美一级片| 久久精品人人做人人爽97| 久久久久国产一区二区三区四区| 久久蜜桃av一区二区天堂| 国产亚洲一区二区在线观看| 国产精品美女一区二区在线观看| 综合久久久久久久| 亚洲午夜一二三区视频| 日韩成人av影视| 国产酒店精品激情| proumb性欧美在线观看| 一本高清dvd不卡在线观看| 欧美日韩国产一二三| 欧美大肚乱孕交hd孕妇| 中文一区在线播放| 夜夜嗨av一区二区三区中文字幕| 婷婷综合另类小说色区| 国产乱码精品一区二区三区av| 成+人+亚洲+综合天堂| 欧美视频在线播放| 精品久久久久av影院| 中文字幕制服丝袜一区二区三区| 亚洲一区二区欧美| 狠狠色2019综合网| 色激情天天射综合网| 欧美一区二区三区思思人| 欧美高清在线视频| 亚洲国产成人va在线观看天堂| 久久精品国产一区二区三 | 99久久精品费精品国产一区二区| 欧美三级中文字幕在线观看| 久久亚洲欧美国产精品乐播| 亚洲欧美日韩国产一区二区三区 | 国产精品色在线观看| 婷婷久久综合九色国产成人 | 欧美日韩免费一区二区三区| 国产亚洲欧美日韩俺去了| 亚洲国产日韩综合久久精品| 国产精品综合久久| 欧美色综合网站| 国产精品女人毛片| 人人狠狠综合久久亚洲| 91丨porny丨蝌蚪视频| 26uuu亚洲综合色| 亚洲第一精品在线| 不卡一区二区三区四区| 精品国产免费久久| 香蕉久久夜色精品国产使用方法 | 久久精品久久精品| 欧美日精品一区视频| 亚洲成a人在线观看| 国产一区二区三区精品视频| 精品视频一区二区不卡| 国产精品日产欧美久久久久| 久久国产精品区| 欧美日韩国产经典色站一区二区三区| 欧美国产精品中文字幕| 精品一区二区三区不卡| 欧美精品在线视频| 亚洲综合无码一区二区| 成人av网站免费| 日本一区二区三区国色天香| 老司机免费视频一区二区三区| 欧美日韩国产123区| 亚洲另类在线制服丝袜| 成人激情av网| 欧美激情一二三区| 国产成人午夜精品影院观看视频| 欧美tickling挠脚心丨vk| 日韩影院精彩在线| 欧美老女人第四色| 亚洲成精国产精品女| 欧美在线影院一区二区| 亚洲男同1069视频| 久久久久久黄色| 午夜精品一区二区三区电影天堂 | 国产网站一区二区三区| 激情小说欧美图片| 久久伊99综合婷婷久久伊| 久久99最新地址| 26uuu国产一区二区三区| 激情五月婷婷综合网| 久久精子c满五个校花| 国产成人在线免费观看| 国产精品污污网站在线观看 | 捆绑调教美女网站视频一区| 日韩精品最新网址| 国产在线国偷精品产拍免费yy| 欧美va天堂va视频va在线| 国产一区二区在线观看免费| 久久久精品日韩欧美| 国产成人亚洲综合a∨婷婷图片| 国产欧美一区二区三区在线看蜜臀| 高清beeg欧美| 亚洲精品午夜久久久| 欧美日韩夫妻久久| 日本成人在线电影网| 精品久久久久久久久久久院品网| 久草热8精品视频在线观看| 国产婷婷色一区二区三区在线| 懂色av噜噜一区二区三区av| 亚洲精品视频在线观看网站| 欧美日韩黄色一区二区| 狠狠色狠狠色合久久伊人| 中文字幕av一区二区三区免费看 | 国产美女在线观看一区| 欧美国产日韩亚洲一区| 色婷婷亚洲精品| 免费在线看一区| 国产精品三级在线观看|