Hello world VHDL

OP (Company: University) #4216501
Rate this post
• ▲ useful
▼ not useful
Hello. I'm doing some test with Vivado. I imported the following VHDL 
code:
1
entity hello_world is
2
end;
3

4
architecture hello_world of hello_world is
5
begin
6
  stimulus : PROCESS
7
  begin
8
    assert false report "Hello World"
9
    severity note;
10
    wait;
11
  end PROCESS stimulus;
12
end hello_world;

The code seems correct but I get design error empty. Any idea?

Thanks
Guest #4257098
Rate this post
• ▲ useful
▼ not useful
Howdy Junior, u are welcome -

Junior H. wrote:
> Hello. I'm doing some test with Vivado. I imported the following VHDL
> code:
>
1
entity hello_world is                         -- test bench ok
2
end;
3
 
4
architecture hello_world of hello_world is    -- declarations place ok
5
                                              -- [q] where are there ?
6
 begin                                        -- code place ok
7
   stimulus : PROCESS                         -- process ok
8
   begin                                      --
9
     assert false report "Hello World"        -- ?
10
     severity note;
11
     wait;
12
   end PROCESS stimulus;
13
 end hello_world;



> The code seems correct but I get design error empty. Any idea?

where you want 'report' your "Hello World" ?
and is this ok, only if process goes false?
you will never get a message if process was successfull ;-)


  assertion_statement ::= [ label : ] assertion ;


  assertion ::=
  ASSERT condition
    [ REPORT expression ]
    [ SEVERITY expression ];





have a look to a shool example :
1
-- hello_world.vhdl  Just output to the screen
2
--                   This should be independent of whose VHDL you use
3
--                   When using some vendors GUI, you have a learning curve
4
--                   Using portable VHDL, it will run on all vendors
5
--                   with implementations conforming to IEEE Std. 1076-1993
6

7

8
entity hello_world is  -- test bench (top level like "main")
9
end entity hello_world;
10

11
library STD;                            -- you don't need STD, it is automatic
12
library IEEE;                           -- but may need other libraries
13
use IEEE.std_logic_1164.all;            -- basic logic types
14
use STD.textio.all;                     -- basic I/O
15
use IEEE.std_logic_textio.all;          -- I/O for logic types
16

17
architecture test of hello_world is -- where declarations are placed
18
  subtype word_32 is std_logic_vector(31 downto 0);  -- simple name
19
  signal four_32 : word_32 := x"00000004";           -- just four in hex
20
  signal counter : integer := 1;                     -- initialized counter
21
begin  -- where parallel code is placed
22
  my_print : process is                  -- a process is parallel
23
               variable my_line : line;  -- type 'line' comes from textio
24
             begin
25
               write(my_line, string'("Hello World"));   -- formatting
26
               writeline(output, my_line);               -- write to "output"
27
               write(my_line, string'("four_32 = "));    -- formatting 
28
               hwrite(my_line, four_32); -- format type std_logic_vector as hex
29
               write(my_line, string'("  counter= "));
30
               write(my_line, counter);  -- format 'counter' as integer
31
               write(my_line, string'(" at time "));
32
               write(my_line, now);                     -- format time
33
               writeline(output, my_line);              -- write to display
34
               wait;
35
             end process my_print;
36
end architecture test;
37

38

39
-- compile/analyze this file, then simulate
40
-- the output on the screen should contain the following lines (without "-- ")
41

42
-- Hello World
43
-- four_32 = 00000004  counter= 1 at time 0 NS

attached is a Vivado Hello World example

best wishes
rudi ;-)
Attached files:
Guest #4257111
Rate this post
• ▲ useful
▼ not useful
push#

perhabs you can have a look to a simply hello world, like this:
1
use std.textio.all;
2

3
entity hello_world is
4
end hello_world;
5

6
architecture behaviour of hello_world is
7
begin
8
process
9
begin
10
write (output, String'("Hello world!"));
11
wait;
12
end process;
13
end behaviour;

;-)

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.