|
使用軟體:MAX+plus 2
, }6 F1 c0 j! W8 |2 @* y- I, d3 m9 G% y% i
錯誤訊息:warning Line 101:File c:\documents and setting\adminstrator\桌面\anew.vhd:
, e3 s% c4 Q" z5 A5 M4 P3 R& QFuond multiple assignmengs to the same singal or signal bit"cutting0"in a Process Statement-
. m5 W2 a5 ?% @ _- Monly the lase assignment will take effect2 F7 J& {" Q+ F
程式說明:) Y, Q% u. K3 k- o$ u; B
entity anew is
+ X i8 _- y) w- i% c1 w port (
- }2 H7 K( |: U. d9 s- G7 g) |! C& b clock:in std_logic;
, c6 x: n) e* o1 K7 \; L; U enable:in std_logic;# M9 k# ]. ?4 D. R
direction:in std_logic;/ c0 V& R- R( \. K. I Q/ h# ~
selection:in std_logic_vector(1 downto 0);
1 F9 h/ |& o4 L0 Q9 D! w cutting:out std_logic_vector(3 downto 0);
4 P- {$ y# v! x# e0 N phase:out std_logic_vector(3 downto 0));
2 P/ D( y% L+ r+ w' k. ^" {end anew;
3 o# C! ] o( u( q. l# A( B; X, L( N- l Y1 Q
architecture wena of anew is& R5 C2 Y# t& j% y9 ~! `
begin " S# a/ V6 { S' n7 U# a
process(clock,enable,direction,selection)5 A1 R8 O5 K) F6 T" A7 |
( Z# ^5 l( N5 e variable countcut2:integer range 0 to 3;' M" q3 }) d" |" G, H
variable countcut3:integer range 0 to 7;
5 ^ ^3 z+ x( y; W X variable countcut4:integer range 0 to 15;+ B8 l/ {3 \0 h1 i$ a" X; V1 L
variable countphase:integer range 0 to 7;0 }: g$ R4 C9 {6 O7 {9 j$ S
cutting8 m6 T0 n2 Q: n; a/ k5 E) q
宣告的四個variable均是對同一個輸出而設定
e$ x+ v% z# i如果 variable countcut1:integer range 0 to 3;則輸出到cutting(1 downto 0)3 F1 T# h; t/ o) ~, P
如果 variable countcut2:integer range 0 to 3;則輸出到cutting(2 downto 0)$ d( M8 S6 W9 r1 I/ J I/ l9 W
如果 variable countcut3:integer range 0 to 3;則輸出到cutting(3 downto 0): q3 s8 }# f9 Q5 a5 L( `# b
以上的指定是用 : case is when ...
. Y4 C7 r: v j1 p/ _% C! V* c但四種狀態是個別發生
7 `+ F& D; {/ J" m( P, I N; y1 @7 p ?( ?! D
出現的訊息說不能重覆設定不然只以最後一個設定為準; ?& j" e3 ~' b8 J# V
. x- @ P$ G7 I* o請問有什麼方法可以解決此問題嗎2 ~2 X3 d/ b) j& _ D
因為不想設定這麼多支接角(epm7032)( j" D) b+ q |- V
也有試過將cutting:out std_logic_vector(3 downto 0);
2 a( g U0 }0 h再分成用alias的子集合..但也不行( R1 h* J6 J8 \% h
, ~6 h2 J; a7 \6 `, K
麻煩前輩指導 |
|