[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
相关推荐
hahaha60165 小时前
Xilinx 325T FPGA 中的 GT(GTP 或 GTX)收发器和普通 LVDS 接口的差模和共模电压
fpga开发
hahaha601611 小时前
FPGA没有使用的IO悬空对漏电流有没有影响
fpga开发
贝塔实验室1 天前
FPGA 动态重构配置流程
驱动开发·fpga开发·硬件架构·硬件工程·射频工程·fpga·基带工程
GateWorld1 天前
《从零掌握MIPI CSI-2: 协议精解与FPGA摄像头开发实战》-- CSI-2 协议详细解析 (一)
fpga开发·mipi csi2
思尔芯S2C1 天前
思尔芯携手Andes晶心科技,加速先进RISC-V 芯片开发
人工智能·科技·fpga开发·risc-v·debugging·prototyping·soc validation
tiantianuser1 天前
RDMA简介5之RoCE v2队列
fpga开发·verilog·fpga·rdma·高速传输·rocev2
碎碎思1 天前
打破延迟极限的 FPGA 机械键盘
fpga开发·计算机外设
ALINX技术博客2 天前
【新品解读】一板多能,AXRF49 定义新一代 RFSoC FPGA 开发平台
射频工程·fpga·amd·rfsoc·alinx
hahaha60162 天前
Flash烧录速度和加载配置速度(纯FPGA & ZYNQ)
fpga开发
hahaha60162 天前
ARINC818编解码设计FPGA实现
fpga开发