OpenCores
URL https://opencores.org/ocsvn/theia_gpu/theia_gpu/trunk

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [beta_1.2/] [rtl/] [CONTROL/] [Unit_Control.v] - Diff between revs 76 and 81

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 76 Rev 81
Line 145... Line 145...
        .S( iUCodeReturnValue ),
        .S( iUCodeReturnValue ),
        .Q( wHit )
        .Q( wHit )
);
);
//--------------------------------------------------------------
//--------------------------------------------------------------
 
 
`ifdef DEBUG
`ifdef DEBUG_CU
        always @ ( wHit )
        always @ ( wHit )
        begin
        begin
                `LOGME "*** Triangle HIT ***\n");
                `LOGME "*** Triangle HIT ***\n");
        end
        end
`endif
`endif
Line 171... Line 171...
        case (CurrentState)
        case (CurrentState)
        //-----------------------------------------
        //-----------------------------------------
        `CU_AFTER_RESET_STATE:
        `CU_AFTER_RESET_STATE:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d CU_AFTER_RESET_STATE\n",$time);
                `LOGME"%d CU_AFTER_RESET_STATE\n",$time);
        `endif
        `endif
 
 
                oRamBusOwner                            <= 0;
                oRamBusOwner                            <= 0;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_INITIAL;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_INITIAL;
Line 197... Line 197...
        //-----------------------------------------
        //-----------------------------------------
 
 
        `CU_WAIT_FOR_INITIAL_CONFIGURATION:
        `CU_WAIT_FOR_INITIAL_CONFIGURATION:
        begin
        begin
        //$display("CORE: %d CU_WAIT_FOR_INITIAL_CONFIGURATION", iDebug_CoreID);
        //$display("CORE: %d CU_WAIT_FOR_INITIAL_CONFIGURATION", iDebug_CoreID);
//              `ifdef DEBUG
//              `ifdef DEBUG_CU
//                      `LOGME"%d Control: CU_WAIT_FOR_INITIAL_CONFIGURATION\n",$time);
//                      `LOGME"%d Control: CU_WAIT_FOR_INITIAL_CONFIGURATION\n",$time);
//              `endif
//              `endif
 
 
                oRamBusOwner                            <= 0;
                oRamBusOwner                            <= 0;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
Line 251... Line 251...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_CLEAR_REGISTERS:
        `CU_CLEAR_REGISTERS:
        begin
        begin
        //$display("CORE: %d CU_CLEAR_REGISTERS", iDebug_CoreID);
        //$display("CORE: %d CU_CLEAR_REGISTERS", iDebug_CoreID);
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d CU_CLEAR_REGISTERS\n",$time);
                `LOGME"%d CU_CLEAR_REGISTERS\n",$time);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_INITIAL;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_INITIAL;
Line 275... Line 275...
                NextState                                       <= `CU_WAIT_CLEAR_REGISTERS;
                NextState                                       <= `CU_WAIT_CLEAR_REGISTERS;
        end
        end
//-----------------------------------------     
//-----------------------------------------     
        `CU_WAIT_CLEAR_REGISTERS:
        `CU_WAIT_CLEAR_REGISTERS:
        begin
        begin
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d CU_WAIT_CLEAR_REGISTERS\n",$time);
//              `LOGME"%d CU_WAIT_CLEAR_REGISTERS\n",$time);
//      `endif  
//      `endif  
                //$display("CORE: %d CU_WAIT_CLEAR_REGISTERS", iDebug_CoreID);
                //$display("CORE: %d CU_WAIT_CLEAR_REGISTERS", iDebug_CoreID);
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_INITIAL;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_INITIAL;
Line 303... Line 303...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_ACK_CLEAR_REGISTERS:
        `CU_ACK_CLEAR_REGISTERS:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d CU_ACK_CLEAR_REGISTERS\n", $time);
                `LOGME"%d CU_ACK_CLEAR_REGISTERS\n", $time);
        `endif
        `endif
 
 
        //$display("CORE: %d CU_ACK_CLEAR_REGISTERS", iDebug_CoreID);
        //$display("CORE: %d CU_ACK_CLEAR_REGISTERS", iDebug_CoreID);
 
 
