Skip to content

Commit 723e0a3

Browse files
committed
typos
1 parent bdc4b77 commit 723e0a3

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

access/complete.vhd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ entity complete is
22
end entity;
33

44

5+
-- Access type works similarly to pointers in other programming languages like
6+
-- C. New allocation is made with new keyword and null can be assigned to
7+
-- pointer to mean unallocated variable.
58
architecture tb of complete is
69

710
-- Declare record type.

access/incomplete.vhd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ end entity;
33

44

55
-- Incomplete type declaration must be used to be able to declare other types
6-
-- before the actual declaration. This example use record queu_element which can
7-
-- point to ohter queu_element with link field.
6+
-- before the actual declaration. This example use record queue_element which can
7+
-- point to other queue_element with link field.
88
architecture tb of incomplete is
99

10-
-- Declare incomplete type queu_element.
11-
type queu_element;
12-
-- Declare pointer access type of queu_element.
13-
type pointer is access queu_element;
14-
-- Complete queu_element type declaration as a record type.
10+
-- Declare incomplete type queue_element.
11+
type queue_element;
12+
-- Declare pointer access type of queue_element.
13+
type pointer is access queue_element;
14+
-- Complete queue_element type declaration as a record type.
1515
-- Incomplete type declaration is used to declare pointer type and record
1616
-- type link field. In order to declare both types, incomplete type
17-
-- queu_element must be used.
18-
type queu_element is record
17+
-- queue_element must be used.
18+
type queue_element is record
1919
value : integer;
2020
link : pointer;
2121
end record;
@@ -27,15 +27,15 @@ begin
2727
test : process(end_simulation)
2828
-- Access types are allocated with new keyword and can only be allocated
2929
-- only to variables.
30-
variable element1 : pointer := new queu_element;
30+
variable element1 : pointer := new queue_element;
3131
-- Null keyword means unallocated variable.
3232
variable element2 : pointer := null;
3333
begin
3434
-- Set element1 value.
3535
element1.value := 1;
3636

3737
-- Create new element2 and set element1 to point to it.
38-
element2 := new queu_element;
38+
element2 := new queue_element;
3939
element2.value := 2;
4040
element1.link := element2;
4141

0 commit comments

Comments
 (0)