Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
xst.pdf
Скачиваний:
143
Добавлен:
11.06.2015
Размер:
5.64 Mб
Скачать

R

Behavioral Verilog Local Reset

Behavioral Verilog Initial Values Coding Examples

This section gives the following Behavioral Verilog Variable Declarations coding examples:

“Behavioral Verilog Initial Values Coding Example”

Behavioral Verilog Initial Values Coding Example

When you give a register an initial value in a declaration, XST sets this value on the output of the register at global reset, or at power up. A value assigned this way is carried in the NGC file as an INIT attribute on the register, and is independent of any local reset.

reg arb_onebit = 1'b0;

reg [3:0] arb_priority = 4'b1011;

You can also assign a set/reset (initial) value to a register in your behavioral Verilog code. Assign value to a register when the register reset line goes to the appropriate value as shown in the following coding example:

always @(posedge clk) begin

if (rst)

arb_onebit <= 1'b0;

end end

When you set the initial value of a variable in the behavioral code, it is implemented in the design as a flip-flop whose output can be controlled by a local reset. As such, it is carried in the NGC file as an FDP or FDC flip-flop.

Behavioral Verilog Local Reset

This section discusses Behavioral Verilog Local Reset and includes:

“About Behavioral Verilog Local Reset”

“Behavioral Verilog Local Reset Coding Examples”

About Behavioral Verilog Local Reset

Local reset is independent of global reset. Registers controlled by a local reset may be set to a different value than ones whose value is only reset at global reset (power up). In the “Behavioral Verilog Local Reset Coding Example,” the register, arb_onebit, is set to 0 at global reset, but a pulse on the local reset (rst) can change its value to 1.

Behavioral Verilog Local Reset Coding Examples

This section gives the following Behavioral Verilog Local Reset coding examples:

“Behavioral Verilog Local Reset Coding Example”

Behavioral Verilog Local Reset Coding Example

module mult(clk, rst, A_IN, B_OUT); input clk,rst,A_IN;

output B_OUT;

reg arb_onebit = 1'b0;

XST User Guide

www.xilinx.com

525

10.1

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]