Is there a way to write the value of variable width more than 32? casting it to 'image would truncate the value right? ro_integer will convert the value to the integer range
Yes, you can write a custom function that does it. I have one in the VHDLwhiz Membership (vhdlwhiz.com/membership) resource database. It has this prototype: function big_num_to_string(s : signed) return string; And there's an overloaded version for unsigned. I will give you a hint if you want to try for yourself: First, convert to BCD using the Double Dabble algorithm.
Concatenate multiple strings with the & operator. Check out my blog post for examples: vhdlwhiz.com/define-and-print-multiline-string-literals-in-vhdl/
Hi sir. Is there a way to design in VHDL to sample ADCs output and Store into a spram and represent them on 4 digits seven segment display at 62.2Hz refresh rate?
@@mubasheer5584 You'll have to piece it together yourself from examples that have parts of your project. I used digikey's examples a lot when I was new. www.digikey.com/eewiki/display/LOGIC/Home
By importing TEXTIO: use std.textio.all; and then using to_string(): TEST_PROC : process constant bv : bit_vector(31 downto 0) := x"AABBCCDD"; begin report to_hstring(bv); -- Print as hex report to_string(bv); -- Print as binary wait; end process; By the way, you should join VHDLwhiz's Facebook group where you can ask questions like this one and participate in the discussion with the > 10k other members! facebook.com/groups/vhdlwhiz/
i am new in digital design, but verilog seems much more productive. i can't think a reason to use vhdl except that is popular ...
Helped me a lot too
great! it helped me a lot
Is there a way to write the value of variable width more than 32? casting it to 'image would truncate the value right? ro_integer will convert the value to the integer range
Yes, you can write a custom function that does it. I have one in the VHDLwhiz Membership (vhdlwhiz.com/membership) resource database.
It has this prototype:
function big_num_to_string(s : signed) return string;
And there's an overloaded version for unsigned.
I will give you a hint if you want to try for yourself: First, convert to BCD using the Double Dabble algorithm.
How to plot internal signals in vhdl ? Can you plot the values you printed?
This is how you do it:
th-cam.com/video/wNlEaaNTxu8/w-d-xo.html
thanks bro
How can i print multiple value with one statement?
Concatenate multiple strings with the & operator. Check out my blog post for examples: vhdlwhiz.com/define-and-print-multiline-string-literals-in-vhdl/
Hi sir. Is there a way to design in VHDL to sample ADCs output and Store into a spram and represent them on 4 digits seven segment display at 62.2Hz refresh rate?
It sure can be done.
Are there any working example for this?
@@mubasheer5584 You'll have to piece it together yourself from examples that have parts of your project. I used digikey's examples a lot when I was new.
www.digikey.com/eewiki/display/LOGIC/Home
how can I print bit_vector?
By importing TEXTIO:
use std.textio.all;
and then using to_string():
TEST_PROC : process
constant bv : bit_vector(31 downto 0) := x"AABBCCDD";
begin
report to_hstring(bv); -- Print as hex
report to_string(bv); -- Print as binary
wait;
end process;
By the way, you should join VHDLwhiz's Facebook group where you can ask questions like this one and participate in the discussion with the > 10k other members!
facebook.com/groups/vhdlwhiz/