The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> Access bits of integer https://designers-guide.org/forum/YaBB.pl?num=1481478251 Message started by Gornarok on Dec 11th, 2016, 9:44am |
Title: Access bits of integer Post by Gornarok on Dec 11th, 2016, 9:44am Hello, Id like to make a modul that has integer as input and outputs its value as bits. Is it possible to access bits of integer? Or can I converse integer to bit vector? What would the best way to do it? I wanted to do something like this: Code:
|
Title: Re: Access bits of integer Post by Ken Kundert on Dec 13th, 2016, 5:38pm The easiest way to do this is to do a bit-wise and. So something like: Code:
Use of the transition function is also important. Use of genvars is now preferred over use of the generate statement, so you should probably use: Code:
-Ken |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |