The VHDL Cookbook phần 2

Như đã đề cập tại mục , hành vi của một module có thể được mô tả trong hình thức ngôn ngữ lập trình. Chương này mô tả các cơ sở trong VHDL được rút ra từ các tiết mục ngôn ngữ lập trình quen thuộc. Nếu bạn đã quen thuộc với các ngôn ngữ lập trình Ada, bạn sẽ nhận thấy sự giống nhau với ngôn ngữ đó. Đây là một tiện nghi và phiền toái. | 2. VHDL is Like a Programming Language As mentioned in Section the behaviour of a module may be described in programming language form. This chapter describes the facilities in VHDL which are drawn from the familiar programming language repertoire. If you are familiar with the Ada programming language you will notice the similarity with that language. This is both a convenience and a nuisance. The convenience is that you don t have much to learn to use these VHDL facilities. The problem is that the facilities are not as comprehensive as those of Ada though they are certainly adequate for most modeling purposes. . Lexical Elements . Comments Comments in VHDL start with two adjacent hyphens -- and extend to the end of the line. They have no part in the meaning of a VHDL description. . Identifiers Identifiers in VHDL are used as reserved words and as programmer defined names. They must conform to the rule identifier letter underline letter_or_digit Note that case of letters is not considered significant so the identifiers cat and Cat are the same. Underline characters in identifiers are significant so This_Name and ThisName are different identifiers. . Numbers Literal numbers may be expressed either in decimal or in a base between two and sixteen. If the literal includes a point it represents a real number otherwise it represents an integer. Decimal literals are defined by decimal_literal integer . integer exponent integer digit underline digit exponent E integer E - integer Some examples are 0 1 123_456_789 987E6 -- integer literals -- real literals Based literal numbers are defined by based_literal base based_integer . based_integer exponent base integer based_integer extended_digit underline extended_digit 2-1 2-2 The VHDL Cookbook extended_digit digit letter The base and the exponent are expressed in decimal. The exponent indicates the power of the base by which the literal is multiplied. The letters A to F upper or .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
34    95    1    03-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.