2012. 6. 16. 00:23

I dreamed of the woman whom I had a crush on

I dreamed last night that I met the woman whom I had a crush on six years ago.

 

I remember scenes from the dream distinctly. In my dream, I met her in front of her house.

 

I continually tried to go sweethearting her, but she coldly rejected me. She has already lived

 

with a man in her house. The moment I saw the situation made me very sad though I just

 

dreamed. I woke up from my dream soon. After awaking up immdiately, I was feeling down

 

becuase of the dream. I've seen her twice in Dongdaegu station and downtown in Daegu

 

long time ago. Since then I have never seen her again. Actually, I have not still forgotten

 

her. I can't stop thinking about her. I just think time heals all wounds.

 

Anyway, Have a good weekend everyone.

 

 

 

Written by Simhyeon, Choe

 

 

 

2012. 6. 14. 00:49

AMBA AXI PROTOCOL v1.0 - ADDRESSING OPTIONS I

오늘은 ADDRESSING OPTIONS에 관한 부분들에 대해서 살펴 보도록 하겠습니다.

 

시간이 많이 늦은 관계로, BURST LENGTH와 BURST SIZE에 대해서만 언급해 드리도록 하겠습니다.

 

 

4.1 About addressing options

 

The AXI protocol is burst-based, and the master begins each burst by driving transfer
control information and the address of the first byte in the transfer. As the burst
transaction progresses, it is the responsibility of the slave to calculate the addresses of
subsequent transfers in the burst.
Bursts must not cross 4KB boundaries to prevent them from crossing boundaries between slaves and to limit the size of the address incrementer required within slaves.

 

위의 설명에 4K BOUNDARY에 대해, 초과하면 안된다고 언급되어 있는데, 이것은 이 장 마지막에서 다시 언급해 드리도록 하겠습니다.

 

 


4.2 Burst length

 

The AWLEN or ARLEN signal specifies the number of data transfers that occur within
each burst. As Table 4-1 shows, each burst can be 1-16 transfers long.

BURST LENGTH는 하나의 BURST를 구성하는 일련의 DATA TRANSFER의 수를 의미합니다.
(AMBA AXI4 최신 스펙에서 용어 설명에 보면 한 BEAT가 하나의 BURST에서 각각의 DATA

TRANSFER라고 정의하고 있습니다. A BEAT = A DATA TRANSFER)

 

 

 

 

For wrapping bursts, the length of the burst must be 2, 4, 8, or 16 transfers. Every transaction must have the number of transfers specified by ARLEN or AWLEN. No component can terminate a burst early to reduce the number of data transfers. During a write burst, the master can disable further writing by deasserting all the write strobes, but it must complete the remaining transfers in the burst. During a read burst, the master can discard further read data, but it must complete the remaining transfers in the burst.

 

WRAPPING BURST에서 BURST의 LENGTH는 2, 4, 8, 16까지해서 n^2로 정렬된 크기를 가져야 한다는 점이 중요합니다. 그리고 어떤 IP든 ARLEN이나 AWLEN에 명시된 TRANSFER의 LENGTH보다 작게하여 BURST TRANSACTION을 끝낼 수 없습니다.

(AWLEN = 8인데 AWLEN을 4의 LENGTH만큼만 READ/WRITE하는 상황이 불가능)
즉, 명시된 길이만큼의 BURST TRANSACTION은 완료하되, WRITE BURST에서는 마스터가 WRITE STROBE 스킴으로 특정 BYTE LANE을 선택하여 추가적인 WRITING을 막을 수 있고 READ BURST에서는 마스터가 추가적인 READ DATA를 무시할 수 있습니다. 정리하면, 한 번 시작한 트랜잭션은 동작 중에 중단할 수 없으며, 정해진 길이의 모든 트랜잭션은 완료해야 한다는 의미로 볼 수 있습니다.

 

 

 


Table 4-2 shows how the ARSIZE or AWSIZE signal specifies the maximum number of data bytes to transfer in each beat, or data transfer, within a burst. The AXI determines from the transfer address which byte lanes of the data bus to use for each transfer.
For incrementing or wrapping bursts with transfer sizes narrower than the data bus, data transfers are on different byte lanes for each beat of the burst. The address of a fixed burst remains constant, and every transfer uses the same byte lanes. The size of any transfer must not exceed the data bus width of the components in the transaction.

 

