- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
What is the diffrence between Verilog reg and wire?
Example:wire abs_select_high;
reg int2_d;
- Balises:
- Intel® Quartus® Prime Software
Lien copié
2 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
reg is registerd wire isn't.
Wire can't hold a value, only connect regs- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
A reg can be a register, but it can also be a wire. The way I've understood it is that a reg is in an always statement, which can be clocked but doesn't have to be, while a wire is assigned outside, either hooking blocks together or with an assign statement.
Note that system verilog has a type called "logic" which is basically the same thing as a reg. It's nice in that if you have an always statement that isn't clocked, so registers are not being inferred, you can use the type logic instead of reg. It also has new types always_comb, always_ff and always_latch. I find all of these things more useful for the beginner than the experienced verilog designer. They might help.
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable