TAILIEUCHUNG - Verilog Programming part 17

Procedural Assignments Procedural assignments update values of reg, integer, real, or time variables. | Procedural Assignments Procedural assignments update values of reg integer real or time variables. The value placed on a variable will remain unchanged until another procedural assignment updates the variable with a different value. These are unlike continuous assignments discussed in Chapter 6 Dataflow Modeling where one assignment statement can cause the value of the right-hand-side expression to be continuously placed onto the left-hand-side net. The syntax for the simplest form of procedural assignment is shown below. assignment variable_lvalue delay_or_event_control expression The left-hand side of a procedural assignment lvalue can be one of the following A reg integer real or time register variable or a memory element A bit select of these variables . addr 0 A part select of these variables . addr 31 16 A concatenation of any of the above The right-hand side can be any expression that evaluates to a value. In behavioral modeling all operators listed in Table 6-1 on page 96 can be used in behavioral expressions. There are two types of procedural assignment statements blocking and nonblocking. Blocking Assignments Blocking assignment statements are executed in the order they are specified in a sequential block. A blocking assignment will not block execution of statements that follow in a parallel block. Both parallel and sequential blocks are discussed in Section Sequential and Parallel Blocks. The operator is used to specify blocking assignments. Example 7-6 Blocking Statements reg x y z reg 15 0 reg_a reg_b integer count All behavioral statements must be inside an initial or always block initial begin x 0 y 1 z 1 Scalar assignments count 0 Assignment to integer variables reg_a 16 b0 reg_b reg_a initialize vectors 15 reg_a 2 1 b1 Bit select assignment with delay 10 reg_b 15 13 x y z Assign result of concatenation to part select of a vector count count 1 Assignment to an integer increment end In Example 7-6 the statement y 1 is executed .

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.