[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: icarus, fork, and recursive tasks



On 11/06/2010 10:38 PM, John Griessen wrote:
On 11/06/2010 10:33 PM, DJ Delorie wrote:
  I want a set of N tasks to run in
parallel, and each of them need to call a common task Q, and end up
with N independent copies of Q running

If you need the number N to vary on the fly, it's still too procedural for me to figure
how to trick verilog into doing it.  If N is constant during your whole testbench run,
this is a cleaner seeming way than triggering things with a combo of perl and verilog:

Call the N tasks T. Make a wire and feed it from whatever triggers the start of the N tasks.
Put the task in
a module T[N-1:0].  Wire connects to module instances T[0].in, T[1].in, etc.
If I got you wrong here, fine, you can create T1
T2 . . .TN different tasks and not instantiate.

For the copies of Q, do use instantiation to wire them
up as in  wire between T1.out and Q[0].in

Q contains procedural code if you want, and each one
of them uses different inputs and outputs because of verilog wires you assign.  You would
need to use verilog module definitions to do this.

JG


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user