From 444d3c488c7cc4c00004d3f01ec8d332eef78c25 Mon Sep 17 00:00:00 2001 From: buret Date: Tue, 24 Jul 2007 13:37:19 +0000 Subject: HAL Phy Maximus: - update tm dma - develop pb dma - develop recv/send chandata + associated tests git-svn-id: svn+ssh://pessac/svn/cesar/trunk@520 017c9cb6-072f-447c-8318-d5b54f68fe89 --- hal/phy/maximus/inc/maximus_phy_ctrl.h | 8 ++++++++ hal/phy/maximus/inc/maximus_phy_ctx.h | 29 +++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) (limited to 'hal/phy/maximus/inc') diff --git a/hal/phy/maximus/inc/maximus_phy_ctrl.h b/hal/phy/maximus/inc/maximus_phy_ctrl.h index 103d3cd4cc..c7cc13289c 100644 --- a/hal/phy/maximus/inc/maximus_phy_ctrl.h +++ b/hal/phy/maximus/inc/maximus_phy_ctrl.h @@ -65,6 +65,14 @@ int maximus_phy_recv_tonemap (phy_t *ctx, sci_msg_t *msg); int maximus_phy_recv_noise (phy_t *ctx, sci_msg_t *msg); int maximus_phy_recv_spectrum (phy_t *ctx, sci_msg_t *msg); +/** + * Maximus TX frame callbacks in case of chandata transfer called when the corresponding netclock message is received. + * \param data pointer containing PHY context. + */ +void maximus_phy_send_tonemap_cb (void *data); +void maximus_phy_send_noise_cb (void *data); +void maximus_phy_send_spectrum_cb (void *data); + /** * Maximus TX frame first callback called when the corresponding netclock message is received. * \param data pointer to 'maximus_tx_fc_t' structure, containing argument 'want_conf' of 'phy_tx_frame'. diff --git a/hal/phy/maximus/inc/maximus_phy_ctx.h b/hal/phy/maximus/inc/maximus_phy_ctx.h index 9d94809052..ccfa824fc0 100644 --- a/hal/phy/maximus/inc/maximus_phy_ctx.h +++ b/hal/phy/maximus/inc/maximus_phy_ctx.h @@ -93,6 +93,16 @@ struct maximus_phy_ctrl_t }; typedef struct maximus_phy_ctrl_t maximus_phy_ctrl_t; +enum chandata_type_t +{ + MAXIMUS_PHY_CHANDATA_TYPE_NONE = 0x00, + MAXIMUS_PHY_CHANDATA_TYPE_FREQUENCY_NOISE = 0x01, + MAXIMUS_PHY_CHANDATA_TYPE_TIME_NOISE = 0x02, + MAXIMUS_PHY_CHANDATA_TYPE_SPECTRUM = 0x03, + MAXIMUS_PHY_CHANDATA_TYPE_NB = 0x04 +}; +typedef enum chandata_type_t chandata_type_t; + /** PB DMA structure for Maximus */ struct maximus_pbdma_t { @@ -114,16 +124,19 @@ struct maximus_pbdma_t uint nb_ready; /** Number of the PB after which an interrupt is triggered. */ uint nb_pb_it; + /** Used to indicate or a chandata transfer (true) or a PB transfer (false).*/ + bool transfer_mode; + /** Indicates if at least one received PB was received with error. */ + bool pb_crc_error; /** First PB descriptor. */ phy_pb_t *first_pb; + /** Current PB descriptor for Rx. */ + phy_pb_rx_t *current_pb; + /** Indicates if chandata are noise (u16 frequency_noise[PHY_CARRIER_MAX_NB] and u8 time_noise[PHY_SYMBOL_MAX_NB]) + * or spectrum (u64 spectrum[PHY_CARRIER_MAX_NB]). */ + chandata_type_t chandata_type; /** First transfer descriptor. */ - phy_chandata_t *first_chandata; - /** Frequency noise. */ - u16 frequency_noise[PHY_CARRIER_MAX_NB]; - /** Time noise. */ - u8 time_noise[PHY_SYMBOL_MAX_NB]; - /** Transfer function of channel response. */ - u64 spectrum[PHY_CARRIER_MAX_NB]; + phy_chandata_t *first_chandata[MAXIMUS_PHY_CHANDATA_TYPE_NB]; }; typedef struct maximus_pbdma_t maximus_pbdma_t; @@ -143,7 +156,7 @@ struct maximus_tmdma_t /** Tonemask blocks first descriptor. */ blk_t *tonemask; // tonemask[PHY_CARRIER_MAX_NB] (1 bit per carrier) /** Tonemap blocks first descriptor. */ - blk_t *tonemap; // tonemap[PHY_CARRIER_MAX_NB] (4 bits per carrier) + blk_t *tonemap[PHY_TONEMAP_MAX_NB]; // tonemap[PHY_CARRIER_MAX_NB] (4 bits per carrier) }; typedef struct maximus_tmdma_t maximus_tmdma_t; -- cgit v1.2.3