Unable to pack the design into 4 UDBs - Control file doesn't help

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
AnEy_1336741
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

My project doesn't fit into the UDBs. The workaround with the control file doesn't work as mentioned. Any idea?

   

The placer is not able to place all of the carry chains without backtracking. It fills one UDB bank to 15/16 and the other to 7/8 and cannot place the final 2-datapath chain. As a workaround, add a control file to the TopDesign component (in Workspace Explorer's Components tab) with the following lines: ATTRIBUTE placement_force OF \Timer_ADPActiveTime:TimerUDB:sT16:timerdp:u0\ : LABEL IS "U(2,0)"; ATTRIBUTE placement_force OF \Timer_OutputPeriod:TimerUDB:sT24:timerdp:u0\ : LABEL IS "U(3,1)"; ATTRIBUTE placement_force OF \Timer_OutputActiveTime:TimerUDB:sT24:timerdp:u0\ : LABEL IS "U(0,1)"; This will fill the datapaths in the second UDB bank and allow the placer to assign the remaining datapaths.

0 Likes
17 Replies
bharadhwajas_91
Employee
Employee
First like received First like given

Hi EyA,

   

Where you able to resolve this ?Seems to me like the issue is because of too many P-terms ,tried removing few pterms (Mux logic)it was able to place and route successfuly ,If you still see this issue, please create a technical support case .Cypress.com-->Support-->Technicalsupport.

0 Likes

Hi!

   

Thanks for the feedback. I didn't try to go on in that direction but changed to a different approach. What bothered me is the message of Creator. It didn't point in the right direction. Maybe, optimization is possible.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

In PSOC Creator 3.3 there is a tab upper right of screen thats shows resources

   

used and remaining. To keep track of where you stand.

   

 

   

Regards, Dana.

0 Likes
lock attach
Attachments are accessible only for community members.
DaBa_1448511
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Hi,

   

I now have this "Unable to pack the design into 4 UDBs" problem. I had started with my working UART implementation and added CapSense components, per the CapSense demo. Before adding any of the code, I tried to build, to see if I had broken it (yet). Archive attached. Thanks in advance.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Dave!

   

So use SCB based UART and two TCPWMs configured as PWM. This will use no UDBs at all.

   

Preserve UDBs as long as possible, they are very valuable!

   

 

   

Bob

0 Likes
DaBa_1448511
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Cool! Thanks Bob. BTW - What's that in your cat's mouth? 🙂

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Answer: a mouse  😉

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
DaBa_1448511
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Hi Bob,

   

So as a baby-steps approach, I went back to my working UART project and added an SCB UART. I must be missing something obvious. I can step through the code fine, and have had it connected to external hardware. It's as if the pins are not connected to the UART. Bytes sent don't seem to actually hit the tx pin, and the rx pin doesn't seem to see the traffic I've presented to it either.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Baby step aproaches do not use interrupts, change your design to interrupt driven at a later stage.

   

Besides: you are using the same interrupt handler for both your UARTs. That might not work, because the interrupt clearing is different for an SCB based UART.

   

The component itself already handles a circular buffer, so set the Rx buffer size to 40 as the Tx buffer and remove the interrupt handling.

   

Use UART_SCB_1_SpiUartGetRxBufferSize() to determine whether there are bytes, retrieve them with UART_SCB_1_SpiuartReadRxData(). That long names are not my fault.

   

Is there a special reason why you are providing your UARTs with your own clock and not using the internal clock?

   

And last: Which board are you using? CY8CKIT_0???

   

 

   

Bob

0 Likes
DaBa_1448511
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Thanks Bob,

   

I'm using the CY8CKIT_042. I'm using an external clock in order to generate the 31.25Kbaud for MIDI. I had adapted this from an example project, maybe there's a better way? You're right, non-interrupt would be a better baby step. Just so I understand what you mean about the same interrupt handler -- are CY_ISR_PROTO(SCB_1_RxInt); and CY_ISR(SCB_1_RxInt);  somehow connected to CY_ISR_PROTO(MyRxInt); and CY_ISR(MyRxInt)? (I had copied the structure of your original design, but my understanding of it could well be way off).

   

I'll take another swing without interrupt. Thanks for all your help.

   

-Dave

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

    Rx_Int_StartEx(MyRxInt);//start Rx interrupt
    Rx_Int_StartEx(SCB_1_RxInt);//start SCB Rx interrupt

   

This addresses the same isr component.

   

Under that premises your clock selection is correct. When you want a more professional look, rename the clock so the name indicate what it is good for, ie MIDIClock.

   

 

   

Happy coding

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Bob,

   

So I built a new project from the template provided, with Capsense, PWM and an SCB UART without interrupt. As with my original interrupt based one, I don't seem to be getting to the pins of the device. The thing should be sending a byte out Tx every time it loops, but nada. Using the debugger, it does execute the UART_UartPutChar(0xF9) line. Just in case, I tried it using internal clock, looping Tx to Rx, but there still didn't seem to be any true hardware activity. Your guidance would be much appreciated.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

@1-281 or Dave:

   

In your project the wire from clock to UART is not connected correctly.

   

Increase the Tx buffer to 40

   

Set the heap size to 0x0200

   

Set "Use newlib nano float formatting" in project build settings -> linker

   

Dont            while(UART_GetRxInterruptSource() & UART_INTR_RX_NOT_EMPTY_POS) will conflict with internal interrupt

   

Do              while(!UART_GetRxBufferSize()) // check for byte ready, returns number of bytes in Rx buffer

   

 

   

Principally you do not need to use your own circular buffer, the UART component when set to internal interrupts will maintain that for you already.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Bob,

   

So I had some conflict with your suggestion on using UART_GetRxBufferSize(). This function only seems to exist in the API as UART_SpiUartGetRxBufferSize and only appears in the API documentation as part of the API for SPI mode. I've assumed that the developers decided to combine the two as one function for both modes(?). If so, I think they forgot to document it (or hopefully I'm way off track). So I updated my code per your advice, using that as the GetBufferSize function. Tools are all happy, but still that UART is neither Tx'ing or Rx'ing. The clock connection, I guess had gotten broken when I tried the internal clock mode and then went back (it was the last thing I did before sending you the file). Unless I'm doing something wrong with the wire tool, it should be intact now. Thanks in advance.

   

-Dave

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you now put a UART_Start() into your code all will be good.

   

Separating the initialization part from main() into a function like "InitializeSystem()" makes it easier to keep track of initializing components, sensors and performing self-tests.

   

 

   

Bob

0 Likes
DaBa_1448511
Level 3
Level 3
25 replies posted 10 replies posted 5 replies posted

Oh man... Thanks for your patience! It IS working!

   

-Dave

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Phew! Wiping the sweat from my brow!

   

 

   

Bob

0 Likes