[HDLBits] Conditional

Given four unsigned numbers, find the minimum. Unsigned numbers can be compared with standard comparison operators (a < b). Use the conditional operator to make two-way min circuits, then compose a few of them to create a 4-way min circuit. You'll probably want some wire vectors for the intermediate results.

复制代码
module top_module (
    input [7:0] a, b, c, d,
    output [7:0] min);//
    wire [7:0] res1,res2;
	assign res1= a<b?a:b;
    assign res2= c<d?c:d;
    assign min=res1<res2?res1:res2;
    // assign intermediate_result1 = compare? true: false;

endmodule
相关推荐
hoiii1876 小时前
16APSK/32APSK调制解调MATLAB仿真实现
开发语言·matlab·fpga开发
我爱C编程7 小时前
【硬件片内测试】基于FPGA的BPSK扩频通信链路测试,包含帧同步,定时点,扩频伪码同步,信道,误码统计
fpga开发·帧同步·定时点·扩频伪码同步·bpsk扩频
runningshark7 小时前
【FPGA】使用高云FPGA与stm32进行FMC通信协议
fpga开发
知识充实人生15 小时前
Xilinx 7系列器件特性对比
fpga·xilinx·赛灵思·7系列·器件资源对比
最遥远的瞬间1 天前
四、Xilinux在线调试方法和XADC的使用
fpga开发
tobias.b1 天前
408真题解析-2010-12-计组-程序执行时间
单片机·嵌入式硬件·fpga开发·计算机考研·408真题解析
洋洋Young2 天前
【Xilinx FPGA】7 Series 收发器架构与时钟设计
fpga开发·xilinx
unicrom_深圳市由你创科技2 天前
XDMA 技术及在 Windows 平台的应用实践
fpga开发
s09071362 天前
【Agent】Claude code辅助verilog编程
fpga开发
3有青年2 天前
altera fpga agilex 5 连接到HVIO BANK上的参考时钟,是否可以作为HSIO BANK内部IOPLL的输入时钟
fpga开发