FPGA
来源:互联网 发布:apache开启rewrite 编辑:程序博客网 时间:2024/05/08 18:59
说实话,我们在FPGA上干什么?按照别人的规则做堆叠。
请看下面三个案例,你是否遇到:
module regwrite(
output reg [3:0] rout,
input clk, in,
input [3:0] ctrl);
always @(posedge clk) begin
case(ctrl[3:0])
4'b1000: rout[3] <= in;
4'b0100: rout[2] <= in;
4'b0010: rout[1] <= in;
4'b0001: rout[0] <= in;
default:;
endcase
end
endmodule
综合后的图:
2:
module regwrite(
output reg [3:0] rout,
input clk, in,
input [3:0] ctrl);
always @(posedge clk) begin
if(ctrl[0]) rout[0] <= in;
if(ctrl[1]) rout[1] <= in;
if(ctrl[2]) rout[2] <= in;
if(ctrl[3]) rout[3] <= in;
end
endmodule
综合后图片:
3.
module regwrite(
output reg [3:0] rout,
input clk, in,
input [3:0] ctrl);
always @(posedge clk)
if(ctrl[0]) rout[0] <= in;
else if(ctrl[1]) rout[1] <= in;
else if(ctrl[2]) rout[2] <= in;
else if(ctrl[3]) rout[3] <= in;
endmodule
综合后结果:
上述三种结果,希望曾经认为的想法做个纠正。
- FPGA
- FPGA
- FPGA
- fpga
- fpga
- FPGA
- FPGA
- FPGA
- FPGA
- FPGA
- FPGA
- FPGA
- FPGA
- FPGA
- FPGA 简介
- FPGA 简介
- FPGA简介
- FPGA 简介
- x264代码剖析(七):encode()函数之x264_encoder_encode()函数
- hdu1717(小数化分数)
- 进度条(ProgressBar)的功能与用法
- 会话-Cookie
- 对称矩阵与压缩存储算法(java实现)
- FPGA
- dubbox开发rest+json指南
- 知识库
- Android开发之多线程编程Thread和Runnable使用
- C++的流输入输出与C的scanf,printf的区别在哪里?
- SpringMVC文件打包下载
- WPF 启动程序弹出函数求值已禁用,因为内存出现内存不足异常
- PDF转换为HTML5的四种方式
- git基础:5.远程仓库