LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Sat Jul 29 03:54:10 CEST 2006
    Subject: [cvs-checkins] MODIFIED: mb-jpeg ...
    Top
    Date: 00/06/07 29:03:54

    Added: mb-jpeg/drivers/fsl_dct_v1_00_a/src Makefile fsl_dct.c
    fsl_dct.h fsl_dct_selftest.c
    Log:
    Drivers for fsl_dct accelerator


    Revision Changes Path
    1.1 mb-jpeg/drivers/fsl_dct_v1_00_a/src/Makefile

    http://www.opencores.org/cvsweb.shtml/mb-jpeg/drivers/fsl_dct_v1_00_a/src/Makefile?rev=1.1&content-type=text/x-cvsweb-markup

    Index: Makefile
    ===================================================================
    ##############################################################################
    ## Filename: D:\mb-jpeg\drivers/fsl_dct_v1_00_a/src/Makefile
    ## Description: Microprocessor Driver Makefile
    ## Date: Fri Jul 21 08:31:12 2006 (by Create and Import Peripheral Wizard)
    ##############################################################################

    COMPILER=
    ARCHIVER=
    CP=cp
    COMPILER_FLAGS=
    EXTRA_COMPILER_FLAGS=
    LIB=libxil.a

    RELEASEDIR=../../../lib
    INCLUDEDIR=../../../include
    INCLUDES=-I./. -I${INCLUDEDIR}

    INCLUDEFILES=*.h
    LIBSOURCES=*.c
    OUTS = *.o

    libs:
    echo "Compiling fsl_dct_v1_00_a"
    $(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)
    $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}
    make clean

    include:
    ${CP} $(INCLUDEFILES) $(INCLUDEDIR)

    clean:
    rm -rf ${OUTS}



    1.1 mb-jpeg/drivers/fsl_dct_v1_00_a/src/fsl_dct.c

    http://www.opencores.org/cvsweb.shtml/mb-jpeg/drivers/fsl_dct_v1_00_a/src/fsl_dct.c?rev=1.1&content-type=text/x-cvsweb-markup

    Index: fsl_dct.c
    ===================================================================
    //////////////////////////////////////////////////////////////////////////////
    // Filename: D:\mb-jpeg\drivers/fsl_dct_v1_00_a/src/fsl_dct.c
    // Version: 1.00.a
    // Description: fsl_dct (FSL DCT accelerator) Driver Source File
    // Date: Fri Jul 21 08:31:12 2006 (by Create and Import Peripheral Wizard)
    //////////////////////////////////////////////////////////////////////////////

    #include "fsl_dct.h"
    /*
    * Write your driver implementation in this file.
    */




    1.1 mb-jpeg/drivers/fsl_dct_v1_00_a/src/fsl_dct.h

    http://www.opencores.org/cvsweb.shtml/mb-jpeg/drivers/fsl_dct_v1_00_a/src/fsl_dct.h?rev=1.1&content-type=text/x-cvsweb-markup

    Index: fsl_dct.h
    ===================================================================
    //////////////////////////////////////////////////////////////////////////////
    // Filename: D:\mb-jpeg\drivers/fsl_dct_v1_00_a/src/fsl_dct.h
    // Version: 1.00.a
    // Description: fsl_dct (FSL DCT accelerator) Driver Header File
    // Date: Fri Jul 21 08:31:12 2006 (by Create and Import Peripheral Wizard)
    //////////////////////////////////////////////////////////////////////////////

    #ifndef FSL_DCT_H
    #define FSL_DCT_H

    #include "xstatus.h"

    #include "fsl.h"
    #define write_into_fsl(val, id) putfsl(val, id)
    #define read_from_fsl(val, id) getfsl(val, id)

    /*
    * A macro for accessing FSL peripheral.
    *
    * This example driver writes all the data in the input arguments
    * into the input FSL bus through blocking writes. FSL peripheral will
    * automatically read from the FSL bus. Once all the inputs
    * have been written, the output from the FSL peripheral is read
    * into output arguments through blocking reads.
    *
    * Arguments: * input_slot_id * Compile time constant indicating FSL slot from * which coprocessor read the input data. Defined in * xparameters.h . * output_slot_id * Compile time constant indicating FSL slot into * which the coprocessor write output data. Defined in * xparameters.h . * input_0 An array of unsigned integers. Array size is 8 * output_0 An array of unsigned integers. Array size is 8 * * Caveats: * The output_slot_id and input_slot_id arguments must be * constants available at compile time. Do not pass * variables for these arguments. * * Since this is a macro, using it too many times will * increase the size of your application. In such cases, * or when this macro is too simplistic for your * application you may want to create your own instance * specific driver function (not a macro) using the * macros defined in this file and the slot * identifiers defined in xparameters.h . Please see the * example code (fsl_dct_app.c) for details. */ #define fsl_dct(\ input_slot_id,\ output_slot_id,\ input_0, \ output_0 \ )\ {\ int i;\ \ for (i=0; i<8; i++)\ {\ write_into_fsl(input_0[i], input_slot_id);\ }\ \ for (i=0; i<8; i++)\ {\ read_from_fsl(output_0[i], output_slot_id);\ }\ } XStatus FSL_DCT_SelfTest(); #endif 1.1 mb-jpeg/drivers/fsl_dct_v1_00_a/src/fsl_dct_selftest.c http://www.opencores.org/cvsweb.shtml/mb-jpeg/drivers/fsl_dct_v1_00_a/src/fsl_dct_selftest.c?rev=1.1&content-type=text/x-cvsweb-markup Index: fsl_dct_selftest.c =================================================================== ////////////////////////////////////////////////////////////////////////////// // Filename: D:\mb-jpeg\drivers/fsl_dct_v1_00_a/src/fsl_dct_selftest.c // Version: 1.00.a // Description: // Date: Fri Jul 21 08:31:12 2006 (by Create and Import Peripheral Wizard) ////////////////////////////////////////////////////////////////////////////// #include "xparameters.h" #include "fsl_dct.h" /* IMPORTANT: * In order to run this self test, you need to modify the value of following * micros according to the slot ID defined in xparameters.h file. */ #define input_slot_id XPAR_FSL_FSL_DCT_0_INPUT_SLOT_ID #define output_slot_id XPAR_FSL_FSL_DCT_0_OUTPUT_SLOT_ID XStatus FSL_DCT_SelfTest() { unsigned int input_0[8]; unsigned int output_0[8]; //Initialize your input data over here: input_0[0] = 12345; input_0[1] = 24690; input_0[2] = 37035; input_0[3] = 49380; input_0[4] = 61725; input_0[5] = 74070; input_0[6] = 86415; input_0[7] = 98760; //Call the macro with instance specific slot IDs fsl_dct( input_slot_id, output_slot_id, input_0, output_0 ); if (output_0[0] != 444420) return XST_FAILURE; if (output_0[7] != 444420) return XST_FAILURE; return XST_SUCCESS; }

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.