[an error occurred while processing this directive]
Внутри (источник CSCI 320 Computer Architecture Handbook on Verilog HDL By Dr. Daniel C. Hyde Computer Science Department Bucknell University Lewisburg, PA 17837 Copyright 1995 By Daniel C. Hyde August 25, 1995 Updated August 23, 1997) с.17
(«Телесистемы»: Конференция «Программируемые логические схемы и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено Victor® 04 июня 2003 г. 15:34
В ответ на: Предвижу крики радости типа "еще один баран среди нас!!!" но попробую задать дилетантский вопрос : отправлено Пытливый 04 июня 2003 г. 14:40

The Verilog language has two forms of the procedural assignment statement: blocking and nonblocking.
The two are distinguished by the = and <= assignment operators. The blocking assignment statement (= operator) acts much like in traditional programming languages. The whole statement is done before control passes on to the next statement. The non-blocking (<=
operator) evaluates all the right-hand sides for the current time unit and assigns the left-hand sides at the end of the time unit. For example, the following Verilog program
// testing blocking and non-blocking assignment
module blocking;
reg [0:7] A, B;
initial begin: init1
A = 3;
#1 A = A + 1; // blocking procedural assignment
B = A + 1;
$display("Blocking: A= %b B= %b", A, B );
A = 3;
#1 A <= A + 1; // non-blocking procedural assignment
B <= A + 1;
#1 $display("Non-blocking: A= %b B= %b", A, B );
end
endmodule


produces the following output:
Blocking: A= 00000100 B= 00000101
Non-blocking: A= 00000100 B= 00000100
The effect is for all the non-blocking assignments to use the old values of the variables at the
beginning of the current time unit and to assign the registers new values at the end of the current
time unit. This reflects how register transfers occur in some hardware systems.

Составить ответ  |||  Конференция  |||  Архив

Ответы


Отправка ответа

Имя (обязательно): 
Пароль: 
E-mail: 

Тема (обязательно):
Сообщение:

Ссылка на URL: 
Название ссылки: 

URL изображения: 


Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru