Skip to content

Session 1: Introduction & Development Pipeline

In this first session, my goal was to get the working environment fully set up (documentation + container) and understand the basic workflow: edit → simulate → inspect signals. I come from the maker world and modular synthesis, and I’m especially motivated by the possibility of designing chips that we can eventually integrate into our own modules.

In the first class, Alex and Andreas gave us a clear and simple introduction to the course.

In addition, Julian and Jean-Michel walked us through how the working environment functions and how to set up our workspace.

Setup

After receiving the course access email, with the link to set everything up, I started configuring my account.

Inicio

Once everything was set up, I was able to access the Fab Future Tools Launcher, where all the platform access information is shown.

Tool Launcher

From there, we’re given access to either launch the container or open the Markdown editor to document the course.

Start Container

Once the container is launched, we can connect via VNC. It’s a Linux environment running inside Docker, with all the software we’ll use throughout the course.

VNC launcher

Using the IP address and password, we can connect to the VNC either from a browser window or with a VNC client. On macOS, there’s already a built-in client available in the system (go to Finder : menu bar > “GO” > “connect to server” > type your personal ip/port: vnc://your-ip:portnumber).

VNC launcher MacOS X

Once connected, it will ask you for the access password.

VNC launcher MacOS X ask password

Linux ask password

Once connected, a Linux desktop appears. In the lower-left corner you have access to the menu and the file explorer.

Desktop

files and menu

Inside the Examples folder, we have this week’s information in the QuickStart file, along with the four examples we’ll start using.

Quickstart

As a true Mac user, right-clicking inside the folder gives us quick access to the Terminal :)

Open Terminal

It opens already set to that directory.

Termnual

Running Simulations

Following the instructions, I arrived at the terminal screen and entered the suggested commands. make sim-fortune and enter.

Sim Fortune

Now I start the synth example simulation. make sim-synth

Sim Synth

GTKWave

And then I run the command to view the results in GTKWave.

GTWKWave

GTWKWave

From the panel on the left, I can choose which signals to display in the waveform.

GTWKWave

To see it more clearly, you can zoom in and out using the Time menu or the buttons in the top toolbar.

GTWKWave zoom

We can change the display format, color, and other settings for how each signal is shown.

GTWKWave format

Edit a sample

Next I did a modification to the code. I used the “cp -r…” command to copy and paste the program into my “foss/designs” folder.

cp -r /foss/examples/fortune_teller /foss/designs/fortune_demo
cd /foss/designs/fortune_demo

terminal copy

From inside the project folder, I edit the fortune_teller.v file using the editor.

gedit fortune_teller.v &

And I look up the ROM explanation, just as the QuickStart suggests.

open editor

I’m going to modify the text that appears for Fortune 0 to something like “See the future!”. To do that, I need the hexadecimal value of each symbol, so I’m using the ASCII table at ascii.cl.

Hex code

And I write the updated code. Since the new text is the same length as the original, I only need to change the characters and their hex values.

new code for Fortune 0

For test the changes i need execute this comands:

iverilog -Wall -g2012 -I/foss/examples/lib -o test.vvp fortune_teller.v fortune_teller_tb.v /foss/examples/lib/debounce.v /foss/examples/lib/uart_tx.v

vvp test.vvp

Test my code

Test my code

Run a hello world in verilog

To complete this week’s assignment, I created a small “hello world” example. Inside the designs folder, I added a helloworld directory, and inside it I created the two files for the example: helloworld.v and helloworld_tb.v.

Test my code

Test my code

Here is the code for each of the files.

helloworld.v

module helloworld;
    initial begin
        $display("Hello world!");
    end
endmodule

helloworld_tb.v

module helloworld_tb>;
    helloword dut();
    initial begin
        #1 $finish;
    end
endmodule

Test my code

After that, I run it from the terminal to see the result.

iverilog -Wall -g2012 -I/foss/examples/lib -o test.vvp helloword.v helloword_tb.v

vvp test.vvp

Test my code

iic-osic-tools in local - NAS Synology

As an alternative to having the development environment installed locally, I tried setting it up on my Synology NAS 918+ at home. I barely use it beyond Time Machine backups for my computers, and a Jupyter installation I made to keep a local copy of the Fab Future Data Science course. To do this, it’s necessary to install Portainer so you can manage and run multiple Docker containers.

Create a folder for portainer

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.

add a task

Once you click on User-defined script, a new window will open. Follow the instructions below:

General: In the Task field type in “Install Portainer“. Uncheck the “Enabled” option. Select root User.

add a task

Schedule: Select Run on the following date then select “Do not repeat“.

set a task date

Task Settings: Check “Send run details by email“, add your email, then copy paste the code below in the Run command area. After that, click OK.

docker run -d --name=portainer \
-p 8000:8000 \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /volume1/docker/portainer:/data \
--restart=always \
portainer/portainer-ce

set a script

After you click Submit, select your “Install Portainer” Task, then click the “Run” tab. You will be asked to run Install Portainer and click OK.

After a few minutes, you can access Portainer through your web browser.

log portainer

start portainer

Now you can install whichever environments you want. You can find them on Docker Hub or download the required images.

explore

install iic-osic-tools

run iic-osic-tools

It looks like it installed correctly, but I’m getting an error—so I may need to properly configure the NAS network settings.

error

To be continued…

For active the VPN service in the NAS need go to Control Panel / Network / General tab / click Advanced Settings.

A new pop up window will open. Select “Enable Multiple Gateways” then click OK.

Enable Multiple Gateways

Create the stack

services:
  iic-osic-tools:
    container_name: icc-osic-tools
    image: hpretl/iic-osic-tools:latest
    mem_limit: 3g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    volumes:
      - /volume1/docker/iic-osic-tools:/home/jovyan/work:rw
    ports:
      - 6104:8888
    restart: on-failure:5

Made stack

list stack