Create virtual SoC model
ZVB is a SoC modeling tool which facilitates SoC architecture exploration and optimization. With rich built-in components, it can take you on a journey from architecture or idea to a virtual SoC model.
Quick start
To get up and running with ZVB as quickly as possible, you can use the following simple example to learn how to create virtual board with built-in components and run ELF on your work.
-
Create a virtual board
A new board can be created using the
(New Virtual Board) button, or select File > New Virtual Board from main menu. Name the virtual board file Demo. Define its description, vendor and other properties according to your need. Set frequencies as 1000 and click Create. The new board will be listed under custom node in Virtual Board Navigator.
-
Add components
ZVB allows you to create a virtual board that can run ELF with a couple of built-in components and connections. You can find all components in Component Navigator. All the built-in components can be placed on canvas by dragging and dropping them. Just click and drag InOrder5StagesCPU (CPU), NonCoherentXBar (memory bus) and SimpleMemoryModel (memory) from navigator and drop them on canvas.
-
Connect the components you selected
You can create connectivity between components by drawing a wire from one component's output pin to another component's input pin, which is referred to as logical connectivity. To define connectivity among three components, draw wire from each out pin of InOrder5StagesCPU to each in pin of Membus, and then draw a wire from out pin of Membus to in pin of Memory. You need to delete all redundant ports in Port view to ensure the validity of your virtual board.
-
Define component property
To delete redundant ports of memory bus, click Membus in canvas. Properties of a placed object selected in canvas can be changed in right panel. Since Memory component has only one in pin, click delete button to reduce the number of out pins of Membus to one.
Ensure that the memory address range of the Memory component is set to
0x0:0x100000000
. -
Run ELF on your virtual board
To run ELF on your virtual board, find the Demo board in Virtual Board Navigator and select Run ELF from Demo board's right-click menu. In the invoked dialog, point to the executable file(here we use HelloWorld) in ELF File Path and click Run.
You can check the output in Run Console.
User interface
The SoC modeling tool ZVB provides a convenient and explicit user interface that allows you to create and edit virtual boards.
- Toolbar: The toolbar contains commonly used commands in ZVB. Move your cursor on each button to get the tooltips.
- Left-hand side panel: It contains Virtual Board Navigator, Component Navigator and Running Virtual Board Navigator views and interactive buttons to assist you while working on your components or boards. You may use Ctrl+F to perform quick research.
- Main editor: The main area to edit your virtual board in canvas.
- Right-hand side panel: Properties and ports of a placed object selected in canvas can be changed in right-hand side panel.
Navigator
Virtual Board Navigator, Component Navigator and Running
Virtual Board Navigator views are listed in left-hand side panel. You
can control the default visibility of them with
(More Actions...) button in the up-right corner.
All built-in and custom components displayed in Component Navigator
and categorized by their type. To perform a straightforward search,
click
(Collapse All) button to check which kinds of component you want and
unfold that node to find one you like. You may use
Ctrl+F to perform quick research.
You can also add a "source" category to distinct built-in and custom component. Right-click component type node and select Group by to invoke the level settings dialog. Add the "source" to Selected Type List and click OK.
The structure changes will be shown in the tree within the component navigator panel. built-in and custom were added as subnode under CPU type component.
You can also add category for virtual board navigator. Right-click blank area in virtual board navigator and select Group by to invoke the level settings dialog. Add categories to Selected Type List and define their levels by arrow.
The structure changes will be shown in the tree within the virtual board navigator panel. All boards will be categorized by source at top-level node and vendor at subnode.
Component has fixed top-level category of component type, while virtual board can be categorized in all levels.
Design editor
Design editor is the main area to edit your virtual board in canvas. You can add, connect, manipulate and configure all components to explore SoC architecture and create a virtual board design.
The following list includes the most helpful operations and shortcuts on canvas, which help you control design editor conveniently.
Control canvas | Operation or keyboard shortcut |
---|---|
Navigate through the canvas | Right-click and drag in any direction to move the canvas around |
Zoom in | Hover mouse cursor on canvas, press Ctrl and scroll up |
Zoom out | Hover mouse cursor on canvas, press Ctrl and scroll down |
Zoom to fit | Hover mouse cursor on canvas, right click and select Zoom to fit |
Undo | Focus on canvas and press Ctrl+Z |
Redo | Focus on canvas and press Ctrl+Shift+Z |
Save | Focus on canvas and press Ctrl+S |
Property and port
As the image below, Property and Port view in right-hand side panel provides editing access to the properties of objects in canvas. The panel dynamically determines its content based on the object that is currently selected and presents specific properties and settings that relate to that object.
Hover the mouse cursor over the
to get help information of each property. In the Property region of
the panel, you can control all properties of selected object. In the
Port options region, you can add or delete pins of selected object
placed on canvas.
Customize virtual board
ZVB allows you to create a virtual board based on built-in virtual board or construct your design from scratch.
- New virtual board: A blank canvas can be created using the
(New Virtual Board) button, or select File > New Virtual Board from main menu. Define the virtual board name, description, frequencies and other properties in wizard and click Create.
- Duplicate existing board: Right-click an existing board in Virtual Board Navigator and select Duplicate. Redefine the virtual board name, description, frequencies and other properties and click Create.
The canvas opened in design editor and you can find the board listed under custom node (if there is not custom node, refer to customize category level in Virtual Board Navigator.
Layers and components
ZVB provides two layers to construct your virtual Board design, which are SoC and CPU layer.
-
SoC layer
Connect CPU with other peripheral components. For example, Bus, Memory, Interrupt-controller, Net and Disk, etc.
The most simple board only needs three built-in components of CPU, Membus and Memory, as the demo in Quick start. You can add other Peripherals, such as Uart, or add PLIC to manage the interrupt of Uart, Disk, Ethernet and other devices.
-
CPU layer
Define the pipeline in CPU layer.
You can find all CPU internal components in datapath. The commonly used components are listed in the below table.
CPU layer Components Components Description PCReg Use to create instructions. Fetch Use to fetch instructions from memory. Regfile Use to read and write to registers. VPU Use to execute vector instructions. EXU Use to perform scalar instructions and generate addresses for memory instructions. LSU Use to execute memory access instructions. Commit Set the instruction to a completed state and update the instruction counters. WriteBack Use to write instruction result back to register. Exception Use to handle exceptions and interrupts.
You can enter into internal of CPU-type component to construct its pipeline by right-clicking a CPU component and selecting Open. To return to SoC layer, just right-click blank area and select Close.

All components are listed in Component Navigator. Press Ctrl+F to perform a straightforward search and find one you like. Just click and drag the component you want from navigator and drop them on canvas. You can control the component in canvas by:

-
Placement: Click and drag the selected component to move it around, then drop it on canvas.
-
Delete: Click component and press Delete.
-
Multi-selection: use Ctrl to select multiple components, or click and drag over them.
-
Zoom: Hover your mouse cursor over a component until a black point appears on bottom-right. Click and drag the black point to zoom in and zoom out.
-
Duplicate: Right-click a object and select Copy and Paste it on another right-click. You need to drag the new object from the original one.
-
Change ports location: Click component and press shift + R.
-
layer switch: Click CPU type component, press Enter and Esc.
-
Save as template: Right-click the object in canvas and select Save as Template, ensure the component properties in dialog and create. The component will be listed in Component Navigator according its type.
Define component properties
Properties of a placed object selected in canvas can be changed in right-hand side panel. The panel dynamically determines its content based on the object that is currently selected and presents specific properties and settings that relate to that object.
All changes will be synchronized with object in canvas. As the gif below, you can change component's name, address range and other properties in Property view.

Microarchitecture of CPU component
You can edit the properties of CPU type component to define which ISA it supports.
- Click CPU type component to invoke its property settings.
- Select the ISA and extensions it supports from Base Instruction Set and Extensions.
You can also define which types of instruction operations are allowed to be performed on Execute type component. ZVB provides support of custom instructions in ZIGen. You need to specify the function unit that you select for your custom instructions to Execute component in CPU layer. Please refer to the following table
Function Unit | Description |
---|---|
IntAlu | Integer Arithmetic Logic Unit |
IntBru | Integer Branch Unit |
IntMult | Integer Multiplication Unit |
IntDiv | Integer Division Unit |
FloatAdd | Floating Point Addition Unit |
FloatCmp | Floating Point Comparison Unit |
FloatCvt | Floating Point Conversion Unit |
FloatMult | Floating Point Multiplication Unit |
FloatMultAcc | Floating Point Multiply-Accumulate Unit |
FloatDiv | Floating Point Division Unit |
FloatMisc | Floating Point Miscellaneous Unit |
FloatSqrt | Floating Point Square Root Unit |
MemRead | Memory Read Unit |
MemWrite | Memory Write Unit |
FloatMemRead | Floating Point Memory Read Unit |
FloatMemWrite | Floating Point Memory Write Unit |
VPU | Vector Processing Unit |
SIMD | Single Instruction, Multiple Data |
built-in | Include all function unit types except Cus |
Cus0/Cus1/Cus2/Cus3/Cus4 | Reserved for user customization |
- Click EXU0 component to invoke its property settings.
- Click
to add Op List Forms.
- Select Op Desc from pull-down box.
- Select function unit for EXU0 component.
The function unit also should be specified to your custom instruction from the drop-down box in ZIGen view. To create custom instructions, please refer to custom extension.
Define ports and connect the components
You can control the pins of component by adding or deleting button in Port view.
Click
(add) or
(delete) to control the number of pins of component. A grey button means
the selected object port is fixed and can not be controlled by users.
You need to delete all redundant ports that can be controlled in Port view while not be connected to ensure the validity of your virtual board.
Currently, there are four types of ports provided. Each of them has different direction of in, out and inout, where only the same type of out port can be connected to the same type of in port. Inout port has both input and output characteristics. Only Virt Port has inout direction.
Port Type | Description | Usage in components |
---|---|---|
Memory Port | Use to transmit data and requests and for accessing memory. | 1.Bus or Peripherals : receive memory access requests and processes feedback; 2. Fetch and LSU : require memory access. |
Interrupt Port | Use to transmit interrupt signals. | All components that can generate and receive interrupts. |
Instruction Port | Used to transmit instructions and related control signals. | All components under datapatch category. |
Virt Port | Serves sa a logical port to connect internal and external component of CPU. | Only CPU type component : for example, the Fetch component inside the CPU access memory through Virt Port. |
You can create connectivity between components by drawing a wire from one component's out type pin to another component's in type pin, which is referred to as logical connectivity.

Run ElF on virtual board
To run ELF on a completed or built-in virtual board, right-click a virtual board in navigator and select Run ELF. In the invoked dialog, point ZStudio to the executable file in ELF File Path and click Run. Check the run output in Run Console.