1、常见用法对比
VHDL | Verilog HDL | SystemC |
ENTITY | module | SC_MODULE |
process | SC_METHOD(method) | |
signal | sc_signal | |
output | inout | |
只有四值(0,1,x,z) | ||
integer/time/real | ||
assign(连续赋值语句,逻辑电路)/always(逻辑或者时序电路) | 进程 | |
initial | 构造函数 |
2、运算符对比
VHDL | SystemC | ||
逻辑运算符 | 位运算符 | 算术运算符 | |
A=B | A==B | ||
A/=B | A!=B | ||
not A | !A | ~A | |
A or B | A||B | A|B | |
A and B | A&&B | A&B | |
A nor B | !(A||B) | ||
A nand B | !(A&&B) | ~(A&B) | |
A xor B | (A||B) &&( !(A&&B)) | A^B | |
A xnor B | !((A||B) &&( !(A&&B))) | ~(A^B) | |
A sll value | A<<value | ||
A srl value | A>>value | ||
A ram B | A%B | ||
A ** B | pow(A,B) |
3、数据类型比较
VHDL | SystemC |
boolean | bool |
bit | sc_bit |
std_logic | sc_logic |
std_ulogic | sc_logic |
charactor | char |
integer | int |
natural | unsigned |
positive | unsigned |
signed | sc_int |
unsigned | sc_uint |
bit_vector | sc_bv |
std_logic_vector/std_ulogic_vector | sc_lv |