目录
目录
3.vector concatenation operator 向量连接运算符
一、basics
1.simple wire
module top_module( input in, output out );
assign out=in;
endmodule
2.four wires
module top_module(
input a,b,c,
output w,x,y,z );
assign w=a;
assign x=b;
assign y=b;
assign z=c;
endmodule
3. notgate
module top_module( input in, output out );
assign out=~in;
endmodule
表达式 表达式包含操作数和操作符。
操作数 可以是任意的数据类型。
操作符
1)算术操作符
单目运算:+ - ! ~
双目运算:乘(*)、除(/)、加(+)、减(-)、求幂(**)、取模(%)
2)关系操作符
大于(>),小于(<),大于等于(>=),小于等于(<=)
3)等价操作符
相等(==),逻辑不等(!=),全等(===),非全等(!==)
4)逻辑操作符
&&(逻辑与), ||(逻辑或),!(逻辑非)
5)按位操作符
反(~),与(&),或(