Line 332... Line 332...
 
 
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_CONFIG_DATA_READ:
        `CU_WAIT_FOR_CONFIG_DATA_READ:
        begin
        begin
 
 
//              `ifdef DEBUG
//              `ifdef DEBUG_CU
//                      `LOGME"%d Control: CU_WAIT_FOR_CONFIG_DATA_READ\n",$time);
//                      `LOGME"%d Control: CU_WAIT_FOR_CONFIG_DATA_READ\n",$time);
//              `endif
//              `endif
 
 
 
 
//$display("CORE: %d CU_WAIT_FOR_CONFIG_DATA_READ", iDebug_CoreID);
//$display("CORE: %d CU_WAIT_FOR_CONFIG_DATA_READ", iDebug_CoreID);
Line 363... Line 363...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_PRECALCULATE_CONSTANTS:
        `CU_PRECALCULATE_CONSTANTS:
        begin
        begin
//$display("CORE: %d CU_PRECALCULATE_CONSTANTS", iDebug_CoreID);
//$display("CORE: %d CU_PRECALCULATE_CONSTANTS", iDebug_CoreID);
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_PRECALCULATE_CONSTANTS\n", $time);
                `LOGME"%d Control: CU_PRECALCULATE_CONSTANTS\n", $time);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_CPPU;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_CPPU;
Line 387... Line 387...
 
 
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_CONSTANT:
        `CU_WAIT_FOR_CONSTANT:
        begin
        begin
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_WAIT_FOR_CONSTANT\n", $time);
//              `LOGME"%d Control: CU_WAIT_FOR_CONSTANT\n", $time);
//      `endif
//      `endif
 
 
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
Line 416... Line 416...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_ACK_PRECALCULATE_CONSTANTS:
        `CU_ACK_PRECALCULATE_CONSTANTS:
        begin
        begin
        //$display("CORE: %d CU_ACK_PRECALCULATE_CONSTANTS", iDebug_CoreID);
        //$display("CORE: %d CU_ACK_PRECALCULATE_CONSTANTS", iDebug_CoreID);
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_ACK_PRECALCULATE_CONSTANTS\n", $time);
                `LOGME"%d Control: CU_ACK_PRECALCULATE_CONSTANTS\n", $time);
        `endif
        `endif
 
 
 
 
                oRamBusOwner                            <= 0;//`REG_BUS_OWNED_BY_BCU;
                oRamBusOwner                            <= 0;//`REG_BUS_OWNED_BY_BCU;
Line 442... Line 442...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
 
 
        `CU_TRIGGER_USERCONSTANTS:
        `CU_TRIGGER_USERCONSTANTS:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_RGU\n",$time);
                `LOGME"%d Control: CU_TRIGGER_USERCONSTANTS\n",$time);
        `endif
        `endif
 
 
                //$display("CORE: %d CU_TRIGGER_USERCONSTANTS", iDebug_CoreID);
                //$display("CORE: %d CU_TRIGGER_USERCONSTANTS", iDebug_CoreID);
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
Line 468... Line 468...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_USERCONSTANTS:
        `CU_WAIT_USERCONSTANTS:
        begin
        begin
 
 
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_WAIT_FOR_RGU\n",$time);
//              `LOGME"%d Control: CU_WAIT_FOR_RGU\n",$time);
//      `endif
//      `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_USERCONSTANTS;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_USERCONSTANTS;
Line 495... Line 495...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_ACK_USERCONSTANTS:
        `CU_ACK_USERCONSTANTS:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_ACK_RGU\n",$time);
                `LOGME"%d Control: CU_ACK_RGU\n",$time);
        `endif
        `endif
 
 
        //$display("CORE: %d CU_ACK_USERCONSTANTS", iDebug_CoreID);
        //$display("CORE: %d CU_ACK_USERCONSTANTS", iDebug_CoreID);
 
 
Line 524... Line 524...
 
 
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_RENDER_ENABLE:
        `CU_WAIT_FOR_RENDER_ENABLE:
        begin
        begin
        //$display("CORE: %d CU_WAIT_FOR_RENDER_ENABLE", iDebug_CoreID);
        `ifdef DEBUG_CU
 
        $display("CORE: %d CU_WAIT_FOR_RENDER_ENABLE", iDebug_CoreID);
 
        `endif
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
                oGFUEnable                                      <= 0;
                oGFUEnable                                      <= 0;
                oUCodeEnable                            <= 0; //*        
                oUCodeEnable                            <= 0; //*        
                oIOWritePixel                           <= 0;
                oIOWritePixel                           <= 0;
Line 549... Line 550...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_TRIGGER_RGU:
        `CU_TRIGGER_RGU:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_RGU\n",$time);
                `LOGME"CORE: %d CU_TRIGGER_RGU", iDebug_CoreID);
        `endif
        `endif
 
 
        //$display("CORE: %d CU_TRIGGER_RGU", iDebug_CoreID);
 
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_RGU;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_RGU;
                oGFUEnable                                      <= 0;
                oGFUEnable                                      <= 0;
                oUCodeEnable                            <= 1;   //*
                oUCodeEnable                            <= 1;   //*
Line 575... Line 575...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_RGU:
        `CU_WAIT_FOR_RGU:
        begin
        begin
 
 
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_WAIT_FOR_RGU\n",$time);
//              `LOGME"%d Control: CU_WAIT_FOR_RGU\n",$time);
//      `endif
//      `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
Line 602... Line 602...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_ACK_RGU:
        `CU_ACK_RGU:
        begin
        begin
 
 
        `ifdef DEBUG
 
                `LOGME"%d Control: CU_ACK_RGU\n",$time);
        `ifdef DEBUG_CU
 
                `LOGME"CORE: %d CU_ACK_RGU", iDebug_CoreID);
        `endif
        `endif
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
                oGFUEnable                                      <= 0;
                oGFUEnable                                      <= 0;
                oUCodeEnable                            <= 0; //*        
                oUCodeEnable                            <= 0; //*        
Line 629... Line 630...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_TRIGGER_GEO:
        `CU_TRIGGER_GEO:
        begin
        begin
 
 
        //$display("CORE: %d CU_TRIGGER_GEO", iDebug_CoreID);
 
 
 
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_GEO\n",$time);
                `LOGME"CORE: %d CU_TRIGGER_GEO", iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
                oUCodeEnable                            <= 0;
                oUCodeEnable                            <= 0;
Line 657... Line 656...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_GEO_SYNC:
        `CU_WAIT_FOR_GEO_SYNC:
        begin
        begin
 
 
        `ifdef DEBUG
 
                `LOGME"%d Control: CU_WAIT_FOR_GEO_SYNC\n",$time);
 
 
        `ifdef DEBUG_CU
 
                `LOGME"%d CORE %d Control: CU_WAIT_FOR_GEO_SYNC\n",$time,iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
                oUCodeEnable                            <= 0;
                oUCodeEnable                            <= 0;
Line 691... Line 692...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_TRIGGER_TCC:
        `CU_TRIGGER_TCC:
        begin
        begin
        ////$display("CU_TRIGGER_TCC");
        ////$display("CU_TRIGGER_TCC");
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_TCC\n",$time);
                `LOGME"%d CORE %d Control: CU_TRIGGER_TCC\n",$time,iDebug_CoreID);
        `endif
        `endif
 
 
           oRamBusOwner                                 <= `REG_BUS_OWNED_BY_UCODE;
           oRamBusOwner                                 <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_TCC;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_TCC;
                oUCodeEnable                            <= 1;   //*
                oUCodeEnable                            <= 1;   //*
Line 753... Line 754...
        values corresponding to the triangle that we hitted.
        values corresponding to the triangle that we hitted.
        */
        */
        `CU_CHECK_HIT:
        `CU_CHECK_HIT:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_CHECK_HIT\n",$time);
                `LOGME"%d CORE %d Control: CU_CHECK_HIT\n",$time,iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
                oUCodeEnable                            <= 0;
                oUCodeEnable                            <= 0;
