Other Parts Discussed in Thread: C2000WARE
Hello!
I'm working with CLBs ans I want to know if it's possible to transfer a counter value to the counter of another tile or not?
thanking you in advance!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello!
I'm working with CLBs ans I want to know if it's possible to transfer a counter value to the counter of another tile or not?
thanking you in advance!
Yes, that's exactly what I want to do.
I know that there is a delay when signals are passed from tile to tile but it does not matter to me.
Okay, in that case, the only way to do it is triggering the HLC, reading the CounterX value, and through the FIFO, passing the value to the C28x. Then using C28x to push to the FIFO of another CLB HLC.
If you just want to send a signal, such as COUNTER=REF_x, that's a different story, you can send that signal across different CLBs, but that is a 1 bit signal.
For 32 bits transfer, you have to use COUNTER CLBx->HLC->FIFO->C28x->FIFO->HLC->COUNTER CLBy
I tried to do it by following your solution but I only get a 0 value in the counter that is supposed to receive the value. here is what i did:
-Here is the HLC of my first Tile


-Here is the HLC of my second Tile

I checked the FIFO of my 2nd tile and C0 of my 2nd tile but there is nothing in both of them.
Whats the value of your counter when your HLC is triggered? have you review the HLC FIFO example in C2000Ware?
I want to trigger the value 56 but it doesn't work for any values. I just noticed something. I configured my 2nd tile with the CLB tool but there is nothing related with the 2nd tile in my source file:

Here are some functions that activate and initialize the 1st tile, but there is absolutely no function for the 2nd tile in my source file (CL2_BASE is never called).
I think it could be related to my problem but I don't understand why the source file is not updated knowing that I have declared and correctly configured my 2nd tile in CLB Tool...
You need to call CLB_enableCLB(CLB2_BASE) and initTILE2(CLB2_BASE); in your code.
It finally works after enabling CLB2, I can send my value from a tile to another. Thank you!
By the way, I also wanted to know if it is possible to compare a counter value? I want a signal to be high if my counter value is less than 20 for exemple, or greater. And the match_val signal is high only if its value matches my counter value, but not if the value is greater for exemple.
To latch the match_val you can use an FSM and design the logic yourself. The hardware does not have the support inside the COUNTER module.