作业帮 > 综合 > 作业

求Verilog HDL程序

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/28 00:07:52
求Verilog HDL程序
1编写求补码的Verilog HDL程序,输入是带符号的8位二进制数.
2有一个比较电路,当输入的一位8421BCD码大于4时,输出为1,否则为0.试编写出Verilog HDL程序.
1
module sig2component(clk,rst_n,din,dout)
input clk;
input rst_n;
input [7:0] din;
output [7:0] dout;
always @ (posedge clk or negedge rst_n)
if (!rst_n)
dout