introduce HDL and give some examples about the Verilog language
来源:互联网 发布:联通3g网络速度 编辑:程序博客网 时间:2024/06/05 08:04
1. Overview of HDLs
HDL is hardware description language is means that it is a language to describe hardware.
HDLs have two main styles: Verilog and VHDL. Verilog: is C-based and VHDL is Ada based. Those days, Verilog is mainly used in electronic and industry owing to the programming is based on C language.
2. two different ways to specific the modules
Structural and Behavioral.
Figure 1
Structural : first it represent the simple element then connect those elements together.
For example: for figure 1
------------------------------------------------------------------
module figure1(x1,x2,x3,f);
input x1,x2,x3
output f;
and(g,x1,x2);
not (k,x2);
and(h,k,x3);
or(f,g,h);
endmodule
---------------------------------------------------------------------
When represent large circuits, we should use Behavioral which still has two types: logic expression and procedural statements.
for logic expression: the statements are concurrent
------------------------------------------------------------------------
module figure1(x1,x2,x3,f);
input x1,x2,x3;
output f;
assign f=(x1 & x2)|(~x2 & x3);
endmodule
-------------------------------------------------------------------------
for procedural statements: the statments should access in order, so it needalways block
-------------------------------------------------------------------------
module figure1(x1,x2,x3,f);
input x1,x2,x3;
output f;
reg f;
always @(x1 or x2 or x3)
if(x2==1)
f=x1;
else
f=x3;
endmodule
-------------------------------------------------------------------------
阅读全文
1 0
- introduce HDL and give some examples about the Verilog language
- Some points about postback and multi-language drop down list
- Some examples about perl expression
- Verilog HDL Syntax And Semantics
- #Introduce about argc and *argv[]
- Some thought about "The Parallel ADT and Algorithms"(part one)
- Some things about the ASCII,Unicode and UTF-8
- Some important things about C language
- Design And Tool Flow (of Verilog HDL)
- Verilog HDL Syntax And Semantics Part-I
- Verilog HDL Syntax And Semantics Part-II
- Verilog HDL Syntax And Semantics Part-III
- Task And Function (of Verilog HDL)
- System Task and Function (of Verilog HDL)
- some record about the board
- Some understanding about the MVC
- Some notes about the time
- About the struts2 some problem
- JavaScript 面向对象(二)对象和 JSON 的区别
- node.js的node_modules文件和文件夹中设置入口文件
- 彻底理解ThreadLocal
- 如何成为当下合格的算法工程师?
- python3中可选参数的灵活运用/内置函数与函数的区别
- introduce HDL and give some examples about the Verilog language
- 事务处理后执行耗时线程
- python进阶
- 剑指offer-8- Python实现旋转数组的最小数
- 《Handling Cold-Start Problem in Review Spam Detection by Jointly Embedding Texts and Behaviors》阅读笔记
- 快速线性筛选法求素数(质数)
- bzoj1085 [SCOI2005]骑士精神 【迭代加深搜索】
- ES Format 介紹
- hdu1026 BFS+路径保存