文件名称:lookup_multi
- 所属分类:
- 图形图像处理(光照,映射..)
- 资源属性:
- [VHDL] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- stev*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
//4×4 查找表乘法器
module mult4x4(out,a,b,clk)
output[7:0] out
input[3:0] a,b
input clk
reg[7:0] out
reg[1:0] firsta,firstb
reg[1:0] seconda,secondb
wire[3:0] outa,outb,outc,outd
always @(posedge clk)
begin
firsta = a[3:2] seconda = a[1:0]
firstb = b[3:2] secondb = b[1:0]
end
lookup m1(outa,firsta,firstb,clk),
m2(outb,firsta,secondb,clk),
m3(outc,seconda,firstb,clk),
m4(outd,seconda,secondb,clk) //模块调用-//4 × 4 multiplier lookup table module mult4x4 (out, a, b, clk) output [7:0] out input [3:0] a, b input clk reg [7:0] out reg [1:0 ] firsta, firstb reg [1:0] seconda, secondb wire [3:0] outa, outb, outc, outd always @ (posedge clk) beginfirsta = a [3:2] seconda = a [1:0] firstb = b [3:2] secondb = b [1:0] endlookup m1 (outa, firsta, firstb, clk), m2 (outb, firsta, secondb, clk), m3 (outc, seconda, firstb, clk), m4 ( outd, seconda, secondb, clk)// module call
module mult4x4(out,a,b,clk)
output[7:0] out
input[3:0] a,b
input clk
reg[7:0] out
reg[1:0] firsta,firstb
reg[1:0] seconda,secondb
wire[3:0] outa,outb,outc,outd
always @(posedge clk)
begin
firsta = a[3:2] seconda = a[1:0]
firstb = b[3:2] secondb = b[1:0]
end
lookup m1(outa,firsta,firstb,clk),
m2(outb,firsta,secondb,clk),
m3(outc,seconda,firstb,clk),
m4(outd,seconda,secondb,clk) //模块调用-//4 × 4 multiplier lookup table module mult4x4 (out, a, b, clk) output [7:0] out input [3:0] a, b input clk reg [7:0] out reg [1:0 ] firsta, firstb reg [1:0] seconda, secondb wire [3:0] outa, outb, outc, outd always @ (posedge clk) beginfirsta = a [3:2] seconda = a [1:0] firstb = b [3:2] secondb = b [1:0] endlookup m1 (outa, firsta, firstb, clk), m2 (outb, firsta, secondb, clk), m3 (outc, seconda, firstb, clk), m4 ( outd, seconda, secondb, clk)// module call
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lookup_multi.v