2、BDS B1I信号载波混频器Verilog 源码

本文介绍了BDSB1I信号载波混频器的Verilog代码实现,该模块由Peter Mumford和Cheng Huaide共同开发,用于将输入信号与本地载波混合。文章详细解释了IF raw data和carrier的量化表示方法,以及输出信号的计算逻辑。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

\qquad 下面是BDS B1I信号载波混频器的Verilog代码(下载完整的HD-GR基带模块代码):

//                              -*- Mode: Verilog -*-
// Original filename : carrier_mixer.v
// Filename          : bds_carrier_mixer.v 
// Description       : Mix together the incomming signal with the local carrier. 
 
// Author            : Peter Mumford, UNSW, 2005 
// Author            : Cheng Huaide, turing321.com, 2015 (BDS & 1PPS - processing upgrade)
 
/* 
 The IF raw data and carrier are two bit quantities. 
 Each has a sign bit and a mag bit. 
 The IF_mag bit represents the values 1 and 3. 
 The carrier_mag bit represents the values 1 and 2. 
 
 The mix_mag is three bits representing the values 1,2,3,6 
 The mix_sign bit is 0 for negative, 1 for positive. 
 
 truth table 
 
 if_mag       | 0 0 1 1 | 
 carrier_mag  | 0 1 0 1 | 
 output bit: 
            0 | 1 0 1 0 | = not carrier_mag 
 
            1 | 0 1 1 1 | = if_mag or carrier_mag 
            2 | 0 0 0 1 | = if_mag and carrier_mag 
 -------------|---------| 
    value     | 1 2 3 6 | 
 
 if_sign      | 0 0 1 1 |  (0 = -ve, 1 = +ve) 
 carrier sign | 0 1 0 1 | 
 output sign: 
              | 1 0 0 1 |  = not( if_sign xor carrier_sign ) 
*/ 
/* 
	Copyright (C) 2007  Peter Mumford 
 
    This library is free software; you can redistribute it and/or 
    modify it under the terms of the GNU Lesser General Public 
    License as published by the Free Software Foundation; either 
    version 2.1 of the License, or (at your option) any later version. 
 
    This library is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    Lesser General Public License for more details. 
 
    You should have received a copy of the GNU Lesser General Public 
    License along with this library; if not, write to the Free Software 
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA 
*/ 
 
module bds_carrier_mixer (
	if_sign, if_mag, 
	carrier_sign, carrier_mag, 
	mix_sign, mix_mag); 

	input if_sign, if_mag, carrier_sign, carrier_mag; 
	output mix_sign; 
	output [2:0] mix_mag; 
 
	assign mix_mag[0] = !carrier_mag; 
	assign mix_mag[1] = if_mag | carrier_mag; 
	assign mix_mag[2] = if_mag & carrier_mag; 
	assign mix_sign = !(if_sign ^ carrier_sign); 
 
endmodule 
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值