|
使用軟體:MAX+plus 2
8 O% }* t" B1 t z: a x4 y3 T/ e/ D9 m' C
錯誤訊息:warning Line 101:File c:\documents and setting\adminstrator\桌面\anew.vhd:
* Z8 t k4 F M3 M- [4 g6 Y; _Fuond multiple assignmengs to the same singal or signal bit"cutting0"in a Process Statement-
& b" x) \: U3 d. M" N5 eonly the lase assignment will take effect
/ O* n o0 X2 s% L7 H3 u程式說明:
" }, F3 x. D w+ a! Aentity anew is# K( b4 x8 N6 O! Z$ k3 D: }! d6 k- G
port (
/ F9 x; Z7 e* ]. w- |* a/ s clock:in std_logic;
$ j2 S3 T7 b* g+ q( M4 c8 `, i enable:in std_logic;4 }& x* |0 x. \: N B. Z" k
direction:in std_logic;
, D$ Z) T& A* P, [ selection:in std_logic_vector(1 downto 0);
) @2 D2 l0 R, i, H9 L cutting:out std_logic_vector(3 downto 0);
) t& J, ]# f' _; b+ ]; ~/ e phase:out std_logic_vector(3 downto 0));: _% f9 l8 v5 n% k1 K/ V4 ^$ u
end anew;
9 v! O3 ?$ a8 q9 k; _2 L `+ K# O) p% E
architecture wena of anew is
& j7 c j$ t0 N3 V! O; s8 ybegin
' e) L& O5 o5 u5 w9 h% U process(clock,enable,direction,selection)0 V$ c3 ~0 r9 z- F4 a
$ i& e* d/ ]% }* P9 x variable countcut2:integer range 0 to 3;
0 t F) h# c- s/ y( i variable countcut3:integer range 0 to 7;1 z/ f- O0 W8 X \
variable countcut4:integer range 0 to 15;% h6 `* _3 ~" I
variable countphase:integer range 0 to 7;
0 h: L; F* s0 X cutting6 r2 o2 o" D/ @8 _4 E
宣告的四個variable均是對同一個輸出而設定
* T: j" t5 i( L& ?! C6 l如果 variable countcut1:integer range 0 to 3;則輸出到cutting(1 downto 0)7 W4 z2 {# Y- w
如果 variable countcut2:integer range 0 to 3;則輸出到cutting(2 downto 0)
1 m) ^2 h- g: |* _如果 variable countcut3:integer range 0 to 3;則輸出到cutting(3 downto 0)3 {; p1 X3 `! s3 Z/ C
以上的指定是用 : case is when ...
4 L/ ~7 F$ {# P但四種狀態是個別發生5 G8 [% j0 j2 o3 X9 V
9 V) Z% N; _0 v" r, W4 G. g
出現的訊息說不能重覆設定不然只以最後一個設定為準. `& U: j$ Q B) C
8 `9 L/ q: q- R$ s1 X! ^8 B
請問有什麼方法可以解決此問題嗎
7 h, G& f' q2 O5 C. B( T因為不想設定這麼多支接角(epm7032)
( ]& H. }$ }, ]( l( m% A/ ?% i也有試過將cutting:out std_logic_vector(3 downto 0);
# ^9 u2 h; ^# Q! r7 n3 k再分成用alias的子集合..但也不行; }: |! ]2 }% h7 r/ y
9 o% H8 I; q& D" \" Y7 i
麻煩前輩指導 |
|