![]() ![]() Reg can be used to create registers in procedural blocks. Henceforth, they are assigned values using continuous assignment statements. Wire elements must be continuously driven by something, and cannot store a value. While procedural assignment statements refers to assigning values to reg, integer etc., but not wires(nets). Procedural blocks refers to always, always_ff, always_comb, always_latch, initial etc. The next difference between reg/wire and logic is that logic can be both driven by assign block, output of a port and inside a procedural block like this logic a Logic data type simply assigns the last assignment value. Reg/Wire data types give X if multiple drivers try to drive them with different values. It has a last assignment wins behavior in case of multiple assignments (which implies it has no hardware equivalence). Logic data type doesn't permit multiple drivers. ![]() The idea behind is having a new data type called logic which at least doesn't give an impression that it is hardware synthesizable. System Verilog's logic data type addition is to remove the above confusion. So the next question is what is this logic data type and how it is different from our good old wire/reg.Īs we have seen, reg data type is bit mis-leading in Verilog. SystemVerilog added a new data type called logic to them. Wires and Regs are present from Verilog timeframe. They can be synthesized to FF, latch or combinatorial circuit. They retain their value till next value is assigned to them (not through assign statement). They represent data storage elements in Verilog/SystemVerilog. They need to be driven by either continuous assign statement or from a port of a module.Ĭontrary to their name, regs don't necessarily correspond to physical registers. Wires are used for connecting different elements. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |