📄 rcosflt_lookup.v
字号:
`timescale 1ns / 1ps//////////////////////////////////////////////////////////////////////////////////// Company: // Engineer: // // Create Date: 10:37:35 12/05/2007 // Design Name: // Module Name: rcosflt_lookup // Project Name: // Target Devices: // Tool versions: // Description: //// Dependencies: //// Revision: // Revision 0.01 - File Created// Additional Comments: ////////////////////////////////////////////////////////////////////////////////////module rcosflt_lookup(clk, nrst, din, dout); input clk; input nrst; input din; output[15:0] dout; //////////////////////////////////////////////////////////////////////////////// wire[15:0] dout; wire [7:0] sram_addr; reg [5:0] data_addr; reg [1:0] smp_addr; reg [1:0] smp_addr_fore; wire[15:0] sram_dout; wire sram_clk; assign sram_addr[7:0] = {data_addr[5:0],smp_addr[1:0]}; assign dout = sram_dout; assign sram_clk = clk; /////////////////////////////////////////////////////////////////////////////
always@(posedge clk) begin if(!nrst) begin data_addr <=6'b000000; smp_addr <= 2'b00; smp_addr_fore <= 2'b00; end else begin smp_addr_fore <= smp_addr; if((smp_addr == 2'b11)) begin data_addr <= {din,data_addr[5:1]}; smp_addr <= 2'b0; end else smp_addr <= smp_addr + 1; end end
//////////////////////////////////////////////////////////////////////////////
/*always@(posedge clk) begin if(!nrst) begin sram_addr <=8'b00000000; end else begin
sram_addr <= sram_addr + 1; end end*/
////////////////////////////////////////////////////////////////////////////// //ram write or read sram_ctrl sram_ctrl_inst( .addr(sram_addr), .clk(sram_clk), .dout(sram_dout) );endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -