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.

TMS320F28388D: TMS320F28388D: Designing CLB, TILE to read 2 BISSC encoders with F28388D

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Dear team:

          I transplanted the bissc project  from 28379D to 28388D,and it works well at GPIO6,GPIO7(EPWM4).  I can change the TILE4 to TILE1,TILE2,TILE3,so that the BISSC_CLK can be output on EPWM1,EPWM2,EPWM3. It corresponds to four TILEs of 28379D.

           but 28388D has 8 TILEs.   TILE5,TILE6,TILE7,TILE8 should corresponds to EPWM5,EPWM6,EPWM7,EPWM8. When I want to output BISSC_CLK with EPWM6 ,I found that I couldn't route the output4 and output5 of TILE6 to the boundary of TILE3 ,what should i do ?

Thanks in advance

QiangLiu

  • The options you see there are only for simulation. CLB TILE1 to TILE4 are all connectable to each other. TILE 5-8 are connectable to each other through the GLOBAL mux. The selections you make in BOUNDARY IN is just for the simulation.

  • But you are right. I will expand the simulation to show TILE5 to 8 in the simulation.

  • Here can you update the file in C2000Ware/utilities/clb_tool/clb_syscfg/source/.meta

    with the file attahced:

    BOUNDARY.syscfg.js
    "use strict";
    /*global exports, system*/
    
    let Common   = system.getScript("/utilities/clb_tool/clb_syscfg/source/Common.js");
    let logError = Common.logError;
    
    /* Intro splash on GUI */
    let longDescription = "Provide simulation input functions for the 8 inputs to a CLB Tile";
    
    function inputCfg(idx) {
        let config = 
        [
            {
                name    : 'in'+idx,
                default : 'None',
    
                onChange: function(inst,ui) {
                    ui['in_sync'+idx].hidden   = ((inst['in'+idx] != 'Custom') && (inst['in'+idx] != 'squareWave'));
                    ui['in_edge'+idx].hidden   = ((inst['in'+idx] != 'Custom') && (inst['in'+idx] != 'squareWave'));
                    ui['in_custom'+idx].hidden = (inst['in'+idx] != 'Custom');
                    ui['in_period'+idx].hidden = (inst['in'+idx] != 'squareWave');
                    ui['in_duty'+idx  ].hidden = (inst['in'+idx] != 'squareWave');
    				ui['in_repeat_count'+idx  ].hidden = (inst['in'+idx] != 'squareWave');
            },
    
            options : 
                [
                    { name: 'None'       },
                    { name: 'squareWave' },
    //                { name: 'Custom'     },
    				{ name: '0'     },
    				{ name: '1'     },
                    { name: 'TILE1_BOUNDARY.out0' },
                    { name: 'TILE1_BOUNDARY.out1' },
                    { name: 'TILE1_BOUNDARY.out2' },
                    { name: 'TILE1_BOUNDARY.out3' },
                    { name: 'TILE1_BOUNDARY.out4' },
                    { name: 'TILE1_BOUNDARY.out5' },
                    { name: 'TILE1_BOUNDARY.out6' },
                    { name: 'TILE1_BOUNDARY.out7' },
                    { name: 'TILE2_BOUNDARY.out0' },
                    { name: 'TILE2_BOUNDARY.out1' },
                    { name: 'TILE2_BOUNDARY.out2' },
                    { name: 'TILE2_BOUNDARY.out3' },
                    { name: 'TILE2_BOUNDARY.out4' },
                    { name: 'TILE2_BOUNDARY.out5' },
                    { name: 'TILE2_BOUNDARY.out6' },
                    { name: 'TILE2_BOUNDARY.out7' },
                    { name: 'TILE3_BOUNDARY.out0' },
                    { name: 'TILE3_BOUNDARY.out1' },
                    { name: 'TILE3_BOUNDARY.out2' },
                    { name: 'TILE3_BOUNDARY.out3' },
                    { name: 'TILE3_BOUNDARY.out4' },
                    { name: 'TILE3_BOUNDARY.out5' },
                    { name: 'TILE3_BOUNDARY.out6' },
                    { name: 'TILE3_BOUNDARY.out7' },
                    { name: 'TILE4_BOUNDARY.out0' },
                    { name: 'TILE4_BOUNDARY.out1' },
                    { name: 'TILE4_BOUNDARY.out2' },
                    { name: 'TILE4_BOUNDARY.out3' },
                    { name: 'TILE4_BOUNDARY.out4' },
                    { name: 'TILE4_BOUNDARY.out5' },
                    { name: 'TILE4_BOUNDARY.out6' },
                    { name: 'TILE4_BOUNDARY.out7' },
    
                    { name: 'TILE5_BOUNDARY.out0' },
                    { name: 'TILE5_BOUNDARY.out1' },
                    { name: 'TILE5_BOUNDARY.out2' },
                    { name: 'TILE5_BOUNDARY.out3' },
                    { name: 'TILE5_BOUNDARY.out4' },
                    { name: 'TILE5_BOUNDARY.out5' },
                    { name: 'TILE5_BOUNDARY.out6' },
                    { name: 'TILE5_BOUNDARY.out7' },
                    { name: 'TILE6_BOUNDARY.out0' },
                    { name: 'TILE6_BOUNDARY.out1' },
                    { name: 'TILE6_BOUNDARY.out2' },
                    { name: 'TILE6_BOUNDARY.out3' },
                    { name: 'TILE6_BOUNDARY.out4' },
                    { name: 'TILE6_BOUNDARY.out5' },
                    { name: 'TILE6_BOUNDARY.out6' },
                    { name: 'TILE6_BOUNDARY.out7' },
                    { name: 'TILE7_BOUNDARY.out0' },
                    { name: 'TILE7_BOUNDARY.out1' },
                    { name: 'TILE7_BOUNDARY.out2' },
                    { name: 'TILE7_BOUNDARY.out3' },
                    { name: 'TILE7_BOUNDARY.out4' },
                    { name: 'TILE7_BOUNDARY.out5' },
                    { name: 'TILE7_BOUNDARY.out6' },
                    { name: 'TILE7_BOUNDARY.out7' },
                    { name: 'TILE8_BOUNDARY.out0' },
                    { name: 'TILE8_BOUNDARY.out1' },
                    { name: 'TILE8_BOUNDARY.out2' },
                    { name: 'TILE8_BOUNDARY.out3' },
                    { name: 'TILE8_BOUNDARY.out4' },
                    { name: 'TILE8_BOUNDARY.out5' },
                    { name: 'TILE8_BOUNDARY.out6' },
                    { name: 'TILE8_BOUNDARY.out7' },
                ]
            },
    
            {
                collapsed      : false,
                config :
                [
                    {            
                        name    : 'in_edge'+idx,
                        default : 'none',
                        description: 'Edge detection on the inputs, generates 1 cycle pulse on chosen edges - for simulation purposes only',
                        hidden  : true,
                        options : [
                            { name: 'none' },
                            { name: 'rising edge'  },
                            { name: 'falling edge' },
                            { name: 'both edges'   }
                        ]
                    },
    
                    {
                        name    : 'in_sync'+idx,
                        default : false,
                        description: 'Turns the Clock synchronization on the inputs - for simulation purposes only',
                        hidden  : true,
                    },
    
                    {
                        name    : 'in_custom'+idx,
                        default : '',
                        hidden  : true
                    },
                    {
                        name    : 'in_period'+idx,
                        default : 10,
                        description: 'Period of the square wave',
                        hidden  : true
                    },
                    {
                        name    : 'in_duty'+idx,
                        default : 5,
                        description: 'Duty or ON time of the square wave',
                        hidden  : true
                    },
                    {
                        name    : 'in_repeat_count'+idx,
                        default : 100,
                        description: 'Number of periods the waveform is repeated',
                        hidden  : true
                    }
                ]
            }
        ];
    
        return config;
    }
    
    /**
     * Validate this module's configuration
     *
     * @param inst       - Watchdog instance to be validated
     * @param validation - Issue reporting object
     */
    function validate(inst, vo)
    {
        Common.validateNames(inst, vo);
    
        for (let i = 0; i < 8; ++i) {
            if (inst['in'+i] == 'squareWave') {
                if (inst['in_period'+i] < 2) {
                    Common.logError(vo, inst, ['in_period'+i],
                                'The Square Wave period must be >= 2');
                }
                if (inst['in_duty'+i] < 1 || inst['in_duty'+i]>= inst['in_period'+i]) {
                    Common.logError(vo, inst, ['in_duty'+i],
                                'The Square Wave duty cycle must be >= 1 and < period.');
                }
            }
        }
    }
    
    // Define the common/portable base Watchdog
    exports = {
        config : inputCfg(0).concat(
                 inputCfg(1),
                 inputCfg(2),
                 inputCfg(3),
                 inputCfg(4),
                 inputCfg(5),
                 inputCfg(6),
                 inputCfg(7)),
        displayName         : "Inputs Conditioner",
        validate            : validate,
        description         : "Inputs Conditioner",
        defaultInstanceName : "BOUNDARY",
        longDescription     : longDescription,
    };
    

  • I added XBAR_AUXSIG6,XBAR_AUXSIG67 as CLB6_OUT4,CLB6_OUT5 to replace the input of CLB3.  it works very well in EPWM6.  thanks!

    The first point I modified:add CLB6 config
    
       // XBAR_setCLBMuxConfig(XBAR_AUXSIG1, XBAR_CLB_MUX13_CLB4_OUT4);
       // XBAR_setCLBMuxConfig(XBAR_AUXSIG2, XBAR_CLB_MUX15_CLB4_OUT5); 
        XBAR_setCLBMuxConfig(XBAR_AUXSIG5, XBAR_CLB_MUX21_CLB6_OUT4);   
        XBAR_setCLBMuxConfig(XBAR_AUXSIG6, XBAR_CLB_MUX23_CLB6_OUT5);   
        XBAR_enableCLBMux(XBAR_AUXSIG5, XBAR_MUX21);
        XBAR_enableCLBMux(XBAR_AUXSIG6, XBAR_MUX23);
    
    The second point I modified:replace CLB_IN2,CLB_IN3,CLB_IN4,CLB_IN5 with new config
    
        initTILE3(CLB3_BASE);
        
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN0, CLB_GLOBAL_IN_MUX_EPWM1A);
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN1,
                                 CLB_GLOBAL_IN_MUX_CLB_AUXSIG0);
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN2, 
                                 CLB_GLOBAL_IN_MUX_CLB_AUXSIG6);
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN3, 
                                 CLB_GLOBAL_IN_MUX_CLB_AUXSIG5);
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN4, 
                                 CLB_GLOBAL_IN_MUX_CLB_AUXSIG6);
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN5, 
                                 CLB_GLOBAL_IN_MUX_CLB_AUXSIG5);
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN6, CLB_GLOBAL_IN_MUX_EPWM1A);
        CLB_configGlobalInputMux(CLB3_BASE, CLB_IN7, CLB_GLOBAL_IN_MUX_EPWM1A);
        
        
        The third point I modified:Replace CLB4_base with CLB6_base 

  • Thanks, I’ll test it.