Jump to content


How to set the hardware config


  • You cannot reply to this topic
3 replies to this topic

#1 ekinzhou

    Member

  • Members
  • PipPip
  • 12 posts

Posted 25 September 2008 - 07:29 AM

Attached File  2.jpg (11.17K)
Number of downloads: 7Attached File  1.jpg (11.39K)
Number of downloads: 9

For picture 1, it is the example which give me.

The proccess config is below:

producer_process = co_process_create("Producer", (co_function)Producer,3,in_A, in_B, in_C);

Do0 = co_process_create("Do0", (co_function)Do,3,in_A,out_A,0);

Do1 = co_process_create("Do1", (co_function)Do,3,in_B,out_B,1);

Do2 = co_process_create("Do2", (co_function)Do,3,in_C,out_C,2);

consumer_process = co_process_create("Consumer",(co_function)Consumer,3,out_A, out_B, out_C);

co_process_config(Do0, co_loc, "pe0");
co_process_config(Do1, co_loc, "pe0");
co_process_config(Do2, co_loc, "pe0");

1. For this answer, I have one question. Why we can use Do0 Do1 Do2 as parts of Do, because they have the same function? Not the same, can I use it?

2. My design is the second one, how can I set it? Input 1,2,3,4 and output, and 2 intermediate stream, these 7 streams, how can I config them? Could you show me the result as the same format as above?

PS: the 3 hardware process are not the same.

3. Do0 = co_process_create("Do0", (co_function)Do,3,in_A,out_A,0);

Do1 = co_process_create("Do1", (co_function)Do,3,in_B,out_B,1);

Do2 = co_process_create("Do2", (co_function)Do,3,in_C,out_C,2);
what does the 3rd argument(0,1 or 2)mean?

#2 etrexel

    Advanced Member

  • Impulse Staff
  • PipPipPip
  • 260 posts

Posted 25 September 2008 - 08:32 PM

Hi,

QUOTE (ekinzhou @ Sep 25 2008, 09:29 AM) <{POST_SNAPBACK}>
1. For this answer, I have one question. Why we can use Do0 Do1 Do2 as parts of Do, because they have the same function? Not the same, can I use it?

Each co_process_create() creates an independent instance of the process referenced - regardless of whether it is unique or the same as another process already created.

QUOTE
2. My design is the second one, how can I set it? Input 1,2,3,4 and output, and 2 intermediate stream, these 7 streams, how can I config them? Could you show me the result as the same format as above?

PS: the 3 hardware process are not the same.

3. Do0 = co_process_create("Do0", (co_function)Do,3,in_A,out_A,0);

Do1 = co_process_create("Do1", (co_function)Do,3,in_B,out_B,1);

Do2 = co_process_create("Do2", (co_function)Do,3,in_C,out_C,2);
Sorry, I can not write your code to give you ALL the answers, besides you are most of the way there. Just remember:
1: Each co_stream, co_signal, etc. are physical "connections" between processes and must be created using their associated co_*_create() function.
2: Each connection must be passed as a parameter to each process just like a function in order to access it.
3: Each process is a physical block that must be created and its connections are set at the same time when creating the process with co_process_create()

QUOTE
what does the 3rd argument(0,1 or 2)mean?

Refer to the Impulse C user guide for the parameters for co_process_create() and then look at the parameters of Do() and you will see.

Ed
Ed Trexel
Impulse Accelerated Technologies, Inc.

#3 ekinzhou

    Member

  • Members
  • PipPip
  • 12 posts

Posted 25 September 2008 - 11:04 PM

Thanks for your reply, but it is not what I want to get to know.

All your reply, I have already known. Maybe, my question is not clear.

I just want to know, if I follow my design, there will be one "Do" hardware process, but the example shows Do_1 Do_2 Do_3, there are 3 parts of "Do", why can we use it? because Do_1 Do_2 Do_3 are the same function? Or different function for example, Do_1 is or plus, Do_2 for div Do_3 for multiple, I also can use these 3 functions?

Thanks.

#4 etrexel

    Advanced Member

  • Impulse Staff
  • PipPipPip
  • 260 posts

Posted 26 September 2008 - 08:24 AM

QUOTE (ekinzhou @ Sep 26 2008, 01:04 AM) <{POST_SNAPBACK}>
Thanks for your reply, but it is not what I want to get to know.

All your reply, I have already known. Maybe, my question is not clear.

I just want to know, if I follow my design, there will be one "Do" hardware process, but the example shows Do_1 Do_2 Do_3, there are 3 parts of "Do", why can we use it? because Do_1 Do_2 Do_3 are the same function? Or different function for example, Do_1 is or plus, Do_2 for div Do_3 for multiple, I also can use these 3 functions?

Thanks.

Hi,
If I understand the question correctly, you can have as many hardware processes as you need in your design each being unique containing different code (Do_1,Do_2,etc.) or a repeat of the same process (Do, Do, ...) - it is all about how you create the processes and connect them. The only thing to note is that the string <name> given to co_process_create("<name>",...) is the logical name for that process instance and must be unique across ALL calls to co_process_create(). In the example, "Do<x>" was just using <x> to indicate the instance number for the process Do() because they are all the same.

Ed
Ed Trexel
Impulse Accelerated Technologies, Inc.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users