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.

TMS320F28P650DK: CLB Multiplexer functionality

Part Number: TMS320F28P650DK


Tool/software:

Hi all,

I am looking an implement some fault detection logic on the CLB to help offload the CPU and to obtain a quicker response to potential input faults in my system. Currently, I am wondering if there is a way that 16-1 multiplexer logic can be solely implemented on the CLB. I need to be able to select each of the lines and watch a separate input pin watching for a logic low input. When this occurs, I need to stop and store the value of the counter in the GPREG so I can trigger a fault on my device and find out what line faulted on the MUX. Ideally, I have a method of masking off certain fields of the MUX before it generates the NMI to CPU1. I think I understand how I can do most of this, but I do have some questions on a few things.

1. If / how I can perform the MUX select logic within the CLB. At first I was hoping I could route the individual bits of the counter out of the CLB or create some LUT function that could perform similar functionality.

2. How can I apply a hardcoded mask to filter out specific inputs on the MUX via the lookup table or the HLC. 

If there is a more proficient way to obtain this kind of logic without the CLB, I am open to this, too. I just need the majority of the logic to be independent of the CPU

Thank you

  • Hello,

    It may be easier to use the PWM X-BAR or CLB X-BAR and utilize the XBAR Flags registers to see which signals were enabled at the time of a trip / CLB event.

    Let me know if you have additional questions.

    Thank you,

    Luke

  • Hi Luke,

    Thanks for the reply. I can definitely have an edge transition on the input of my MUX trigger an EPWM trip his but I am wondering if there was a way that doesn't require CPU intervention to control and increment the select lines of a multiplexer? I turned directly to the CLB as this seems like simple digital logic to perform.

    Thanks

  • Hi Ayden,

    You could certainly implement a 4 input mux with 2 select lines using CLB. You could use multiple CLBs to cascade 4 of these muxes into a 16 by 1 mux. However I'm not sure the following behavior is possible with CLB:

    "I need to stop and store the value of the counter in the GPREG so I can trigger a fault on my device and find out what line faulted on the MUX".

    Also this sounds more like a set of latches than a mux. A mux would only be selecting one input at a time whereas it seems like this behavior is involves triggering different types of behavior depending on which input was set(this might be achievable with CLB depending on exactly what you're trying to do).

    Thank you,

    Luke