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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [examples/] [common/] [maps/] [map_fsev2.h] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 sergeykhbr
/*****************************************************************************
2
 * @file
3
 * @copyright Copyright 2015 GNSS Sensor Ltd. All right reserved.
4
 * @author    Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief     Fast Search Engine (FSE) memory map description.
6
 ****************************************************************************/
7
 
8
#ifndef __FSEV2_H__
9
#define __FSEV2_H__
10
 
11
#include <inttypes.h>
12
 
13
#define FSE2_CHAN_MAX 32
14
 
15
static const uint32_t FSE2_CONTROL_ENA      = (1 << 31);  // 0=disable; 1=enable
16
static const uint32_t FSE2_CONTROL_ADC      = (1 << 30);  // 0=bin offset; 1=sign/magn
17
static const uint32_t FSE2_REC_DISABLE      = (1 << 29);
18
static const uint32_t FSE2_STATE_NXT_DOPLER = (1 << 21);
19
static const uint32_t FSE2_STATE_PROCESSING = (1 << 20);
20
static const uint32_t FSE2_STATE_SELCHAN    = (1 << 19);
21
static const uint32_t FSE2_STATE_WRITING    = (1 << 18);
22
static const uint32_t FSE2_STATE_WAIT_MS    = (1 << 17);
23
static const uint32_t FSE2_STATE_IDLE       = (1 << 16);
24
 
25
typedef struct fsev2_chan_fields {
26
    volatile uint32_t common;//prn, acc_ms, carr_steps, coh_ena
27
    volatile int32_t carr_nco_f0;
28
    volatile int32_t carr_nco_dlt;
29
    volatile int32_t carr_nco_letter;
30
    volatile uint32_t max;
31
    volatile uint32_t ind;
32
    volatile uint32_t noise;
33
    volatile int32_t dopler;
34
} fsev2_chan_fields;
35
 
36
typedef struct fsev2_map {
37
   fsev2_chan_fields chan[FSE2_CHAN_MAX];
38
 
39
   volatile uint32_t hw_id; // msec ram capacity and hw_id
40
   volatile uint32_t control;
41
   volatile uint32_t ms_marker;
42
   volatile uint32_t carr_nco_th;
43
   volatile uint32_t code_nco_th;
44
   volatile int32_t carr_nco_if;
45
   volatile uint32_t code_nco;
46
   volatile uint32_t recram_msb; // most signficant bits of address (valid bits [13:11])
47
 
48
   uint8_t rsrv[2048 - FSE2_CHAN_MAX*sizeof(fsev2_chan_fields) - 8*sizeof(uint32_t)];
49
   uint64_t rec_mem[2048/sizeof(uint64_t)];
50
} fsev2_map;
51
 
52
 
53
#endif//__FSEV2_H__

powered by: WebSVN 2.1.0

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