尧图网络科技YAOTU DIGITAL 获取报价
获取报价
首页 / 资讯中心 / 文章详情

Verilog计数器中增减操作之资源占用示例

发布时间:2026/9/26 11:00:14

资讯中心
01
ARTICLE

Verilog计数器中增减操作之资源占用示例

Verilog计数器中增减操作之资源占用示例
安路Anlogic TD Release_2026.1_SP2器件选择EG4A20BG256方法1case语句module test( input clk,input rst_n,input sw,output reg [3:0] led ); always (posedge clk or negedge rst_n) if (!rst_n) led 0; else begin case (sw) 1: ledled1; default: ledled-1; endcase end endmodule方法2if语句module test( input clk,input rst_n,input sw,output reg [3:0] led ); always (posedge clk or negedge rst_n) if (!rst_n) led 0; else begin if (sw)ledled1; else ledled-1; end endmodule方法3条件运算符? :module test( input clk,input rst_n,input sw,output reg [3:0] led ); always (posedge clk or negedge rst_n) if (!rst_n) led 0; else begin ledsw?(led1):(led-1); end endmodule方法42*sw-1module test( input clk,input rst_n,input sw,output reg [3:0] led ); always (posedge clk or negedge rst_n) if (!rst_n) led 0; else begin ledled2*sw-1; end endmodule资源占用比较方法4占用资源最少方法notDFFMACRO_ADDMACRO_MUXlut4lut5case242331if242331? :2423312*sw-1142031
02
RELATED NEWS

相关资讯

更多网站建设与数字化升级内容

03
WHY YAOTU

想打造同款高转化官网?

懂行业、懂生意,从建站到增长一站式陪跑

◈

场景化定制

不做模板站,围绕你的业务场景量身设计,小众不撞款。

◐

营销型架构

以转化目标组织内容与路径,让官网真正带来询盘。

▲

全周期服务

设计、开发、运营、运维一体,上线只是开始。

免费获取你的建站方案

留下需求,专属顾问 24 小时内为你输出方案建议。