|
使用軟體:MAX+plus 2
- M( V8 h: m* Z+ S, K; J! t( V) G5 o0 g! \& Z8 f, ~6 g/ I
錯誤訊息:warning Line 101:File c:\documents and setting\adminstrator\桌面\anew.vhd:
4 C2 g; R4 I0 a! mFuond multiple assignmengs to the same singal or signal bit"cutting0"in a Process Statement-
4 a; A/ H: ]7 q S9 Q) U' Monly the lase assignment will take effect5 E4 x7 l7 N) T3 ^( G
程式說明:
$ E2 I! }; T3 S7 p! K' a7 D+ eentity anew is8 i0 a- V: L' Y% {
port (9 l( j/ S y# i3 Z; z$ }0 ~% p
clock:in std_logic;
6 i% O1 y4 E A$ L6 d- r! Z enable:in std_logic;
5 ~ ^& S8 G# a( V+ \' l& ]3 Q( | direction:in std_logic;
) `: c, j, l$ H3 L" A selection:in std_logic_vector(1 downto 0);
1 l1 R% H6 r: Z8 @ cutting:out std_logic_vector(3 downto 0);
9 c6 J1 w9 G$ @5 n* S phase:out std_logic_vector(3 downto 0));
1 h7 o7 G* Z3 B& wend anew;
) R9 _7 _6 E! M) D( ~/ d% z/ L" h2 W" M# G% Q! |4 Q
architecture wena of anew is
0 @0 o* w: C0 L" ~# Dbegin
/ B$ C0 ~9 F+ V. K, p process(clock,enable,direction,selection)
$ z# I) e5 N+ j1 h, F& S/ h 7 s! V' f A& N2 o3 ~& I
variable countcut2:integer range 0 to 3;
" j1 |" q. G0 Q5 }2 ` variable countcut3:integer range 0 to 7;
" m% Q% i# p, n variable countcut4:integer range 0 to 15;
% D+ i) B+ L9 w) n e variable countphase:integer range 0 to 7;
2 Y B3 u1 a3 g# @% \. I cutting
/ n+ W) }9 K& T I宣告的四個variable均是對同一個輸出而設定( i+ |; s. d, g
如果 variable countcut1:integer range 0 to 3;則輸出到cutting(1 downto 0). n+ {% o4 p+ Y$ K. J
如果 variable countcut2:integer range 0 to 3;則輸出到cutting(2 downto 0)
; v3 f. F' |/ t' G% b8 w如果 variable countcut3:integer range 0 to 3;則輸出到cutting(3 downto 0)
5 p* {8 {6 _1 ]# ^5 ?2 E以上的指定是用 : case is when ...
: m) Y1 E' a3 J但四種狀態是個別發生& \! W" C7 ^3 W, X; o) M, R4 [
/ r8 F% t U& ^0 J( x& E
出現的訊息說不能重覆設定不然只以最後一個設定為準$ B+ T$ Q) w& W" b% P0 |9 \2 ]
# S* |. D! i/ P; n+ n: V4 e
請問有什麼方法可以解決此問題嗎
5 Y+ n/ d* L& \+ o4 ~" A因為不想設定這麼多支接角(epm7032)
! i8 o4 t4 x( ^也有試過將cutting:out std_logic_vector(3 downto 0);
0 z& q" G2 U" y& }2 R# I2 R8 T. v再分成用alias的子集合..但也不行0 k8 V/ ^% ?6 z' P( C3 U
* {/ t. r) U N/ u6 b4 E麻煩前輩指導 |
|