Line 788... Line 789...
        texture addresses for the 4 coordinates so now lets
        texture addresses for the 4 coordinates so now lets
        just ask for them.
        just ask for them.
        */
        */
        `CU_TRIGGER_TFF:
        `CU_TRIGGER_TFF:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_TFF\n",$time);
                `LOGME"%d CORE %d Control: CU_TRIGGER_TFF\n",$time,iDebug_CoreID);
        `endif
        `endif
 
 
        ////$display("CU_TRIGGER_TFF");
        ////$display("CU_TRIGGER_TFF");
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
Line 813... Line 814...
                NextState <= `CU_WAIT_FOR_TFF;
                NextState <= `CU_WAIT_FOR_TFF;
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_TFF:
        `CU_WAIT_FOR_TFF:
        begin
        begin
 
        `ifdef DEBUG_CU
 
        `LOGME"%d CORE %d Control: CU_WAIT_FOR_TFF\n",$time,iDebug_CoreID);
 
        `endif
           oRamBusOwner                                 <= `REG_BUS_OWNED_BY_GFU;
           oRamBusOwner                                 <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;
                oUCodeEnable                            <= 0;
                oUCodeEnable                            <= 0;
                oGFUEnable                                      <= 0;     //Changed Aug 14
                oGFUEnable                                      <= 0;     //Changed Aug 14
                oIOWritePixel                           <= 0;
                oIOWritePixel                           <= 0;
Line 839... Line 842...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_TRIGGER_PSU_WITH_TEXTURE:
        `CU_TRIGGER_PSU_WITH_TEXTURE:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_PSU_WITH_TEXTURE\n",$time);
                `LOGME"%d Control: CU_TRIGGER_PSU_WITH_TEXTURE\n",$time);
        `endif
        `endif
 
 
           oRamBusOwner                                 <= `REG_BUS_OWNED_BY_UCODE;
           oRamBusOwner                                 <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PSU2;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PSU2;
Line 864... Line 867...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_TRIGGER_AABBIU:
        `CU_TRIGGER_AABBIU:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_AABBIU\n",$time);
                `LOGME"%d Control: CU_TRIGGER_AABBIU\n",$time);
        `endif
        `endif
//      $stop();
//      $stop();
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
 
 
Line 891... Line 894...
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_AABBIU:
        `CU_WAIT_FOR_AABBIU:
        begin
        begin
 
 
 
 
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_WAIT_FOR_AABBIU\n",$time);
//              `LOGME"%d Control: CU_WAIT_FOR_AABBIU\n",$time);
//      `endif
//      `endif
 
 
 
 
//      //$display("iUCodeDone",iUCodeDone);
//      //$display("iUCodeDone",iUCodeDone);
Line 924... Line 927...
                        NextState <= `CU_WAIT_FOR_AABBIU;
                        NextState <= `CU_WAIT_FOR_AABBIU;
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_TRIGGER_BIU:
        `CU_TRIGGER_BIU:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_BIU\n",$time);
                `LOGME"%d CORE: %d Control: CU_TRIGGER_BIU\n",$time,iDebug_CoreID);
        `endif
        `endif
 
 
                        oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                        oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                        oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_BIU;
                        oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_BIU;
                        oUCodeEnable                            <= 1;
                        oUCodeEnable                            <= 1;
