Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

String in VHDL Waveform

How can I print a string in VHDL waveform?
-> like here

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

A string is no different from other types of signals, so you can do like:

library ieee;
use ieee.std_logic_1164.all;

entity tb is
end entity;

architecture sim of tb is

  signal info : string(1 to 5);

begin

  process is
  begin
    info <= "Hello";
    wait for 1 us;
    info <= "VHDL ";
    wait for 1 us;
    info <= "world";
    wait for 1 us;
    info <= "!!!  ";
    wait for 1 us;
    wait;
  end process;

end architecture;

Simulation in Intel Quartus ModelSim Starter Edition (free) then gives:

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading