~ubuntu-branches/ubuntu/trusty/gnuradio/trusty-updates

« back to all changes in this revision

Viewing changes to gcell/include/gcell/gc_spu_args.h

  • Committer: Package Import Robot
  • Author(s): A. Maitland Bottoms
  • Date: 2012-02-26 21:26:16 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120226212616-vsfkbi1158xshdql
Tags: 3.5.1-1
* new upstream version, re-packaged from scratch with modern tools
    closes: #642716, #645332, #394849, #616832, #590048, #642580,
    #647018, #557050, #559640, #631863
* CMake build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- c++ -*- */
2
 
/*
3
 
 * Copyright 2007 Free Software Foundation, Inc.
4
 
 * 
5
 
 * This file is part of GNU Radio
6
 
 * 
7
 
 * GNU Radio is free software; you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation; either version 3, or (at your option)
10
 
 * any later version.
11
 
 * 
12
 
 * GNU Radio is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 * 
17
 
 * You should have received a copy of the GNU General Public License along
18
 
 * with this program; if not, write to the Free Software Foundation, Inc.,
19
 
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
 
 */
21
 
#ifndef INCLUDED_GCELL_GC_SPU_ARGS_H
22
 
#define INCLUDED_GCELL_GC_SPU_ARGS_H
23
 
 
24
 
#include <gcell/gc_types.h>
25
 
#include <gcell/gc_logging.h>
26
 
 
27
 
// args passed to SPE at initialization time
28
 
 
29
 
typedef struct gc_spu_args {
30
 
  gc_eaddr_t    queue;          // address of job queue (gc_jd_queue_t *)
31
 
  gc_eaddr_t    comp_info[2];   // completion info (gc_comp_info_t *)
32
 
  uint32_t      spu_idx;        // which spu we are: [0,nspus-1]
33
 
  uint32_t      nspus;          // number of spus we're using
34
 
  uint32_t      proc_def_ls_addr;  // LS addr of proc_def table
35
 
  uint32_t      nproc_defs;        // number of proc_defs in table
36
 
  gc_log_t      log;               // logging info
37
 
} _AL16 gc_spu_args_t;
38
 
 
39
 
 
40
 
#define GC_CI_NJOBS     62      // makes gc_comp_info 1 cache line long
41
 
 
42
 
/*!
43
 
 * \brief Used to return info to PPE on which jobs are completed.
44
 
 *
45
 
 * When each SPE is initalized, it is passed EA pointers to two of
46
 
 * these structures.  The SPE uses these to communicate which jobs
47
 
 * that it has worked on are complete.  The SPE notifies the PPE by
48
 
 * sending an OP_JOBS_DONE message (see gc_mbox.h) with an argument of
49
 
 * 0 or 1, indicating which of the two comp_info's to examine.  The
50
 
 * SPE sets the in_use flag to 1 before DMA'ing to the PPE.  When the
51
 
 * PPE is done with the structure, it must clear the in_use field to
52
 
 * let the SPE know it can begin using it again.
53
 
 */
54
 
typedef struct gc_comp_info {
55
 
  uint16_t      in_use;         // set by SPE, cleared by PPE when it's finished
56
 
  uint16_t      ncomplete;      // number of valid job_id's
57
 
  uint16_t      job_id[GC_CI_NJOBS];    // job_id's of completed jobs
58
 
} _AL128 gc_comp_info_t;
59
 
 
60
 
#endif /* INCLUDED_GCELL_GC_SPU_ARGS_H */