The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> using binary numbers in VerilogA https://designers-guide.org/forum/YaBB.pl?num=1265985977 Message started by hali on Feb 12th, 2010, 6:46am |
Title: using binary numbers in VerilogA Post by hali on Feb 12th, 2010, 6:46am Hi.Can anyone tell me that can I use binary numbers in verilog A .e.g can i assign( integer i=0100); if no wat is the way to use binary numbers in verilog A? :-[ |
Title: Re: using binary numbers in VerilogA Post by pancho_hideboo on Feb 12th, 2010, 7:56am hali wrote on Feb 12th, 2010, 6:46am:
hali wrote on Feb 12th, 2010, 6:46am:
i = 0*(1<<3) + 1*(1<<2) + 0*(1<<1) + 0*(1<<0); Quote:
|
Title: Re: using binary numbers in VerilogA Post by Andrew Beckett on Feb 15th, 2010, 9:23am Slightly confused by Pancho Hideboo's response, as in Verilog you can do: i=4'b1010; to assign a 4 bit binary number to an integer. Regards, Andrew. |
Title: Re: using binary numbers in VerilogA Post by hali on Feb 15th, 2010, 9:25am thanks pancho.Ur reply really helped me a lot:)thanks once again |
Title: Re: using binary numbers in VerilogA Post by pancho_hideboo on Feb 15th, 2010, 9:26am Andrew Beckett wrote on Feb 15th, 2010, 9:23am:
|
Title: Re: using binary numbers in VerilogA Post by Andrew Beckett on Feb 15th, 2010, 9:32am And you can do this in VerilogAMS (not spectre's VerilogA though): Code:
Regards, Andrew. |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |