TAILIEUCHUNG - Useful Modeling Techniques part 1

[ Team LiB ] Procedural Continuous Assignments We studied procedural assignments in Section , Procedural Assignments. Procedural assignments assign a value to a register. | Team LiB Procedural Continuous Assignments We studied procedural assignments in Section Procedural Assignments. Procedural assignments assign a value to a register. The value stays in the register until another procedural assignment puts another value in that register. Procedural continuous assignments behave differently. They are procedural statements which allow values of expressions to be driven continuously onto registers or nets for limited periods of time. Procedural continuous assignments override existing assignments to a register or net. They provide an useful extension to the regular procedural assignment statement. assign and deassign The keywords assign and deassign are used to express the first type of procedural continuous assignment. The left-hand side of procedural continuous assignments can be only be a register or a concatenation of registers. It cannot be a part or bit select of a net or an array of registers. Procedural continuous assignments override the effect of regular procedural assignments. Procedural continuous assignments are normally used for controlled periods of time. A simple example is the negative edge-triggered D-flipflop with asynchronous reset that we modeled in Example 6-8. In Example 9-1 we now model the same D_FF using assign and deassign statements. Example 9-1 D-Flipflop with Procedural Continuous Assignments Negative edge-triggered D-flipflop with asynchronous reset module edge_dff q qbar d clk reset Inputs and outputs output q qbar input d clk reset reg q qbar declare q and qbar are registers always @ negedge clk assign value of q qbar at active edge of clock. begin q d qbar d end always @ reset Override the regular assignments to q and qbar whenever reset goes high. Use of procedural continuous assignments. if reset begin if reset is high override regular assignments to q with the new values using procedural continuous assignment. assign q 1 b0 assign qbar 1 b1 end else begin If reset goes low remove the .

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.