VHDL Programming by Example phần 5

Bất kỳ đối tượng có thể được khai báo trong phần khai báo kiến trúc có thể được khai báo trong phần khai báo khối. Quá trình tổng hợp sản xuất một netlist cửa mức độ tối ưu hóa từ tất cả các yếu tố đầu vào. Trong các phần tiếp theo, mỗi của các đầu vào mô tả, và chúng tôi thảo luận về các quá trình tổng hợp chi tiết hơn. | 182 Chapter Seven no other mapping needs to take place. The default mapping causes the ports to match. What happens when the component ports do not match the entity being mapped to the component instance Without any further information the compiler cannot figure out which ports to map to which and produces an error. However more information can be passed to the compiler with the configuration port map clause. The configuration port map clause looks exactly like the component instantiation port map clause used in an architecture. The configuration port map clause specifies which of the component ports map to the actual ports of the entity. If the port names are different then the port map clause specifies the mapping. Let s change the port names of the inv component used in the previous example and see what the effect is in the configuration LIBRARY IEEE USE ENTITY inv IS PORT x IN std_logic y OUT std_lOgic END inv ARCHITECTURE behave OF inv IS BEGIN y NOT x AFTER 5 ns END behave CONFIGURATION invcon OF inv IS FOR behave END FOR END invcon The entity and architecture for decode stays exactly the same including the component declaration. The configuration however needs to add the port map clause as shown in the following example CONFIGURATION decode_map_con OF decode IS FOR structural FOR I1 inv USE ENTITY behave PORT MAP x a y b END FOR FOR I2 inv USE ENTITY behave PORT MAP x a y b END FOR FOR ALL and3 USE ENTITY behave Configurations 183 END FOR END FOR END decode_map_con The port map clause maps the port names of the component declarations called the formal ports to the port names of the entities from the library. The term used for the ports of the entities from the library being mapped are actuals. The ports are mapped using named association. The rules for mapping ports using named association in the configuration port map clause are the same rules as used in the component instantiation port map clause. In the

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
Đã 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.