SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Physical description
Logical description
Zet x86 open source SoC
http://zet.aluzina.org
v1.1 19 Feb 2010
Zeus G´omez Marmolejo
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
Contents
1 Physical description
2 Logical description
SoC level
Zet core level
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
Contents
1 Physical description
2 Logical description
SoC level
Zet core level
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
Terasic Altera DE1 - Cyclone II FPGA
http://www.terasic.com.tw
Physical devices
1 FPGA
2 SDRAM
3 SRAM
4 Flash
5 SD card
6 VGA
7 50 Mhz osc
8 PC
9 reset
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
FPGA device EP2C20F484C7
Chip floorplan and pin usage for Zet version 1.1
FPGA physical layout
LE: 9,397 / 18,752
(50 %)
PINs: 202 / 315
(64 %)
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Contents
1 Physical description
2 Logical description
SoC level
Zet core level
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Zet SoC FPGA toplevel
version 1.1
Wishbone master
Zet x86 proc
Wishbone slaves
1 Flash
2 UART
3 PS2 keyb
4 sw LEDs
5 VGA
6 FML bridge
to RAM
7 SD card
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Wishbone SoC interconnection architecture
Single read/write transactions
Read: Write:
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Zet processor toplevel
Simplified block schematic for version 1.1
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
8086 instruction format
One single instruction
Up to 9 bytes in length!
Can be 1 byte long
Opcode is always
present
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Fetch FSM
Decoder tells what to do
Each cycle we progress through the FSM, decoder decides
next state:
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
16-bit x86 instruction examples
CISC in its full extent
encoding of “lock movw $0x7432,%cs:-0x101(%bx,%di)”
1 0x2e (prefix): cs
2 0xf0 (prefix): lock
3 0xc7 (opcode): movw
4 0x81 (modrm): (%bx,%di)
5 0xff 0xfe (offset): -0x101
6 0x32 0x74 (immediate): 0x7432
encoding of “push %bx”
1 0x53 (opcode + operand): push %bx
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
16-bit x86 instruction examples (2)
CISC in its full extent
instruction “into”, probably one of the most complex:
1 Check if OF == 1 then
2 SP = SP - 2
3 flags to stack
4 IF = 0; TF = 0
5 SP = SP - 2
6 CS to stack
7 CS = *((unsigned short) 0x12)
8 SP = SP - 2
9 IP to stack
10 IP = *((unsigned short) 0x10)
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Decoder
Opcode lookup - sequencer ROM - microcode ROM
Decode stage
1 From “opcode” and “modrm” we get a sequencer address.
This is implemented in logic to minimize memory utilization.
2 The sequencer keeps reading in the ROM till it reaches “1”
3 For each address in the sequencer, use it to index the
microcode ROM to get the actual microinstruction.
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Microcode format
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Microcode format
Previous example: “into”
There is a script bin/web2rom that fetches all the microcode
definitions and creates the corresponding ROMs files.
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Simulation
(simulation example)
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Zet New Generation
New features
Get rid of the Fetch FSM. Consider pref as normal insn
100 Mhz instead of 12.5 Mhz. Then remove asynchronous
bridges
Max 1 IPC (now it’s about 4-6 IPC)
iCache and write-through dCache. Use 2 wb masters at
the toplevel.
How to do it
Design each stage separatelly, registering outputs
Create a stub for each stage to check max 9.5ns routing
delay
Use already written test suites for each instruction type
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Proposed pipeline
8 stage pipeline
Zeus G´omez Marmolejo Zet x86 open source SoC
Physical description
Logical description
SoC level
Zet core level
Description of the pipeline
8 stage pipeline:
Fetch. Fetch 6 bytes from memory
Decode. Calculate the sequencer address, based on the
opcode, mode byte. Calculate instruction size, feed it back
to fetch.
Sequencer. Calculate the microcode address, get it from
the sequencer ROM.
Issue. Get the microcode IR from the microcode ROM.
Read. Read from the register file
Execute. ALU execution: sum, mul, div, eff addr, ...
Memory. Load/store from memory.
Write back. Write to register file.
Zeus G´omez Marmolejo Zet x86 open source SoC

Más contenido relacionado

La actualidad más candente

Cacti安装手册
Cacti安装手册Cacti安装手册
Cacti安装手册
Yiwei Ma
 
