Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Decimal to Hexadecimal conversion in Verilog!

Status
Not open for further replies.

UFK

Member level 3
Joined
Mar 8, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Location
Pakistan
Activity points
1,728
Hi all

can someone please help me write a Verilog code for converting a given value in decimal to hexadecimal. My code computes a value 'T' after some math calc. This value T must further be used in the code in hex format. How can i do that?

Thanks
 

how many bits of decimal number u are getting? and from which kind of interface...? If you are getting decimal from software its better to convert it in software and take it on FPGA in hex form only....
 

Hii

I am using $readmemh to read hex values from a text file. Alot of these hex values are negative i.e. in the format FFFFFFF2. How do i read these values? Verilog treats them as positive!
Please help me
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top