透過您的圖書館登入
IP:3.129.13.201
  • 學位論文

PCI上雙核心指令溝通管道的建立

Instruction Socket for Two CPUs on the PCI Bus

指導教授 : 張文鐘

摘要


我們發展一套分散式的訊號處理系統,讓一個應用程式分散在兩個核心上同時進行,於是不同核心間就需要做訊息與指令的溝通,所以我們就建造了一個溝通管道讓應用程式可以使用它來做不同核心間的溝通。 我們讓影像處理與影像壓縮由一顆CPU負責執行,另一個CPU則負責做檔案系統與周邊裝置管理,因此做影像壓縮的CPU就需要利用負責檔案管理的CPU做影像讀寫,於是我們利用兩顆CPU間的共享記憶體(shared memory)做為訊息傳遞媒介,並搭配阻斷式(block)及中斷機制建立雙核心在PCI 匯流排上的CPU間指令與資料溝通。 我們的溝通管道分為兩個層面,應用層面為一個雙向的client-server架構,核心層面為中斷處理機制,並利用signaling與semaphore作為兩層面之間的非同步啟動機制,核心層面的架構讓核心間的溝通由硬體中斷最後達到實質的訊息傳輸,訊息傳輸完才啟動應用層等待中的server,開始針對接收到的訊息做服務。為了達到這些目標,我們便在作業系統中加入驅動程式來處理硬體中斷後各項資料搬移的動作,並建立一套功能函式讓應用程式使用,以便在兩顆CPU間進行指令溝通。

關鍵字

雙核心 溝通 共享記憶體 分層 驅動程式

並列摘要


We develop a distributed signal processing system where an application can distribute functional operations on two different CPUs to complete a service, so we have to build communication protocols to let the CPUs exchange their messages to each other. One CPU is responsible for capturing the video and processing it, and the other CPU controls the file system and peripheral devices. In order to write to or read from the file system for the first CPU, shared memory, interrupt and blocking mechanism is used to establish the communication between the two CPUs on the PCI bus. Our communication protocol has two aspects. The first one is application layer. We can see the communication channel as a client-server structure. The second one is the kernel or OS layer. It uses interrupt mechanism to notify the arrival of messages and use signaling and semaphore for the synchronization and notify the application to start receiving messages. So the OS layer completes the communication between two CPUs from hardware interrupt to real message transferring. After that, application can wake up the waiting server to receive the messages transferred by OS layer and processing the messages. For implementation, we design a linux driver to do the OS layer message transferring and we also build a user mode library as an interface of the application and the driver to do the communication.

參考文獻


[4] System Utilities for TCS5.2,Volume 7,Oct/2008
[6] User Guide 16 Channel Video Demonstrator,1.02版,Nov/2009
[9] PCI Local Bus Specification,Revision 2.2,PCI Special Interest Group, 1998
[1] PNX100X Series Data Book,Volume 1 of 1,1.2版,NXP恩智浦半導體公司, July/2009
[2] TriMedia Manager and Embedded Linux for NDK6.2,NXP恩智浦半導體公司,Nov/2009

延伸閱讀