Juniper防火墙case信息收集表
Juniper防火墙case信息收集表Juniper防火墙case信息收集表
Juniper防火墙case信息收集表
mickchen
 
DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)
Michael Smith
 
La2 Motherboard
La2 MotherboardLa2 Motherboard
La2 Motherboard
Cma Mohd
 

La actualidad más candente (20)

Jvm的最小使用内存测试
Jvm的最小使用内存测试Jvm的最小使用内存测试
Jvm的最小使用内存测试
 
ARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/Spectre
 
OpenCR
OpenCROpenCR
OpenCR
 
Cacti安装手册
Cacti安装手册Cacti安装手册
Cacti安装手册
 
Juniper防火墙case信息收集表
Juniper防火墙case信息收集表Juniper防火墙case信息收集表
Juniper防火墙case信息收集表
 
An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)An Easy way to build a server cluster without top of rack switches (MEMO)
An Easy way to build a server cluster without top of rack switches (MEMO)
 
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshCreación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virsh
 
Tiny ML for spark Fun Edge
Tiny ML for spark Fun EdgeTiny ML for spark Fun Edge
Tiny ML for spark Fun Edge
 
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
Large Scale L2TPv3 Overlay Networking with OSPFv3(DRAFT)
 
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO) UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
UNDOCUMENTED Vyatta vRouter: Unbreakable VPN Tunneling (MEMO)
 
Topologia lab
Topologia labTopologia lab
Topologia lab
 
Metasploitable
MetasploitableMetasploitable
Metasploitable
 
Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)Tiny Server Clustering using Vyatta/VyOS (MEMO)
Tiny Server Clustering using Vyatta/VyOS (MEMO)
 
High Availability Server Clustering without ILB(Internal Load Balancer) (MEMO)
High Availability Server Clustering without ILB(Internal Load Balancer) (MEMO)High Availability Server Clustering without ILB(Internal Load Balancer) (MEMO)
High Availability Server Clustering without ILB(Internal Load Balancer) (MEMO)
 
One key sheard site to site open vpn
One key sheard site to site open vpnOne key sheard site to site open vpn
One key sheard site to site open vpn
 
U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0U-boot and Android Verified Boot 2.0
U-boot and Android Verified Boot 2.0
 
Unbreakable VPN using Vyatta/VyOS - HOW TO -
Unbreakable VPN using Vyatta/VyOS - HOW TO -Unbreakable VPN using Vyatta/VyOS - HOW TO -
Unbreakable VPN using Vyatta/VyOS - HOW TO -
 
Explorando Go em Ambiente Embarcado
Explorando Go em Ambiente EmbarcadoExplorando Go em Ambiente Embarcado
Explorando Go em Ambiente Embarcado
 
DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)DefCon 2012 - Hardware Backdooring (Slides)
DefCon 2012 - Hardware Backdooring (Slides)
 
La2 Motherboard
La2 MotherboardLa2 Motherboard
La2 Motherboard
 

Destacado

Le contrat écolo
Le contrat écoloLe contrat écolo
Le contrat écolo
Imam Lotfi
 
Brianna Macri Recommentation letter (1)
Brianna Macri Recommentation letter (1)Brianna Macri Recommentation letter (1)
Brianna Macri Recommentation letter (1)
Brianna Macri
 
новогодний колейдоскоп. литвиненко в.в.
новогодний колейдоскоп. литвиненко в.в.новогодний колейдоскоп. литвиненко в.в.
новогодний колейдоскоп. литвиненко в.в.
virtualtaganrog
 
Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...
Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...
Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...
Meet Magento Italy
 

Destacado (13)

Del Colegio a la Oficina, por 3g office - El Comercio de Perú - Enero 2014
Del Colegio a la Oficina, por 3g office - El Comercio de Perú - Enero 2014Del Colegio a la Oficina, por 3g office - El Comercio de Perú - Enero 2014
Del Colegio a la Oficina, por 3g office - El Comercio de Perú - Enero 2014
 
Competing with Million Dollar Marketing Budgets
Competing with Million Dollar Marketing BudgetsCompeting with Million Dollar Marketing Budgets
Competing with Million Dollar Marketing Budgets
 
Fgcs IBM 11 December
Fgcs IBM 11 DecemberFgcs IBM 11 December
Fgcs IBM 11 December
 
La sede corporativa, clave en las nuevas formas de trabajar
La sede corporativa, clave en las nuevas formas de trabajarLa sede corporativa, clave en las nuevas formas de trabajar
La sede corporativa, clave en las nuevas formas de trabajar
 
Manual de power point
Manual de power pointManual de power point
Manual de power point
 
Le contrat écolo
Le contrat écoloLe contrat écolo
Le contrat écolo
 
Brianna Macri Recommentation letter (1)
Brianna Macri Recommentation letter (1)Brianna Macri Recommentation letter (1)
Brianna Macri Recommentation letter (1)
 
Globalización de la Información
Globalización de la InformaciónGlobalización de la Información
Globalización de la Información
 
новогодний колейдоскоп. литвиненко в.в.
новогодний колейдоскоп. литвиненко в.в.новогодний колейдоскоп. литвиненко в.в.
новогодний колейдоскоп. литвиненко в.в.
 
RL GameforFUN
RL GameforFUNRL GameforFUN
RL GameforFUN
 
Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...
Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...
Alessandro Montalti: Gestione di un multi-store internazionale in Magento CE:...
 
Yo
YoYo
Yo
 
Nitrógeno ureico (BUN)
Nitrógeno ureico (BUN)Nitrógeno ureico (BUN)
Nitrógeno ureico (BUN)
 

Similar a Pres

Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
chiportal
 

Similar a Pres (20)

