当前位置:网站首页>FPGA majority voter (including code)
FPGA majority voter (including code)
2022-07-20 09:56:00 【Juanshi】
Majority voter refers to a decision in which most people agree, that is “1”, The event is “1”, Similar to the previous raise your hand A vote , But now we use electronic means to realize , It is mainly used to express whether the participants are in favor or right , You can quickly calculate the voting results .
If there is 3 Inputs abc, Output is f, The truth table is as follows :
Use Karnaugh map to simplify ( The explanation of Karnaugh map can be referred to Master Karnaugh map simplification in one minute _ Juanshi's blog -CSDN Blog )
In the end, we got the result that f=ab+bc+ac
Start writing code :
module most(
input a,
input b,
input c,
output f
);
assign f=a&b|a&c|b&c;
endmodule
Test code :
In limine a=1,b=1,c=0
The back is called a=0,b=1,c=0
module TB_most(
);
reg a;
reg b;
reg c;
wire f;
most inst_most(
.a(a),
.b(b),
.c(c),
.f(f)
);
initial begin
a=1;
b=1;
c=0;
#20;
a=0;
b=1;
c=0;
end
endmodule
According to the test results In limine f=1, after f=0
Majority voter complete !
On the basis of this , A majority voter that can increase the number of people
边栏推荐
- vivado工程版本升级时相关IP版本IP Status显示Using cached IP results
- vivado2020在编译过程中报错总结
- Automatic nucleic acid extraction instrument based on ARM core board
- E2EC: An End-to-End Contour-based Method for High-Quality High-Speed Instance Segmentation
- Hard core strength! Feiling Ti Sitara am62x series-335x classic continuation
- Summary of errors reported during compilation of vivado2020
- FPGA -- detailed explanation of the principle of displaying images with VGA timing (2)
- 基于循环卷积的一维小波变换程序验证(C语言)
- [BOM] first knowledge of BOM~
- 三极管串联线性稳压电路原理详解及Multisim仿真
猜你喜欢
用LS1028A开发板输出PWM方波
基于飞凌NXP i.MX6ULL的无线网络测试
How to understand the freezing network parameters in the mindscore official website tutorial? Can you explain it?
【HAL库】串口通信
Code audit system
[mindspore] [Lite end-to-side training reasoning] mindspore lit runs the lenet training example code according to the instructions and reports an error
Win10系统安装ISE14.7后出现软件闪退及驱动不能正常安装问题
Detailed explanation of tunnel and agent usage in SSH protocol
[Lora & nb IOT] current situation analysis
Many new features of ktor2.0 were thought of a year ago and have been implemented in the project
随机推荐
STM32 CubeIDE 断点失效的解决方法
FreeRTOS线程安全、中断安全的printf实现方式
This paper interprets DNA binding site prediction using a deep learning method
Mysql45 talking about reading notes line lock (7)
Default password of common devices
“嵌入式智能化”为医疗设备不断赋能
i. Mx8mp development board porting USBWiFi rtl8192eu driver
Vivado2018.2 version with PS side configuration (BD) when calling Modelsim simulation: (vlog-13006) could not find the package (sc_util_v1_0_3_pkg)
Interpretation of text compression aided transformer encoding
FPGA -- detailed explanation of the principle of displaying images with VGA timing (2)
FPM生成封装时关联Allegro打开后无法生成封装问题解决办法
Quanzhi t507 realizes the whole process of SPI to can
Least square linear fitting and its code implementation (C language)
First hand evaluation of Reza g2l core board and development board
全志T507去掉IO扩展芯片,保留扩展引脚功能
Log access development with one person per day and nine people per day -- project development practice based on instruction set Internet of things operating system
How to put a "platform" into a small box? (Part 2) technical realization
This paper interprets "semi supervised medical image segmentation with local contrast loss based on pseudo label self training"
vulnhub 靶机 GOLDENEYE: 1
內網滲透隧道技術的相關知識