" z w' S9 L4 V3 \+ ]output [7:0] qout;/ K0 A; M1 f* s( r
output [7:0] mout; 0 p( n. Y6 `" K2 I' K s* iinput [7:0] indata; : d% K, D- m* M. ? L3 preg [7:0] qout; 9 J; L. B1 f3 z# v5 _reg [7:0] mout;4 s7 m; f$ s( ]1 X2 S
parameter left=1;2 ^5 s$ | c1 T; R' j0 Z. n
parameter right=0;7 ^5 N& R8 j4 e
6 C# h( J, E: R
always@(indata) begin8 E2 L( @5 A6 l
( j- D# J L: g2 `2 pmultdiv8 (left,indata,qout);* @& x3 ?: e. `" q$ X! g) W
multdiv8 (right,indata,mout); 2 U( S. s- N! G6 J% \0 l7 m ' y& o; R( J. m( J: K+ u5 C) dend: L; K- U8 r" ^' w6 G3 J
" d* P/ p. J: t, I/ x" w* wtask multdiv8;* E$ K9 J* S0 y
$ c, ?0 s% n, {2 l+ d# M% g: f
input fcn_left; & `+ M- k6 B" ]( Tinput [7:0] fcn_in;" {4 ]0 ?# f p
output [7:0] qout;" W) f' n4 O4 o a$ n4 L+ ~
output [7:0] mout;) _: b/ [1 h7 D8 t6 s% E5 O
9 ~. x; { G- t0 z8 N( a8 B' i5 y- N* v4 _, c
if (fcn_left==1)- }4 @! u$ g X0 |
qout=fcn_in<<3; 7 R7 Y( Y$ c# w: ?1 a8 zelse, J4 L: C& I' X2 W, i) ~
mout=fcn_in>>3;" d( M% U" @' I1 H
) m6 L" x- x% k! Qendtask 3 c0 g6 U/ h' s ]$ h+ l' C& ~endmodule作者: chienw 時間: 2010-12-29 01:19 PM
you did not specify qout when you called the task, which is the error message tries to tell you.作者: laasong 時間: 2010-12-29 04:34 PM
我知道我問題所在了 task的port和宣告的port不一致! `3 m* L# o- G
; S5 Z& J' Z% S# |! Y8 H% A
要在task後面多打qout and mout 這樣就OK了