|
使用軟體:MAX+plus 2 B# j* E( v# J9 w
+ n, j$ w, R1 @
錯誤訊息:warning Line 101:File c:\documents and setting\adminstrator\桌面\anew.vhd:
) m( Q+ ?4 C5 y$ |: F1 j* ?Fuond multiple assignmengs to the same singal or signal bit"cutting0"in a Process Statement-
0 s* @3 e' I, ~9 B5 y; konly the lase assignment will take effect% N7 {% ^# }! \8 p' X9 @
程式說明:
@% e# z( h5 \# |; K o* Gentity anew is
* r1 j2 L8 |$ H! n' J* l port (( y3 T2 h0 K; D" L/ r( o6 L5 X
clock:in std_logic;+ w+ N: G2 t/ @/ o6 V
enable:in std_logic;( a+ A( y% N% Z5 |' }4 W
direction:in std_logic;% [, k0 N4 ]5 j1 g8 [/ t. j
selection:in std_logic_vector(1 downto 0);
7 S8 A' i/ B( Q/ j( @ cutting:out std_logic_vector(3 downto 0);8 b0 a+ ~, s' v( N# K
phase:out std_logic_vector(3 downto 0));, \1 g. ]. ?/ v8 _/ z
end anew;6 `' A4 q/ Z% v' y& N
0 X3 p7 K' ]; i6 q% G
architecture wena of anew is
" x; o6 X3 k5 D+ x1 c7 O* [2 ibegin - G, S# c0 j) K5 C/ b, ?- j8 b
process(clock,enable,direction,selection)" [0 z) q* r* M. E
9 z% L9 C2 ` w9 z4 ?
variable countcut2:integer range 0 to 3;
3 S7 H0 y, T4 B" ]. w- v variable countcut3:integer range 0 to 7;! n, q# K0 S& ~
variable countcut4:integer range 0 to 15;$ e. \0 Y6 @" Q4 c
variable countphase:integer range 0 to 7;
+ S& [# Q1 Y6 Q! c. x cutting) J2 M; ^( k5 N3 V& x
宣告的四個variable均是對同一個輸出而設定
0 b# n% t O4 Y' y& ?) x# @' ?如果 variable countcut1:integer range 0 to 3;則輸出到cutting(1 downto 0). O5 o: m: q4 G) p5 I; |
如果 variable countcut2:integer range 0 to 3;則輸出到cutting(2 downto 0), E; E7 C& O* G- `9 J) D) j( n
如果 variable countcut3:integer range 0 to 3;則輸出到cutting(3 downto 0)
2 u2 w/ E8 i6 h/ d! D7 ~以上的指定是用 : case is when ...
- P7 _' B- F% q0 Q6 I1 r但四種狀態是個別發生
( K# I# y/ J1 Q4 v5 r3 F' w" U% c
/ h. _6 W; `4 E( `$ L出現的訊息說不能重覆設定不然只以最後一個設定為準
2 ]9 Z8 T4 ^2 J/ g! a' F# P
6 }8 U$ e& V; Z, m$ }! V. V) R: m9 X8 d請問有什麼方法可以解決此問題嗎3 r% s5 W) n' \; H# |, [/ j! U
因為不想設定這麼多支接角(epm7032)( e0 P/ f( b- \) R1 U1 d
也有試過將cutting:out std_logic_vector(3 downto 0);
7 ~! j5 M& z9 C$ s* p" z7 j再分成用alias的子集合..但也不行
; P& o3 z: @) @- G9 d
, k+ m+ Y. v: E, B2 [) r$ t麻煩前輩指導 |
|