⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mod.v

📁 一种基于LUT的预失真方法。其中的一部分
💻 V
字号:

/*
module mod(ibase,qbase,qtran,itran,clk,rstn,rf);
input   signed  [15:0] ibase,qbase;
input   signed  [13:0] itran,qtran;
input   clk,rstn;
output  [11:0] rf;

reg     signed  [29:0] lposition,rposition;
reg		signed  [30:0] rfout;

assign	rf = {~rfout[30],rfout[26:16]};
always@(posedge clk or negedge rstn)
	if (!rstn)
		rfout <= 18'h0;
	else
		begin	
			lposition <= ibase*qtran;
			rposition <= qbase*itran;
			rfout <= {lposition[29],lposition} + {rposition[29],rposition};   
		end
endmodule
*/



module mod(ibase,qbase,qtran,itran,clk,rstn,rf);
input   signed  [15:0] ibase,qbase;
input   signed  [13:0] itran,qtran;
input   signed  clk,rstn;

output  [11:0] rf;

reg     signed  [17:0] lposition,rposition;
wire    signed  [11:0] rf;

reg		signed  [18:0] rfout;
wire	signed	[8:0] a,b,c,d;

assign	a = {ibase[15],ibase[14:7]};
assign	b = {qbase[15],qbase[14:7]};
assign	c = itran[13:5];
assign	d = qtran[13:5];

assign	rf = {~rfout[18],rfout[17:7]};
always@(posedge clk or negedge rstn)
	if (!rstn)
		rfout <= 18'h0;
	else
		begin	
			lposition <= a*d;
			rposition <= b*c;
			rfout <= {lposition[17],lposition} + {rposition[17],rposition}; 
//			rfout <= lposition + rposition;   
		end
endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -