TAILIEUCHUNG - SystemVerilog For Design phần 9

Testbench gửi và nhận các phương pháp cho giao diện Utopia được đóng gói trong giao diện UtopiaMethod. Ví dụ 11-6: UtopiaMethod giao diện cho đóng gói phương pháp thử nghiệm UtopiaMethod giao diện nhiệm vụ tự động Khởi (); Send endtask nhiệm vụ tự động | Chapter 11 A Complete Design Modeled with SystemVerilog 321 Testbench The testbench send and receive methods for the Utopia interface are encapsulated in the UtopiaMethod interface. Example 11-6 UtopiaMethod interface for encapsulating test methods interface UtopiaMethod task automatic Initialise endtask task automatic Send input ATMCellType Pkt input int PortID static int PacketID PacketID PortID PacketID iterate through bytes of packet deasserting Start Of Cell indicater @ negedge 1 for int i 0 i 52 i begin If not enabled loop while 1 b1 @ negedge Assert Start Of Cell indicater assert enable send byte 0 i 0 i 0 1 b1 1 b0 i @ negedge end 8 bx 0 endtask task automatic Receive input int PortID ATMCellType Pkt 1 while 1 b1 1 b0 @ negedge for int i 0 i 52 i begin If not enabled loop while 1 b0 @ negedge i @ negedge end 322 SystemVerilog for Design 0 Write Rxed data to logfile ifdef verbose write Received packet at port 0d from port 0d PKT 0d n PortID PortID 0 1 4 endif endtask endinterface The testbench HostWrite and HostRead methods for the CPU interface are encapsulated in the CPUMethod interface. Example 11-7 CPUMethod interface for encapsulating test methods interface CPUMethod task automatic Initialise_Host 1 0 0 1 1 1 endtask task automatic HostWrite int a CellCfgType d configure 10 a d 0 10 0 while 0 10 10 1 1 while 0 10 endtask task automatic HostRead int a output CellCfgType d 10 a 0 10 0 while 0 10 10 d 1 1 .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.