|
使用軟體:MAX+plus 26 T2 X5 `4 k# ]/ S) [/ v/ q2 H
& o5 {9 h7 D6 ^, A7 q" Y, ~( m錯誤訊息:warning Line 101:File c:\documents and setting\adminstrator\桌面\anew.vhd:
5 }, f* U! d& z7 ~Fuond multiple assignmengs to the same singal or signal bit"cutting0"in a Process Statement-
* Z$ X& U' C+ N3 konly the lase assignment will take effect* c5 R* g, e; K/ q; L
程式說明:, g3 J4 n# `' F2 z+ J
entity anew is
* T8 L7 E2 k$ M% r port (
7 Z" S C$ }, x0 k4 ` clock:in std_logic;/ q& [' u5 ^: | _6 _+ n3 w
enable:in std_logic;( w! C9 a4 B) a: v- g: M9 _
direction:in std_logic;
6 Y8 j, ^2 c/ @4 Z selection:in std_logic_vector(1 downto 0);
' V( Y: V* R3 }9 Z7 L cutting:out std_logic_vector(3 downto 0);; m# d+ q$ s. I/ f
phase:out std_logic_vector(3 downto 0));5 P$ J8 p* f/ I( z
end anew;
! H7 h2 }& v6 `3 B4 \; n4 Q _3 ` U6 i4 n8 r5 {: X
architecture wena of anew is
J% B; x- n; O5 [2 `/ _9 ybegin
1 r V& A: L9 t1 v8 Y process(clock,enable,direction,selection) y" ^. g7 }% y3 L6 E" b/ R( S8 T
0 d8 J9 K6 g7 G' Z/ A& h/ V$ V. U7 g
variable countcut2:integer range 0 to 3;
4 c* n6 M+ J9 w/ L) } q3 H variable countcut3:integer range 0 to 7;
8 c' u8 V, W' y. L$ { variable countcut4:integer range 0 to 15;
/ C7 f& S: ~; N" {: |0 r variable countphase:integer range 0 to 7;
+ E( j. \! s( R1 @* F' F cutting
8 ?1 r0 p6 K1 p- G宣告的四個variable均是對同一個輸出而設定
1 `% M0 ]% n8 _: B5 K7 L) [如果 variable countcut1:integer range 0 to 3;則輸出到cutting(1 downto 0)
# K Y! @ J' G如果 variable countcut2:integer range 0 to 3;則輸出到cutting(2 downto 0)
# a4 x: z/ L+ ]3 s5 n0 e. R) L% e如果 variable countcut3:integer range 0 to 3;則輸出到cutting(3 downto 0)
- e) k( d$ L7 t- T以上的指定是用 : case is when ...
7 g* P( }2 x; [- t但四種狀態是個別發生3 h ^+ |& ~( P. x. S1 C) G
) s8 s4 N: N, a出現的訊息說不能重覆設定不然只以最後一個設定為準
+ F* ~% U: g! W3 b h$ Q7 p* G
+ z# F; [0 y) s' w. E請問有什麼方法可以解決此問題嗎
f# a( v: _, Z8 N3 _$ P ?/ D" V$ ~因為不想設定這麼多支接角(epm7032)- o- w4 {! b# v- q
也有試過將cutting:out std_logic_vector(3 downto 0);, {2 g- c7 ]! x9 b" C0 c
再分成用alias的子集合..但也不行
/ |: Z7 `! g6 d3 q3 s1 m$ z, P: Z1 v
麻煩前輩指導 |
|