Avalon Interface contents
1. Giới thiệu về Avalon Bus
2. Clock Interfaces
3. Avalon Memory-Mapped Interfaces
4. Interrupt Interfaces
5. Avalon Memory-Mapped Tristate Interfaces
6. Avalon Streaming Interfaces
7. Conduit Interfaces
I. Giới thiệu về Avalon Bus
Avalon Bus là một hệ thống giao tiếp đơn giản được Altera
thiết kế nhằm giúp người học về FPGA dễ dàng kết nối các thiết bị
của hệ thống được thiết kế trong FPGA. Avalon là môt thành phần
không thể thiếu trong các hệ thống tích hợp trên một chip khả trình (
SOPC)
Avalon được thiết kế để có thể hoạt động ở 2 môi trường là môi
trường truyền tốc độ cao, và môi trường ứng dụng ánh xạ bộ nhớ có
tốc độ thấp hơn.
Tùy vào mỗi ứng dụng, mỗi thành phần khác nhau mà bạn thiết
kế trong FPGA mà bạn phải chọn mỗi interface khác nhau của
Avalon. Có 6 interface như sau:
Avalon Memory Mapped Interface (Avalon-MM)—an
address-based read/write interface typical of master–
slave connections
Avalon Streaming Interface (Avalon-ST)—an interface
that supports the unidirectional flow of data, including
multiplexed streams, packets, and DSP data
Avalon Memory Mapped Tristate Interface—an address-
based read/write interface to support off-chip peripherals.
Multiple peripherals can share data and address buses to
reduce the pincount of an FPGA and the number of traces
on the PCB
Avalon Clock—an interface that drives or receives clock
and reset signals to synchronize interfaces and provide
reset connectivity
Avalon Interrupt—an interface that allows components to
signal events to other components
Avalon Conduit—an interface that allows signals to be
exported out at the top level of an SOPC Builder system
where they can be connected to other modules of the
design or FPGA pins
II. Clock Interfaces
Dung để định nghĩa ( tạo ra) tín hiệu clock và reset cử dụng cho
các thiết bị. một thiết bị thường có thể có một hay nhiều clock input,
nhưng mà hiếm khi có clock output. PLL là điển hình của một thiết bị
vừa có clock input và output.
clock output chỉ bao gồm các tind hiệu clock chứ không bao
gồm tín hiệu reset.
III. Avalon Memory-Mapped Interfaces (Avalon-MM)
Avalon-MM interfaces được sử dụng trong read/write dữ liệu
của các thành phần master và slave trong hệ thống ánh xạ bộ nhớ.
Những thành phần này bao gồm bộ vi xử li, microprocessors,
memories, UARTs, timers, và có master and slave interfaces kết nối
bởi một hệ thống. Avalon-MM có thế mô tả một cách đa dạng các
thiết bị khác nhau, từ SRAM có chu kì read/write đơn giản đến phức
tạp.
Hình sau đây mô tả một hệ thống Avalon-MM
a. Slave
Avalon-MM Slave Port Signals
Signal Type Width Dir Description
Read 1 In Đk đọc dữ liệu
Write 1 In Đk ghi dữ liệu
Address 1-32 In Địa chỉ offset
Readdata 8,16,32, Out Dữ liệu đáp ứng quá trình đọc
64,
128,256,
512
1024
Writedata 8,16,32, In Dữ liệu đáp ứng quá trình ghi
64,
128,256,
512
1024
Byteenable 1,2,4,8, In Xác định byte cần truyền hay
16, 32, đọc trong quá trình ghi hay đọc
64, 128 dữ liệu
1111 write full 32 bits
0011 writes lower 2
bytes
1100 writes upper 2
bytes
0001 writes byte 0 only
0010 write byte 1 only
0100 write byte 2 only
1000 write byte 3 only
Begintransfer 1 In Sử dụng trong quá trình truyền
dư liệu bất chấp lệnh
waitraquest và vá tín hiệu khác
Waitrequest 1 Out Biểu thị khi slave không thể đáp
ứng tác vụ được yêu cầu
readdatavalid 1 out Xác định quá trình đọc bắt đầu
Burstcount 1-32 In Đếm số lân truyền khối
beginbursttransfer 1 In Bắt đầu truyền 1 khối
readyfordata 1 Out Sẵn sang nhận
dataavailable 1 Out Sẵn sang đọc
resetrequest 1 Out Reset
Slave Timing
Avalon MM là một giao thứ truyền đồng bộ nên tất cả các thành phần
trong hệ thống đều phải đòng bộ theo hệ thống.
Slave Transfers
Đây là sơ đồ tín hiệu truyền dữ liệu sử dụng tin hiệu điều khiển waitquest
Đây là sơ đồ tín hiệu của quá trình truyền dữ liệu ko sử dụng tín hiệu
waitrequest mà sử dụng chu kì writeWaitTime = 2 and readWaitTime = 1.
Đây là sơ đồ tín hiệu của quá trinh đọc dữ liệu sử dụng biến chờ.
b. Master
Avalon-MM Slave Port Signals
Signal Type Width Dir Description
Read 1 Out Đk đọc dữ liệu
Write 1 Out Đk ghi dữ liệu
Address 1-32 Out Địa chỉ offset
Readdata 8,16,32, In Dữ liệu đáp ứng quá trình đọc
64,
128,256,
512
1024
Writedata 8,16,32, Out Dữ liệu đáp ứng quá trình ghi
64,
128,256,
512
1024
Byteenable 1,2,4,8, out Xác định byte cần truyền hay
16, 32, đọc trong quá trình ghi hay đọc
64, 128 dữ liệu
1111 write full 32 bits
0011 writes lower 2
bytes
1100 writes upper 2
bytes
0001 writes byte 0 only
0010 write byte 1 only
0100 write byte 2 only
1000 write byte 3 only
Waitrequest 1 In Biểu thị khi slave không thể đáp
ứng tác vụ được yêu cầu
arbiterlock 1 out
readdatavalid 1-32 In
flush 1 Out
burstcount 1 Out
resetrequest 1 Out Reset
Master transfers
Sơ đồ tín hiệu mô tả sự truyền của master
Master writeburst
Master readburst
IV. Interrupt Interfaces
Trước khi đáp ứng một ngắt thì hệ thống phải xác định được nội dung
ngắt. Nội dung này được lưu trữ trong một thanh ghi cung cấp bởi môi
trường Avalon MM.
V. Avalon Memory-Mapped Tristate Interfaces
Slave truyền Bất đồng bộ
Truyền đồng bộ tương tự như Avalon MM
Avalon MM tristate không hỗ trợ cho Master.
VI. Avalon Streaming Interfaces
Avalon Streaming (Avalon-ST) interfaces are used for components that
drive high bandwidth, low latency, unidirectional data. Typical
applications include multiplexed streams, packets, and DSP data. The
Avalon-ST interface signals can describe traditional streaming interfaces
supporting a single stream of data without knowledge of channels or
packet boundaries. The interface can also support more complex
protocols capable of burst and packet transfers with packets interleaved
across multiple channels.
a) Avalon-ST Interface Signals
Ready : Sink → Source
Là tín hiệu gởi từ sink về source để đảm bảo sink
sẵn sàng.
Valid: source → sink
Là tín hiệu xác định tìn hiệu hiệu lực
Data: source → sink
Channel: source → sink
Error: source → sink
Startofpacket: source → sink
Endofpacket: source → sink
Empty: source → sink
b) Typical Data Transfers
Typical Data Transfers
Big Endian Layout of Data
Avalon-ST Packet Interface Signals
Packet Transfer
VII. Conduit Interfaces