[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
 
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
Lec12 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- P6, Netbur...
 
Hardware backdooring is practical : slides
Hardware backdooring is practical : slidesHardware backdooring is practical : slides
Hardware backdooring is practical : slides
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 
“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”
 
Writing bios
Writing biosWriting bios
Writing bios
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The Stack
 
Slimline Open Firmware
Slimline Open FirmwareSlimline Open Firmware
Slimline Open Firmware
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
 
Aula 05 placa mãe
Aula 05 placa mãeAula 05 placa mãe
Aula 05 placa mãe
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Developing a Windows CE OAL.ppt
Developing a Windows CE OAL.pptDeveloping a Windows CE OAL.ppt
Developing a Windows CE OAL.ppt
 
Когда предрелизный не только софт
Когда предрелизный не только софтКогда предрелизный не только софт
Когда предрелизный не только софт
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
The Spectre of Meltdowns
The Spectre of MeltdownsThe Spectre of Meltdowns
The Spectre of Meltdowns
 
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
 
BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPT
 
Writing Metasploit Plugins
Writing Metasploit PluginsWriting Metasploit Plugins
Writing Metasploit Plugins
 
Genode Compositions
Genode CompositionsGenode Compositions
Genode Compositions
 

Pres

  • 1. Physical description Logical description Zet x86 open source SoC http://zet.aluzina.org v1.1 19 Feb 2010 Zeus G´omez Marmolejo Zeus G´omez Marmolejo Zet x86 open source SoC
  • 2. Physical description Logical description Contents 1 Physical description 2 Logical description SoC level Zet core level Zeus G´omez Marmolejo Zet x86 open source SoC
  • 3. Physical description Logical description Contents 1 Physical description 2 Logical description SoC level Zet core level Zeus G´omez Marmolejo Zet x86 open source SoC
  • 4. Physical description Logical description Terasic Altera DE1 - Cyclone II FPGA http://www.terasic.com.tw Physical devices 1 FPGA 2 SDRAM 3 SRAM 4 Flash 5 SD card 6 VGA 7 50 Mhz osc 8 PC 9 reset Zeus G´omez Marmolejo Zet x86 open source SoC
  • 5. Physical description Logical description FPGA device EP2C20F484C7 Chip floorplan and pin usage for Zet version 1.1 FPGA physical layout LE: 9,397 / 18,752 (50 %) PINs: 202 / 315 (64 %) Zeus G´omez Marmolejo Zet x86 open source SoC
  • 6. Physical description Logical description SoC level Zet core level Contents 1 Physical description 2 Logical description SoC level Zet core level Zeus G´omez Marmolejo Zet x86 open source SoC
  • 7. Physical description Logical description SoC level Zet core level Zet SoC FPGA toplevel version 1.1 Wishbone master Zet x86 proc Wishbone slaves 1 Flash 2 UART 3 PS2 keyb 4 sw LEDs 5 VGA 6 FML bridge to RAM 7 SD card Zeus G´omez Marmolejo Zet x86 open source SoC
  • 8. Physical description Logical description SoC level Zet core level Wishbone SoC interconnection architecture Single read/write transactions Read: Write: Zeus G´omez Marmolejo Zet x86 open source SoC
  • 9. Physical description Logical description SoC level Zet core level Zet processor toplevel Simplified block schematic for version 1.1 Zeus G´omez Marmolejo Zet x86 open source SoC
  • 10. Physical description Logical description SoC level Zet core level 8086 instruction format One single instruction Up to 9 bytes in length! Can be 1 byte long Opcode is always present Zeus G´omez Marmolejo Zet x86 open source SoC
  • 11. Physical description Logical description SoC level Zet core level Fetch FSM Decoder tells what to do Each cycle we progress through the FSM, decoder decides next state: Zeus G´omez Marmolejo Zet x86 open source SoC
  • 12. Physical description Logical description SoC level Zet core level 16-bit x86 instruction examples CISC in its full extent encoding of “lock movw $0x7432,%cs:-0x101(%bx,%di)” 1 0x2e (prefix): cs 2 0xf0 (prefix): lock 3 0xc7 (opcode): movw 4 0x81 (modrm): (%bx,%di) 5 0xff 0xfe (offset): -0x101 6 0x32 0x74 (immediate): 0x7432 encoding of “push %bx” 1 0x53 (opcode + operand): push %bx Zeus G´omez Marmolejo Zet x86 open source SoC
  • 13. Physical description Logical description SoC level Zet core level 16-bit x86 instruction examples (2) CISC in its full extent instruction “into”, probably one of the most complex: 1 Check if OF == 1 then 2 SP = SP - 2 3 flags to stack 4 IF = 0; TF = 0 5 SP = SP - 2 6 CS to stack 7 CS = *((unsigned short) 0x12) 8 SP = SP - 2 9 IP to stack 10 IP = *((unsigned short) 0x10) Zeus G´omez Marmolejo Zet x86 open source SoC
  • 14. Physical description Logical description SoC level Zet core level Decoder Opcode lookup - sequencer ROM - microcode ROM Decode stage 1 From “opcode” and “modrm” we get a sequencer address. This is implemented in logic to minimize memory utilization. 2 The sequencer keeps reading in the ROM till it reaches “1” 3 For each address in the sequencer, use it to index the microcode ROM to get the actual microinstruction. Zeus G´omez Marmolejo Zet x86 open source SoC
  • 15. Physical description Logical description SoC level Zet core level Microcode format Zeus G´omez Marmolejo Zet x86 open source SoC
  • 16. Physical description Logical description SoC level Zet core level Microcode format Previous example: “into” There is a script bin/web2rom that fetches all the microcode definitions and creates the corresponding ROMs files. Zeus G´omez Marmolejo Zet x86 open source SoC
  • 17. Physical description Logical description SoC level Zet core level Simulation (simulation example) Zeus G´omez Marmolejo Zet x86 open source SoC
  • 18. Physical description Logical description SoC level Zet core level Zet New Generation New features Get rid of the Fetch FSM. Consider pref as normal insn 100 Mhz instead of 12.5 Mhz. Then remove asynchronous bridges Max 1 IPC (now it’s about 4-6 IPC) iCache and write-through dCache. Use 2 wb masters at the toplevel. How to do it Design each stage separatelly, registering outputs Create a stub for each stage to check max 9.5ns routing delay Use already written test suites for each instruction type Zeus G´omez Marmolejo Zet x86 open source SoC
  • 19. Physical description Logical description SoC level Zet core level Proposed pipeline 8 stage pipeline Zeus G´omez Marmolejo Zet x86 open source SoC
  • 20. Physical description Logical description SoC level Zet core level Description of the pipeline 8 stage pipeline: Fetch. Fetch 6 bytes from memory Decode. Calculate the sequencer address, based on the opcode, mode byte. Calculate instruction size, feed it back to fetch. Sequencer. Calculate the microcode address, get it from the sequencer ROM. Issue. Get the microcode IR from the microcode ROM. Read. Read from the register file Execute. ALU execution: sum, mul, div, eff addr, ... Memory. Load/store from memory. Write back. Write to register file. Zeus G´omez Marmolejo Zet x86 open source SoC