Line 950... Line 953...
 
 
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_BIU:
        `CU_WAIT_FOR_BIU:
        begin
        begin
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_WAIT_FOR_BIU\n",$time);
//              `LOGME"%d Control: CU_WAIT_FOR_BIU\n",$time);
//      `endif
//      `endif
 
 
                        oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                        oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                        oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_BIU;
                        oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_BIU;
Line 979... Line 982...
        /*
        /*
                ACK UCODE by setting oUCodeEnable = 0
                ACK UCODE by setting oUCodeEnable = 0
        */
        */
        `CU_ACK_UCODE:
        `CU_ACK_UCODE:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_ACK_UCODE\n",$time);
                `LOGME"%d CORE: %d Control: CU_ACK_UCODE\n",$time, iDebug_CoreID);
        `endif
        `endif
 
 
                        oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                        oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                        oCodeInstructioPointer  <= 0; //*
                        oCodeInstructioPointer  <= 0; //*
                        oUCodeEnable                            <= 0;    //*
                        oUCodeEnable                            <= 0;    //*
Line 1010... Line 1013...
        /*
        /*
        Here we no longer use GFU so set Enable to zero
        Here we no longer use GFU so set Enable to zero
        */
        */
        `CU_TRIGGER_PSU:
        `CU_TRIGGER_PSU:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_PSU\n",$time);
                `LOGME"%d CORE: %d Control: CU_TRIGGER_PSU\n",$time, iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PSU;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PSU;
                oUCodeEnable                            <= 1;
                oUCodeEnable                            <= 1;
Line 1036... Line 1039...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_PSU:
        `CU_WAIT_FOR_PSU:
        begin
        begin
 
 
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_TRIGGER_PSU\n",$time);
//              `LOGME"%d Control: CU_TRIGGER_PSU\n",$time);
//      `endif
//      `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PSU;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PSU;
Line 1064... Line 1067...
 
 
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_ACK_PSU:
        `CU_ACK_PSU:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_ACK_PSU\n",$time);
                `LOGME"%d CORE: %d Control: CU_ACK_PSU\n",$time, iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= 0;    //*
                oCodeInstructioPointer  <= 0;    //*
                oUCodeEnable                            <= 0;    //*
                oUCodeEnable                            <= 0;    //*
Line 1096... Line 1099...
                Trigger the Pixel Commit.
                Trigger the Pixel Commit.
        */
        */
        `CU_TRIGGER_PCU:
        `CU_TRIGGER_PCU:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_PCU\n",$time);
                `LOGME"%d CORE: %d Control: CU_TRIGGER_PCU\n",$time, iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;    //*
                oCodeInstructioPointer  <= 0;    //*
                oUCodeEnable                            <= 0;    //*
                oUCodeEnable                            <= 0;    //*
Line 1122... Line 1125...
 
 
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_SET_PICTH:
        `CU_SET_PICTH:
        begin
        begin
 
 
 
        `ifdef DEBUG_CU
 
                `LOGME"%d CORE: %d Control: CU_SET_PICTH\n",$time, iDebug_CoreID);
 
        `endif
 
 
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;    //*
                oCodeInstructioPointer  <= 0;    //*
                oUCodeEnable                            <= 0;    //*
                oUCodeEnable                            <= 0;    //*
                oGFUEnable                                      <= 0;
                oGFUEnable                                      <= 0;
                oIOWritePixel                           <= 1; //*
                oIOWritePixel                           <= 1; //*
Line 1143... Line 1152...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_PCU:
        `CU_WAIT_FOR_PCU:
        begin
        begin
 
 
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_WAIT_FOR_PCU\n",$time);
//              `LOGME"%d Control: CU_WAIT_FOR_PCU\n",$time);
//      `endif
//      `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;    //*
                oCodeInstructioPointer  <= 0;    //*
