|
使用軟體:MAX+plus 2, }3 c r" J" G# v* j+ q: _
5 f, t; T3 v C) `; g. |$ a錯誤訊息:warning Line 101:File c:\documents and setting\adminstrator\桌面\anew.vhd:8 h" |* @- @. K8 K
Fuond multiple assignmengs to the same singal or signal bit"cutting0"in a Process Statement-
; e1 a4 O$ D1 `/ G3 M+ U& ~only the lase assignment will take effect
& E: A. K6 H F0 H3 M" X程式說明:5 h3 z" T& D7 o3 ~! C& d
entity anew is
) s* v ^! Z& r2 U6 ]' z, ? port ($ r/ j- R0 G. ?4 _
clock:in std_logic;1 v* f+ b* ?) }$ ^$ t" [
enable:in std_logic;
) u' L) b% d( [ direction:in std_logic;
, i3 a/ p2 K5 w. W. |& l selection:in std_logic_vector(1 downto 0);0 O# M' s6 e4 U' e! l3 `/ v
cutting:out std_logic_vector(3 downto 0);& Z' q6 {/ T0 Z( `3 _
phase:out std_logic_vector(3 downto 0));! ^. m4 N% K* {
end anew;+ L: S$ E V5 L& b4 A
, J! P- n2 L# C5 v& o* J, ~5 U& `
architecture wena of anew is' E" N5 f) s7 K
begin 6 C- |- h& D- @8 X( }7 B
process(clock,enable,direction,selection)
& _, j f/ C- A6 b& J
" x7 K! Z% j: J variable countcut2:integer range 0 to 3;
9 f" ]0 @5 v* }+ m1 l" U variable countcut3:integer range 0 to 7;
' T( z3 D+ g2 ^" x6 m variable countcut4:integer range 0 to 15;7 R. g) \0 R: y
variable countphase:integer range 0 to 7;6 o( V5 o. Q5 R5 H* N: T1 b
cutting
. ^( l4 |" Z) \6 y宣告的四個variable均是對同一個輸出而設定
2 ]% P' p7 W: f# O如果 variable countcut1:integer range 0 to 3;則輸出到cutting(1 downto 0)
8 J, w, {( [2 f8 h6 U如果 variable countcut2:integer range 0 to 3;則輸出到cutting(2 downto 0)% i, P( {! T! o
如果 variable countcut3:integer range 0 to 3;則輸出到cutting(3 downto 0)
( k& \, [" y! t6 _ ~, T6 u2 r以上的指定是用 : case is when ...* |" q3 ]8 u" Y8 q8 V; r! Q4 t( P
但四種狀態是個別發生
! Q+ D6 P1 V& j# a( t0 F
0 _; `& ^, i- s7 e$ w: ?9 p- h6 I出現的訊息說不能重覆設定不然只以最後一個設定為準 ?2 _+ F1 f; S- s/ D& w
! \! o, g: H- X; K' a請問有什麼方法可以解決此問題嗎
# l& C' g8 m( A' a/ v1 l因為不想設定這麼多支接角(epm7032), d9 S4 K/ R" Y* ], o+ j/ D: X6 m0 I
也有試過將cutting:out std_logic_vector(3 downto 0);+ z% M! ?$ a J6 d1 u) r' J4 r
再分成用alias的子集合..但也不行) n1 t) E( U7 z% L; E
" T' |5 b9 Q5 D/ E麻煩前輩指導 |
|