Added gmsk modulator block for gsm
This commit is contained in:
parent
ebf8880709
commit
ff5d81de50
|
@ -24,6 +24,7 @@ add_subdirectory(receiver)
|
|||
add_subdirectory(flow_control)
|
||||
add_subdirectory(misc_utils)
|
||||
add_subdirectory(trx_interface)
|
||||
add_subdirectory(transmitter)
|
||||
install(FILES
|
||||
gsm_block_tree.xml DESTINATION share/gnuradio/grc/blocks
|
||||
)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<cat>
|
||||
<name>Transmitter</name>
|
||||
<block>gsm_txtime_bursts_tagger</block>
|
||||
<block>gsm_gmsk_mod</block>
|
||||
</cat>
|
||||
<cat>
|
||||
<name>Logical channels demapping</name>
|
||||
|
|
|
@ -18,5 +18,6 @@
|
|||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
install(FILES
|
||||
gsm_gmsk_mod.xml
|
||||
gsm_txtime_bursts_tagger.xml DESTINATION share/gnuradio/grc/blocks
|
||||
)
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<block>
|
||||
<name>GMSK Modulator for GSM</name>
|
||||
<key>gsm_gmsk_mod</key>
|
||||
<import>from grgsm import gsm_gmsk_mod</import>
|
||||
<make>gsm_gmsk_mod(
|
||||
BT=$BT,
|
||||
pulse_duration=$pulse_duration,
|
||||
sps=$sps,
|
||||
)</make>
|
||||
<callback>set_BT($BT)</callback>
|
||||
<callback>set_pulse_duration($pulse_duration)</callback>
|
||||
<callback>set_sps($sps)</callback>
|
||||
<param>
|
||||
<name>3 dB Time-Bandwidth Product</name>
|
||||
<key>BT</key>
|
||||
<value>4</value>
|
||||
<type>raw</type>
|
||||
</param>
|
||||
<param>
|
||||
<name>Pulse Duration</name>
|
||||
<key>pulse_duration</key>
|
||||
<value>4</value>
|
||||
<type>raw</type>
|
||||
</param>
|
||||
<param>
|
||||
<name>Samples/Symbol</name>
|
||||
<key>sps</key>
|
||||
<value>4</value>
|
||||
<type>raw</type>
|
||||
</param>
|
||||
<sink>
|
||||
<name>in</name>
|
||||
<type>byte</type>
|
||||
<vlen>1</vlen>
|
||||
<optional>1</optional>
|
||||
</sink>
|
||||
<source>
|
||||
<name>out</name>
|
||||
<type>complex</type>
|
||||
<vlen>1</vlen>
|
||||
<optional>1</optional>
|
||||
</source>
|
||||
<doc>Piotr Krysik
|
||||
GMSK Modulator for GSM
|
||||
</doc>
|
||||
<grc_source>gr-gsm/hier_blocks/transmitter/gsm_gmsk_mod.grc</grc_source>
|
||||
</block>
|
|
@ -55,6 +55,7 @@ from gsm_input import gsm_input
|
|||
from gsm_bcch_ccch_demapper import gsm_bcch_ccch_demapper
|
||||
from gsm_bcch_ccch_sdcch4_demapper import gsm_bcch_ccch_sdcch4_demapper
|
||||
from gsm_sdcch8_demapper import gsm_sdcch8_demapper
|
||||
from gsm_gmsk_mod import gsm_gmsk_mod
|
||||
from fn_time import *
|
||||
from txtime_bursts_tagger import *
|
||||
#from ctrl_if import *
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##################################################
|
||||
# GNU Radio Python Flow Graph
|
||||
# Title: GMSK Modulator for GSM
|
||||
# Author: Piotr Krysik
|
||||
# Description: GMSK Modulator for GSM
|
||||
# Generated: Wed Sep 20 21:12:04 2017
|
||||
##################################################
|
||||
|
||||
from gnuradio import blocks
|
||||
from gnuradio import digital
|
||||
from gnuradio import gr
|
||||
from gnuradio.analog import cpm
|
||||
from gnuradio.filter import firdes
|
||||
import grgsm
|
||||
|
||||
class gsm_gmsk_mod(grgsm.hier_block):
|
||||
|
||||
def __init__(self, BT=4, pulse_duration=4, sps=4):
|
||||
gr.hier_block2.__init__(
|
||||
self, "GMSK Modulator for GSM",
|
||||
gr.io_signature(1, 1, gr.sizeof_char*1),
|
||||
gr.io_signature(1, 1, gr.sizeof_gr_complex*1),
|
||||
)
|
||||
|
||||
##################################################
|
||||
# Parameters
|
||||
##################################################
|
||||
self.BT = BT
|
||||
self.pulse_duration = pulse_duration
|
||||
self.sps = sps
|
||||
|
||||
##################################################
|
||||
# Blocks
|
||||
##################################################
|
||||
self.digital_gmskmod_bc_0 = digital.gmskmod_bc(sps, pulse_duration, BT)
|
||||
self.digital_diff_decoder_bb_0 = digital.diff_decoder_bb(2)
|
||||
self.digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bf(([1,-1]), 1)
|
||||
self.blocks_tagged_stream_multiply_length_0 = blocks.tagged_stream_multiply_length(gr.sizeof_gr_complex*1, "packet_len", sps)
|
||||
self.blocks_float_to_char_0 = blocks.float_to_char(1, 1)
|
||||
|
||||
##################################################
|
||||
# Connections
|
||||
##################################################
|
||||
self.connect((self.blocks_float_to_char_0, 0), (self.digital_gmskmod_bc_0, 0))
|
||||
self.connect((self.blocks_tagged_stream_multiply_length_0, 0), (self, 0))
|
||||
self.connect((self.digital_chunks_to_symbols_xx_0, 0), (self.blocks_float_to_char_0, 0))
|
||||
self.connect((self.digital_diff_decoder_bb_0, 0), (self.digital_chunks_to_symbols_xx_0, 0))
|
||||
self.connect((self.digital_gmskmod_bc_0, 0), (self.blocks_tagged_stream_multiply_length_0, 0))
|
||||
self.connect((self, 0), (self.digital_diff_decoder_bb_0, 0))
|
||||
|
||||
def get_BT(self):
|
||||
return self.BT
|
||||
|
||||
def set_BT(self, BT):
|
||||
self.BT = BT
|
||||
|
||||
def get_pulse_duration(self):
|
||||
return self.pulse_duration
|
||||
|
||||
def set_pulse_duration(self, pulse_duration):
|
||||
self.pulse_duration = pulse_duration
|
||||
|
||||
def get_sps(self):
|
||||
return self.sps
|
||||
|
||||
def set_sps(self, sps):
|
||||
self.sps = sps
|
||||
self.blocks_tagged_stream_multiply_length_0.set_scalar(self.sps)
|
Loading…
Reference in New Issue