Line 1171... Line 1180...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_ACK_PCU:
        `CU_ACK_PCU:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_ACK_PCU\n",$time);
                `LOGME"%d CORE: %d Control: CU_ACK_PCU\n",$time, iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_GFU;
                oCodeInstructioPointer  <= 0;    //*
                oCodeInstructioPointer  <= 0;    //*
                oUCodeEnable                            <= 0;    //*
                oUCodeEnable                            <= 0;    //*
                oGFUEnable                                      <= 0;
                oGFUEnable                                      <= 0;
                oIOWritePixel                           <= 0;
                oIOWritePixel                           <= 0;
Line 1194... Line 1204...
 
 
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_TRIGGER_NPU: //Next Pixel Unit
        `CU_TRIGGER_NPU: //Next Pixel Unit
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_NPU\n",$time);
                `LOGME"%d CORE: %d Control: CU_TRIGGER_NPU\n",$time, iDebug_CoreID);
        `endif
        `endif
 
 
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_NPG;       //*
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_NPG;       //*
                oUCodeEnable                            <= 1;   //*
                oUCodeEnable                            <= 1;   //*
                oGFUEnable                                      <= 0;
                oGFUEnable                                      <= 0;
                oIOWritePixel                           <= 0;
                oIOWritePixel                           <= 0;
Line 1243... Line 1255...
        to RGU for the next pixel, or we have no
        to RGU for the next pixel, or we have no
        more pixels so we are done we our picture!
        more pixels so we are done we our picture!
        */
        */
        `CU_ACK_NPU:
        `CU_ACK_NPU:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_ACK_PSU\n",$time);
                `LOGME"%d CORE: %d Control: CU_ACK_NPU\n",$time, iDebug_CoreID);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= 0;    //*
                oCodeInstructioPointer  <= 0;    //*
                oUCodeEnable                            <= 0;    //*
                oUCodeEnable                            <= 0;    //*
Line 1297... Line 1309...
        /*
        /*
        Here we no longer use GFU so set Enable to zero
        Here we no longer use GFU so set Enable to zero
        */
        */
        `CU_TRIGGER_USERPIXELSHADER:
        `CU_TRIGGER_USERPIXELSHADER:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_TRIGGER_PSU\n",$time);
                `LOGME"%d Control: CU_TRIGGER_PSU\n",$time);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PIXELSHADER;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PIXELSHADER;
Line 1322... Line 1334...
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_WAIT_FOR_USERPIXELSHADER:
        `CU_WAIT_FOR_USERPIXELSHADER:
        begin
        begin
 
 
//      `ifdef DEBUG
//      `ifdef DEBUG_CU
//              `LOGME"%d Control: CU_TRIGGER_PSU\n",$time);
//              `LOGME"%d Control: CU_TRIGGER_PSU\n",$time);
//      `endif
//      `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PIXELSHADER;
                oCodeInstructioPointer  <= `ENTRYPOINT_INDEX_PIXELSHADER;
Line 1350... Line 1362...
 
 
        end
        end
        //-----------------------------------------
        //-----------------------------------------
        `CU_ACK_USERPIXELSHADER:
        `CU_ACK_USERPIXELSHADER:
        begin
        begin
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: CU_ACK_PSU\n",$time);
                `LOGME"%d Control: CU_ACK_PSU\n",$time);
        `endif
        `endif
 
 
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oRamBusOwner                            <= `REG_BUS_OWNED_BY_UCODE;
                oCodeInstructioPointer  <= 0;    //*
                oCodeInstructioPointer  <= 0;    //*
Line 1379... Line 1391...
        end
        end
        //---------------------------------------------------
        //---------------------------------------------------
        default:
        default:
        begin
        begin
 
 
        `ifdef DEBUG
        `ifdef DEBUG_CU
                `LOGME"%d Control: ERRO Undefined State\n",$time);
                `LOGME"%d Control: ERRO Undefined State\n",$time);
        `endif
        `endif
 
 
                oRamBusOwner                            <= 0;
                oRamBusOwner                            <= 0;
                oCodeInstructioPointer  <= 0;
                oCodeInstructioPointer  <= 0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.