여기서 DATA TRANSFER의 크기는 BUS WIDTH와 동일하거나 그보다 작아야 합니다. 데이터 버스의 BYTE LANE이 각각의 TRANSFER로 사용하는 것을 TRANSFER ADDRESS로부터 결정해야 한다고 나와 있는데요. 간단히 예를 들어 설명하자면, AWADDR이 0x1000이라고 가정하고 4 BEAT(BURST SIZE = 1 BYTE)로 구성된 하나의 BURST를 WRITE TRANSACTION하는 상황이라고 하겠습니다. 0x1000에는 [7:0] 0x1001에는 [15:8], 0x1002에는 [23:16], 0x1003에는 [31:24]의 비트 스코프로 전송해야 한다는 의미가 됩니다.
이렇게 증가하는 것은 WRAPPING BURST와 INCREMENTING BURST MODE에서 해당하는 스킴이고 FIXED BURST MODE에서는 오로지 하나의 특정 주소 영역에 대해서만 TRANSACTION을 수행하기 때문에
모든 TRANSFER는 항상 동일한 BYTE LANE을 사용합니다. 즉, 주소값이 변하지 않는다는 것을 의미합니다.
각 BURST TYPE은 나중에 다시 설명을 드리도록 하겠습니다.

(BYTE LANE이라는 개념은 하나의 BURST에서 특정 BEAT의 단위를 의미합니다만, 그 중에서 특정 BEAT를 READ/WRITE TRANSACTION에서 선택적으로 ENABLE하거나 DISABLE하여 전송할 수 있도록 만들어 놓은 단위라고 생각하시면 됩니다. BYTE LANDE에서 "BYTE"라고 명명한 이유가 최소 8BIT 이상의 크기를 가지기 때문인 것 같습니다. 이것은 나중에 WRITE STROBE PART에서 다시 설명을 드리도록 하겠습니다.)

 

그럼 오늘은 여기까지만 정리하도록 하겠습니다.

 

12시가 넘었으니... 즐거운 하루 보내십시오. :)

 

 

Written by Simhyoen, Choe

 

 

2012. 6. 1. 02:04

AMBA AXI PROTOCOL v1.0 - CHANNEL HANDSHAKE II

채널 핸드쉐이크의 두 번째 내용을 추가적으로 설명해 드리겠습니다.

 

3.2 Relationships between the channels

 

The relationship between the address, read, write, and write response channels is flexible.
For example, the write data can appear at an interface before the write address that relates to it. This can occur when the write address channel contains more register stages than the write data channel. It is also possible for the write data to appear in the same cycle as the address.


이 절 첫머리를 보면 다섯 채널간에 유연성을 가지고 있다고 나와 있습니다만, 스펙 본문의 예로, WRITE DATA가 WRITE ADDRESS보다 인터페이스에 먼저 도착할 수 있다는 의미로 설명되어 있는데요. 이 경우에 WRITE ADDRESS CHANNEL에서 WRITE DATA CHANNEL보다 더 많은 REGISTER SLICE를 가지고 있을 때를 의미합니다. 그리고 ADDRESS와 같이 동일한 사이클에 WRITE DATA가 도착하는 것이 가능하다고 합니다. 물론, SLAVE에 DATA가 먼저 도착하더라도 ADDRESS와 CONTROL INFORMATION 없이 동작하는 것은 불가능합니다. 다만 여기에서 위와 같이 언급한 이유가 있는데요. 예를 들어, ADDRESS는 이슈하는 데에 1 cycle, DATA 전송하는 데에 2 cycle로 가정합시다. 채널간의 유연성이 없을 경우 항상 순서 그대로 ADDRESS, DATA가 도착해야 하니 3 cycle을 소요해야 하지만, ADDRESS와 DATA가 동시에 도착할 수 있다면 2 cycle에 완료할 수 있습니다. 이 부분 역시 성능을 고려한 스킴이라고 볼 수 있겠네요. 저도 좀 더 명확하게 알기 위해, 회사에서 AMBA를 정말 잘 알고 있는 외국 엔지니어에게 물어봤습니다 :)

 

When the interconnect must determine the destination address space or slave space, it must realign the address and write data. This is required to assure that the write data is signaled as valid only to the slave for which it is destined.

Two relationships that must be maintained are:
• read data must always follow the address to which the data relates
• a write response must always follow the last write transfer in the write transaction
  to which the write response relates.

 

