2013年4月20日 星期六

OpenRISC 1000 下載原始碼

CPU也是屬於數位IC設計一項重要的核心科目,但是要從無到有開發一個CPU架構,我想不是念完"計算機組織與設計"這本書就能設計出來的,不過我們還是可以參考OpenRISC 1000原始碼來幫助我們學習CPU的設計。

哪要如何下載OpenRISC 1000呢?
1. 請先至OpenCores http://opencores.org/home網站登錄資料,登錄完成後Login。
2. 進入OpenCores我們使用滑鼠選擇"Projcts"ICON,這裡是依照數位IC設計程式不同產品做分門別類,有使用VHDL或是用Verilog語言去撰寫的程式。
在台灣我發現有些學校會敎VHDL,不過台灣IC設計業界都是使用Verilog語言來開發比較多。

3. 這裡我們展開"Processor"處理器這個欄位。


4. 看到"OpenRISC 1000"的選項,點選進去,OpenRISC 2000還在開發中,所以不要選。

5. 使用滑鼠點選"OpenRISC Community Portal Wiki"。


6. 最後我們到了OpenRISC下載頁面,不想使用SVN下載的話,可以點選"OR1200 OpenRISC Processor"至此頁面下載原始碼,但是只有CPU core沒有完整的SoC平台,在開發上是很不方便的,因此選擇"ORPSoC"(OpenRISC Reference Platform System oChip)
7. 之後到了ORPSoC章節,使用滑鼠點選"ORPSoC"連結路徑。

8. 之後可以看到ORPSoC的SVN下載路徑。
svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk/orpsocv2

9. 最後我使用TortoiseSVN工具下載ORPSoC。

2013年4月19日 星期五

OpenRISC 1000架構


The OpenRISC 1200 is an implementation of OpenRISC 1000 processor family.
The OR1200 is a 32-bit scalar RISC with Harvard microarchitecture, 5 stage integer pipeline, virtual memory support (MMU) and basic DSP capabilities.
Default caches are 1-way direct-mapped 8KB data cache and 1-way direct-mapped 8KB instruction cache, each with 16-byte line size. Both caches are physically tagged. By default MMUs are implemented and they are constructed of 64-entry hash based 1-way direct-mapped data TLB and 64-entry hash based 1-way direct-mapped instruction TLB. Supplemental facilities include debug unit for real-time debugging, high resolution tick timer, programmable interrupt controller and power management support.
General Microarchitecture
  • Central CPU/DSP block
  • IEEE 754 compliant single precision FPU
  • Direct mapped data cache
  • Direct mapped instruction cache
  • Data MMU based on hash-based DTLB
  • Instruction MMU based on hash-based ITLB
  • Power management unit and power management interface
  • Tick timer
  • Debug unit and development interface
  • Interrupt controller and interrupt interface
  • Instruction and Data WISHBONE B3 compliant interfaces

OpenRISC 1000架構簡介

# A completely free and open architecture.
# A linear, 32-bit or 64-bit logical address space with implementation-specific physical
address space.
# Simple and uniform-length instruction formats featuring different instruction set
extensions:
# OpenRISC Basic Instruction Set (ORBIS32/64) with 32-bit wide instructions
aligned on 32-bit boundaries in memory and operating on 32- and 64-bit data
# OpenRISC Vector/DSP eXtension (ORVDX64) with 32-bit wide instructions
aligned on 32-bit boundaries in memory and operating on 8-, 16-, 32- and 64-bit
data
# OpenRISC Floating-Point eXtension (ORFPX32/64) with 32-bit wide instructions
aligned on 32-bit boundaries in memory and operating on 32- and 64-bit data
# Two simple memory addressing modes, whereby memory address is calculated by:
# addition of a register operand and a signed 16-bit immediate value
# addition of a register operand and a signed 16-bit immediate value followed by
update of the register operand with the calculated effective address
# Two register operands (or one register and a constant) for most instructions who then
place the result in a third register
# Shadowed or single 32-entry or narrow 16-entry general purpose register file
# Optional branch delay slot for keeping the pipeline as full as possible
# Support for separate instruction and data caches/MMUs (Harvard architecture) or for
unified instruction and data caches/MMUs (Stanford architecture)
# A flexible architecture definition that allows certain functions to be performed either
in hardware or with the assistance of implementation-specific software
# Number of different, separated exceptions simplifying exception model
# Fast context switch support in register set, caches, and MMUs