|
|||||||||||
| 技術交流 | 電路欣賞 | 工控天地 | 數字廣電 | 通信技術 | 電源技術 | 測控之家 | EMC技術 | ARM技術 | EDA技術 | PCB技術 | 嵌入式系統(tǒng) 驅動編程 | 集成電路 | 器件替換 | 模擬技術 | 新手園地 | 單 片 機 | DSP技術 | MCU技術 | IC 設計 | IC 產業(yè) | CAN-bus/DeviceNe |
conv_integer怎么用 |
| 作者:suncilang 欄目:EDA技術 |
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity my_mux is PORT ( d: in std_logic_vector(30 downto 0); sel: in std_logic_vector(4 downto 0); q : out std_logic ); end my_mux; architecture arc of my_mux is begin PROCESS (sel,d) variable sel_in: integer range 0 to 30; begin sel_in:=conv_integer(sel); if (sel_in>=0 and sel_in<=30 ) then q<=d(sel_in); else q<='Z'; end if; end PROCESS; end arc; |
| 2樓: | >>參與討論 |
| 作者: chenjj79 于 2006/2/28 10:16:00 發(fā)布:
conv_integer的使用 這個函數是用來進行類型轉換的,就是把標準邏輯矢量轉換為實型。這是為了表達的方便。在綜合的時候還是以是矢量的形式存在的。 |
|
|
|
| 免費注冊為維庫電子開發(fā)網會員,參與電子工程師社區(qū)討論,點此進入 |
Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號 |