바로 위에서 언급된 내용은 일반적인 설명들입니다. BURST TRANSACTION이 필요할 때, MASTER가

INTERCONNECT로 ADDRESS를 이슈하고 DATA TRANSFER를 보내는데, INTERCONNECT에서는 대상 SLAVE의 ADDRESS를 결정해야 하고 해당 SLAVE의 ADDRESS의 위치에 따라 정렬해야 한다는 내용입니다.

 


3.3 Dependencies between channel handshake signals

 

To prevent a deadlock situation, you must observe the dependencies that exist between the handshake signals.
In any transaction:
• the VALID signal of one AXI component must not be dependent on the READY
   signal of the other component in the transaction
• the READY signal can wait for assertion of the VALID signal.

 

이전 시간에 VALID와 READY 핸드쉐이크에서 VALID나 READY가 누가 먼저 ASSERT되더라도 상관없다고 언급하였는데요. 하지만 일부 VALID나 READY가 반드시 ASSERT되어야만 다음 VALID 혹은 READY를 ASSERT할 수 있는 경우가 있습니다.

아래 그럼 3-4와 3-5에서 handshake signal dependencies를 보여주고 있습니다만, 싱글 헤드 포인터는 두 시그널의 관계에서 둘 중 어떤 시그널이 먼저 ASSERT되더라도 상관없다는 것을 나타내고 더블 헤드 포인터는 지시하는 쪽이 먼저 선행되어야 지시당하는 쪽이 ASSERT될 수 있다는 의미입니다.

 

 

Figure 3-4 shows that, in a read transaction:
• the slave can wait for ARVALID to be asserted before it asserts ARREADY
• the slave must wait for both ARVALID and ARREADY to be asserted before it
   starts to return read data by asserting RVALID

  

위의 설명대로 슬레이브는 ARREADY가 ASSERT하기 전에 ARVALID 시그널이 ASSERT하도록 기다릴 수 있고 반대로 ARVALID가 ASSERT하기 전에 ARVALID 시그널이 ASSERT하도록 기다릴 수도 있습니다.
하지만 두 번째 문장처럼 RVALID가 ASSERT하기 전에 ARVALID와 ARREADY 모두 ASSERT하도록 기다려야만 합니다.

 

 

Figure 3-5 shows that, in a write transaction:
• the master must not wait for the slave to assert AWREADY or WREADY before
   asserting AWVALID or WVALID
• the slave can wait for AWVALID or WVALID, or both, before asserting AWREADY

• the slave can wait for AWVALID or WVALID, or both, before asserting WREADY
• the slave must wait for both WVALID and WREADY to be asserted before asserting BVALID.

• the slave can wait for AWVALID or WVALID, or both, before asserting WREADY
• the slave must wait for both WVALID and WREADY to be asserted before asserting BVALID.

 

Note
It is important that during a write transaction, a master must not wait for AWREADY
to be asserted before driving WVALID. This could cause a deadlock condition if the
slave is conversely waiting for WVALID before asserting AWREADY.

 

 

위의 화살표로 나타난 그림이 복잡해 보인다면, 아래의 그림과 함께 보면 좀 더 쉽게 보실 수 있습니다.

예를 들어, [1] Read transaction인 경우에는 Read Address 관련 시그널들은 VALID나 READY 둘 중 어느 시그널이 먼저 ASSERT가 되어도 상관 없다고 말씀드렸습니다만, 점선을 넘어가는 시점(더블 헤드 포인터)에서는 Read Address 관련 시그널들이 선행되어야만 Read Data Signal들이 ASSERT할 수 있습니다. [2] Write transaction을 보시면 마찬가지로 점선을 넘어가는 시점이 더블 헤드 포인터로 나타납니다.

 

 

              [1] Read transaction                                    [2] Write transaction

 

     

정리하면, DEADLOCK을 피하기 위해 VALID/READY 시그널이 선행적으로 ASSERT되어야 하는 경우를 알아야 합니다. 그리고 서로 ASSERT하는 시그널의 순서에 상관없는 경우임에도 불구하고 시그널간의 의존성을 가지도록 구현한다면 DEALOCK에 빠질 수 있기 때문에 이를 주의해야 합니다.

 

시간이 늦었으니 오늘은 여기까지만 정리하도록 하겠습니다. 좋은 하루 보내세요.

 

 

Written by Simhyeon, Choe