|
|||||||||||
| 技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測(cè)控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng) 驅(qū)動(dòng)編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe |
問(wèn)一個(gè)VHDL的錯(cuò)誤提示信息 |
| 作者:zxchit 欄目:單片機(jī) |
signal "XXX" has multiple sources. 這個(gè)錯(cuò)誤提示的原因是什么呀?找了一個(gè)下午都沒(méi)找到。源程序如下。為一個(gè)可預(yù)置的24位可逆計(jì)數(shù)器。"sig"為輸出的計(jì)數(shù)符號(hào)給單片機(jī)。錯(cuò)誤提示有四條,類(lèi)型都是上面的同一個(gè)。XXX代表程序中的四個(gè)信號(hào):q,sig,tmp,tmp_sig.請(qǐng)各位有時(shí)間掃兩眼,幫忙看一下。多謝了! LIBRARY IEEE; USE IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.all; use IEEE.std_logic_arith.all; ENTITY counter IS PORT( PULSE,up_down,reset,load,load_sig :IN STD_LOGIC; unit_sel: IN STD_LOGIC_VECTOR(1 downto 0); q : IN STD_LOGIC_VECTOR(7 downto 0); sig : out std_logic; d : out STD_LOGIC_VECTOR(23 downto 0) ); END counter; ARCHITECTURE counter_arch OF counter IS SIGNAL dir :STD_LOGIC; signal tmp_sig :std_logic; signal tmp :STD_LOGIC_VECTOR(23 downto 0); BEGIN load_reset:PROCESS.html">PROCESS (reset,load,unit_sel) begin if reset='0' then tmp<="000000000000000000000000"; tmp_sig<=load_sig; elsif(load'event)and(load='1')then case unit_sel is when "00" => tmp(23 downto 16)<=q; when "01"=> tmp(15 downto 8)<=q; when others => tmp(7 downto 0)<=q; end case; end if; d<=tmp; sig<=tmp_sig; end PROCESS.html">PROCESS load_reset; count:PROCESS (PULSE,up_down,tmp_sig,dir,tmp) BEGIN if (PULSE'event)and(PULSE='1') then if tmp="000000000000000000000000" then if(up_down='1')then tmp_sig<='1'; else tmp_sig<='0'; end if; end if; if (tmp_sig='1')then dir<=up_down; else dir<=not up_down; end if; if dir='1' then tmp<=tmp + 1; else tmp<=tmp - 1; end if; end if; d<=tmp; sig<=tmp_sig; END PROCESS count; END counter_arch; |
| 2樓: | >>參與討論 |
| 作者: skycanny 于 2005/10/26 17:34:00 發(fā)布:
RE tmp 和tmp_sig在兩個(gè)不同的進(jìn)程里面賦值 屬于不可綜合代碼 |
|
| 3樓: | >>參與討論 |
| 作者: zxchit 于 2005/10/26 18:47:00 發(fā)布:
多謝skycanny 明天我改一下試試。我學(xué)習(xí)VHDL時(shí)間不長(zhǎng),多謝指教! |
|
| 免費(fèi)注冊(cè)為維庫(kù)電子開(kāi)發(fā)網(wǎng)會(huì)員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入 |
Copyright © 1998-2006 m.58mhw.cn 浙ICP證030469號(hào) |