L
lei
Guest
Hi all:
When writing a module, an output port will be driven according to
some condition (in "if" or "case" statement). Suppose I have 32 port
to be driven. So I can't declare these port as "wire", only a "reg"
type would work? From synthesis point of view, what's the difference
between "reg" and "wire"? Does "reg" actually use a flip-flop and
"wire" doesn't ?
Is there any general guide line on when I should use "wire" and
when I should use "reg"? Besides the obvious restriction that "wire"
can't appear in procedure statement. After reviewing my module, I
found out that since i HAVE to use "if" and "case" , etc. So in what
cases that the "wire" type make more sense then "reg"?
Thanks
lei
When writing a module, an output port will be driven according to
some condition (in "if" or "case" statement). Suppose I have 32 port
to be driven. So I can't declare these port as "wire", only a "reg"
type would work? From synthesis point of view, what's the difference
between "reg" and "wire"? Does "reg" actually use a flip-flop and
"wire" doesn't ?
Is there any general guide line on when I should use "wire" and
when I should use "reg"? Besides the obvious restriction that "wire"
can't appear in procedure statement. After reviewing my module, I
found out that since i HAVE to use "if" and "case" , etc. So in what
cases that the "wire" type make more sense then "reg"?
Thanks
lei