Git Product home page Git Product logo

iob-soc's Introduction

IOb-SoC

IOb-SoC is a System-on-Chip (SoC) template comprising an open-source RISC-V processor (picorv32), an internal SRAM memory subsystem, a UART, and an optional interface to external memory. If the external memory interface is selected, an instruction L1 cache, a data L1 cache, and a shared L2 cache are added to the system. The L2 cache communicates with a 3rd party memory controller IP (typically a DDR controller) using an AXI4 master bus.

Nix environment

You can use nix-shell to run IOb-SoC in a Nix environment with all dependencies available except for Vivado and Quartus for FPGA compilation and running.

After installing nix-shell, it can be initialized by calling any Makefile target in the IOb-SoC root directory, for example

make setup

The first time it runs, nix-shell will automatically install all the required dependencies. This can take a couple of hours, but after that, you can enjoy IOb-SoC and not worry about installing software tools.

Dependencies

If you prefer, you may install all the dependencies manually and run IOb-SoC without nix-shell. The following tools should be installed:

  • GNU Bash >=5.1.16
  • GNU Make >=4.3
  • RISC-V GNU Compiler Toolchain =2022.06.10 (Instructions at the end of this README)
  • Python3 >=3.10.6
  • Python3-Parse >=1.19.0

Optional tools, depending on the desired run strategy:

  • Icarus Verilog >=10.3
  • Verilator >=5.002
  • gtkwave >=3.3.113
  • Vivado >=2020.2
  • Quartus >=20.1

Older versions of the dependencies above may work but still need to be tested.

Operating Systems

IOb-SoC can be used in Linux Operating Systems. The following instructions work for CentOS 7 and Ubuntu 18.04, 20.04, and 22.04 LTS.

Clone the repository

The first step is to clone this repository. IOb-SoC uses git sub-module trees, and GitHub will ask for your password for each downloaded module if you clone it by https. To avoid this, setup GitHub access with ssh and type:

git clone --recursive [email protected]:IObundle/iob-soc.git
cd iob-soc

Alternatively, you can still clone this repository using https if you cache your credentials before cloning the repository, using: git config --global credential.helper 'cache --timeout=<time_in_seconds>'

Configure your SoC

To configure your system, edit the iob_soc.py file, which can be found at the repository root. This file has the system configuration variables; hopefully, each variable is explained by a comment.

Set environment variables for local or remote building and running

The various simulators, FPGA compilers, and FPGA boards may run locally or remotely. For running a tool remotely, you need to set two environmental variables: the server logical name and the server user name. Consider placing these settings in your .bashrc file so that they apply to every session.

Set up the remote simulator server

Using the open-source simulator Icarus Verilog (iverilog) as an example, note that in submodules/hardware/simulation/icarus.mk, the variable for the server logical name, SIM_SERVER, is set to IVSIM_SERVER, and the variable for the user name, SIM_USER is set to IVSIM_USER.

To run the simulator on the server mysimserver.myorg.com as user ivsimuser, set the following environmental variables beforehand, or place them in your .bashrc file:

export IVSIM_SERVER=ivsimserver.myorg.com
export IVSIM_USER=ivsimuser

When you start the simulation, IOb-SoC's simulation Makefile will log you on to the server using ssh, then rsync the files to a remote build directory and run the simulation there. If you do not set these variables, the simulator will run locally if installed.

Set up the remote FPGA toolchain and board servers

Using the CYCLONEV-GT-DK board as an example, note that in hardware/fpga/quartus/CYCLONEV-GT-DK/Makefile, the variable for the FPGA tool server logical name, FPGA_SERVER, is set to QUARTUS_SERVER, and the variable for the user name, FPGA_USER, is set to QUARTUS_USER; the variable for the board server, BOARD_SERVER, is set to CYC5_SERVER, and the variable for the board user, BOARD_USER, is set to CYC5_USER. As in the previous example, set these variables as follows:

export QUARTUS_SERVER=quartusserver.myorg.com
export QUARTUS_USER=quartususer
export CYC5_SERVER=cyc5server.myorg.com
export CYC5_USER=cyc5username

In each remote server, the environment variable for the license server used must be defined as in the following example:

export [email protected];lic_or_dat_file

Create the build directory

IOb-SoC uses intricate Python scripting to create a build directory with all the necessary files and makefiles to run the different tools. The build directory is placed in the folder above at ../iob_soc_Vx.y by running the following command from the root directory.

make setup

If you want to avoid getting into the complications of our Python scripts, use the ../iob_soc_Vx.y directory to build your SoC. It only has code files and a few Makefiles. Enter this directory and call the available Makefile targets. Alternatively, using another Makefile in the IOb-SoC root directory, the same targets can be called. For example, to run the simulation, the IOb-SoC's top Makefile has the following target:

sim-run:
	nix-shell --run 'make clean setup INIT_MEM=$(INIT_MEM) USE_EXTMEM=$(USE_EXTMEM) && make -C ../$(CORE)_V*/ sim-run SIMULATOR=$(SIMULATOR)'

The above target invokes the nix-shell environment to call the local targets clean and setup and the target sim-run in the build directory. Below, the targets available in IOb-SoC's top Makefile are explained.

Emulate the system on PC

You can emulate IOb-SoC's on a PC to develop and debug your embedded system. There is also a model to emulate the UART, which communicates with a run-time Python script server. If you develop peripherals, you can build embedded software models to run them using PC emulation. To emulate IOb-SoC's embedded software on a PC, type:

make pc-emul-run

The Makefile compiles and runs the software in the ../iob_soc_Vx.y/software/ directory. The Makefile includes the sw_build.mk segment supplied initially in the ./software/ directory in the IOb-SoC root. Please feel free to change this file for your specific project. To run an emulation test comparing the result to the expected result, run

make pc-emul-test

Simulate the system

To simulate IOb-SoC's RTL using a Verilog simulator, run

make sim-run [SIMULATOR=icarus!verilator|xcelium|vcs|questa] [INIT_MEM=0|1] [USE_EXTMEM=0|1]

The INIT_MEM variable specifies whether the firmware is initially loaded in the memory, skipping the boot process, and the USE_EXTMEM variable indicates whether an external memory such as DRAM is used, in which case the cache system described above is instantiated.

The Makefile compiles and runs the software in the ../iob_soc_Vx.y/hardware/simulation directory. The Makefile includes the ./hardware/simulation/sim_build.mk, which you can change for your project. To run a simulation test comprising several simulations with different parameters, run

make sim-test

The simulation test contents can be edited in IOb-SoC's top Makefile.

Each simulator must be described in the ./submodules/LIB/hardware/simulation/<simulator>.mk file. For example, the file vcs.mk describes the VCS simulator.

The host machine must run an access server, a Python program in ./submodules/LIB/scripts/board_server.py, set up to run as a service. The client connects to the host using the SSH protocol and runs the board client program /submodules/LIB/scripts/board_client.py. Note that the term board is used instead of simulator because the same server/client programs control the access to the board and FPGA compilers. The client requests the simulator for GRAB_TIMEOUT seconds, which is 300 seconds by default. Its value can be specified in the ./hardware/fpga/fpga_build.mk Makefile segment, for example, as

GRAB_TIMEOUT ?= 3600

Build and run on FPGA board

To build and run IOb-SoC on an FPGA board, the FPGA design tools must be installed locally or remotely. The FPGA board must also be attached to the local or remote host, not necessarily the same host where the design tools are installed.

Each board must be described under the /submodules/LIB/hardware/fpga/<tool>/<board_dir> directory. For example, the hardware/fpga/vivado/BASYS3 directory contents describe the board BASYS3, which has an FPGA device that can be programmed by the Xilinx/AMD Vivado design tool. The access to the board is controlled by the same server/client programs described above for the simulators. To build an FPGA design of an IOb-SoC system and run it on the board located in the board_dir directory, type

make fpga-run [BOARD=<board_dir>] [INIT_MEM=0|1] [USE_EXTMEM=0|1]

To run an FPGA test comparing the result to the expected result, run

make fpga-test

The FPGA test contents can be edited in IOb-SoC's top Makefile.

The remote machines that have an FPGA board attached to it must run our board access control service script, which can be found in submodules/LIB/scripts/board_server.py. When IOb-SoC needs to access a remote FPGA server, it runs the board access script located in submodules/LIB/scripts/board_server.py.

To install board_server.py as a service, run the following command on the remote FPGA server:

sudo make board_server_install

To uninstall the service, run

sudo make board_server_uninstall

Finally, to query the board status, run

sudo make board_server_uninstall

Compile the documentation

To compile documents, the LaTeX software must be installed. Three document types are generated: the Product Brief (pb), the User Guide (ug), and a presentation. To build a given document type DOC, run

make doc-build [DOC=pb|ug|presentation]

To generate the three documents as a test, run

make doc-test

Total test

To run all simulation, FPGA board, and documentation tests, type:

make test-all

Running more Makefile Targets

The examples above are the Makefile targets at IOb-SoC's root directory that call the targets in the top Makefile in the build directory. Please explore the available targets in the build directory's top Makefile to add more targets to the root directory Makefile.

Cleaning the build directory

To clean the build directory, run

make clean

Instructions for Installing the RISC-V GNU Compiler Toolchain

Get sources and check out the supported stable version

git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain
git checkout 2022.06.10

Prerequisites

For the Ubuntu OS and its variants:

sudo apt install autoconf automake autotools-dev curl python3 python2 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev

For CentOS and its variants:

sudo yum install autoconf automake python3 python2 libmpc-devel mpfr-devel gmp-devel gawk  bison flex texinfo patchutils gcc gcc-c++ zlib-devel expat-devel

Installation

./configure --prefix=/path/to/riscv --enable-multilib
sudo make -j$(nproc)

This will take a while. After it is done, type:

export PATH=$PATH:/path/to/riscv/bin

The above command should be added to your ~/.bashrc file so you do not have to type it on every session.

Ethernet

To setup the system with ethernet capability, set the USE_ETHERNET macro value to True.

When running the system with ethernet, please set the RMAC_ADDR and IOB_CONSOLE_PYTHON_ENV environment variables. These values will select which network interface and which python environment to use for the console.

For example, you can add the following to your ~/.bashrc:

# IOb-SoC console network interface (loopback interfacce)
export RMAC_ADDR=000000000000
# Custom IOb-SoC console python interperter with `CAP_NET_RAW` capability.
export IOB_CONSOLE_PYTHON_ENV=/opt/pyeth3/bin/python

You could also set those variables in the build directory's config_build.mk file.

Acknowledgements

First of all, we acknowledge all the volunteer contributors for all their valuable pull requests, issues, and discussions.

The work has been partially performed in the scope of the A-IQ Ready project, which receives funding within Chips Joint Undertaking (Chips JU) - the Public-Private Partnership for research, development, and innovation under Horizon Europe – and National Authorities under grant agreement No. 101096658.

The A-IQ Ready project is supported by the Chips Joint Undertaking (Chips JU) - the Public-Private Partnership for research, development, and innovation under Horizon Europe – and National Authorities under Grant Agreement No. 101096658.

image image

This project provides the basic infrastructure to other projects funded through the NGI Assure Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program under the aegis of DG Communications Networks, Content, and Technology.

NLnet foundation logo NGI Assure logo

iob-soc's People

Contributors

andremerendeira avatar antoniocharana avatar arturum1 avatar chrisedgley avatar dgarigali avatar diogofausto avatar edw590 avatar jdlopes avatar jjts avatar joaovroque avatar josejsarmento avatar martimrosado avatar microsharjeel avatar p-miranda avatar pedroantunes178 avatar pedrompt97 avatar roby2014 avatar slahiruk avatar vasco-luz avatar vjbmario avatar zettasticks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iob-soc's Issues

stucks when i simulate with INIT_MEM=0 RUN_EXTMEM=1

Hello Community,
I try to simulate the iob-soc project with the command (in root directory):
make sim-run SIMULATOR=icarus INIT_MEM=0 RUN_EXTMEM=1

but it stucks here:
image

I think this problem has something to do with uart,so i try to debug the python file: software/console/console.
I add some debug message and run it again:
image

the result is:

image

It seems IOB-console script do not receive END flag, and stucks at tb_read()
I'm not sure if some dependencies are missing.

Thanks in advance.

distribution: Ubuntu 18.04

create_clock is commented out in sdc

if ddr is being used it is not needed as the MIG generates the clocks

if ddr is not being used the period constraint is missing but it still works

solution create an if statement so that the statement is valid if ddr not used

VCD=1 blocks simulation

make sim-run SIMULATOR=xcelium RUN_EXTMEM=1 VCD=0 INIT_MEM=0

Works well .

Activating VCD with

make sim-run SIMULATOR=xcelium RUN_EXTMEM=1 VCD=1 INIT_MEM=0

causes simulation to hang when sending the firmware back to the PC via console. It is also curious that, in general, receiving files via uart takes a lot less time than sending.

This can't be a Verilog bug as it works fine for VCD=0. It is the fact that VCD=1 makes simulation slower that excites a bug in the communication tb --> console, via file transfer.

sw compilation flags

what is this?

riscv64-unknown-elf-gcc -o iob_soc_firmware.elf -Os -nostdlib -march=rv32i -mabi=ilp32 --specs=nano.specs -Wcast-align=strict -Wl,-Bstatic,-T,../template.lds,--strip-debug -Wl,-Map,iob_soc_firmware.map -DINIT_MEM -DINIT_MEM -DINIT_MEM -DINIT_MEM -DINIT_MEM -I. -I.. -I../esrc -I../src -I../firmware ../firmware/iob_soc_firmware.c ../firmware/iob_soc_firmware.S ../esrc/iob_cache_swreg_emb.c ../esrc/iob_uart_swreg_emb.c ../src/iob-cache.c ../src/iob-uart.c ../src/printf.c -lgcc -lc -lnosys

CPU Trap on missaligned memory accesses

Problem

The current PICORV32 does not support missaligned accesses to memory.

Example

Here is an example of a program that shows the issue:

#include "stdlib.h"
#include <stdio.h>
#include "system.h"
#include "periphs.h"
#include "iob-uart.h"
#include "printf.h"

int main()
{
    // Bitstream with interleaved integer and byte data 
    char buffer[] = { 
        0x01, 0x00, 0x00, 0x00,               /* (int) length of message 0    */
        0xab,                                 /* (char) message 0             */
        0x01, 0x00, 0x00, 0x00,               /* (int) length of message 1    */
        0xd3                                  /* (char) message 1             */
    };

    //init uart
    uart_init(UART_BASE,FREQ/BAUD);   

    // variables
    int msg_len = 0;
    int buf_ptr = 0;
    char *msg = NULL;

    int i = 0, j = 0;

    for(i=0; i<2; i++) {
        /* get message length */
        msg_len = *( (int*) (buffer + buf_ptr));
        // point after message length
        buf_ptr += sizeof(int);
        printf("MSG len: %d\n", msg_len);
        // point to msg
        msg = &(buffer[buf_ptr]);
        // print message
        for(j=0; j<msg_len; j++) {
            printf("%x ", msg[j]);
        }
        // point after message
        buf_ptr += msg_len;
        printf("\nbuf_ptr: %d\n", buf_ptr);
    }

    uart_finish();
}

PC Emul

Running pc-emul: make pc-emul
Gives the results:

./firmware.out 
MSG len: 1
ffffffab 
buf_ptr: 5
MSG len: 1
ffffffd3 
buf_ptr: 10

Embedded simulation

Running an embedded simulation: make sim INIT_MEM=1
Gives the results:

./a.out

+-----------------------------------------------+
|                   IOb-Console                 |
+-----------------------------------------------+

IOb-Console: connecting...

IOb-Bootloader: connected!
IOb-Bootloader: Restart CPU to run user program...
MSG len: 1
ab 
buf_ptr: 5
Found CPU trap condition

Explanation

The CPU trap condition is enabled on the embedded system, since the CPU does not support reading an integer (4 bytes) from a missaligned address.
In this case the trap condition is asserted on the second loop interation, when the code is equivalent to:

msg_len =  *( (int*) &(buffer[5]));

In this case the program tries to read an integer (4 bytes) starting from a position not multiple of 4.

Furthermore, disabling the CATCH_MISALIGN parameter in the PICORV32 cpu, the program yields:

./a.out

+-----------------------------------------------+
|                   IOb-Console                 |
+-----------------------------------------------+

IOb-Console: connecting...

IOb-Bootloader: connected!
IOb-Bootloader: Restart CPU to run user program...
MSG len: 1
ab 
buf_ptr: 5
MSG len: 427
d3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c 0 0 0 37 81 0 0 13 1 1 0 ef 30 b0 74 8d 4a 37 b 0 40 23 20 5b 1 2 90 41 11 22 c4 6 c6 2a 84 3 45 4 0 9 e5 b2 40 22 44 41 1 82 80 5 4 55 22 fd b7 41 11 6 c6 22 c4 2e 84 a9 2a 5 45 b9 2a 1 45 a9 2a 22 85 85 22 5 45 9d 22 22 44 b2 40 5 45 41 1 5d aa 41 11 11 45 6 c6 9d 2a b2 40 41 1 a1 aa 41 11 22 c4 6 c6 2a 84 3 45 4 0 5 4 85 22 83 47 f4 ff f5 fb b2 40 22 44 41 1 82 80 1 11 4e c6 91 69 22 cc 2a 84 13 85 49 e2 6 ce 26 ca 4a c8 ae 84 52 c4 b5 3f 11 65 13 5 5 e3 95 3f 21 45 35 22 22 85 6d 3f 41 22 2a 89 b5 2a 2a 84 a5 2a 42 5 22 4 49 8c 85 2a 9c 40 33 64 24 1 62 5 49 8c 89 ef 22 85 ef 40 e0 43 88 c0 1 e9 13 85 49 e2 3d 3f 11 65 13 5 5 e5 1d 3f 19 45 fd 20 1 49 63 42 89 2 13 85 49 e2 1d 37 11 65 13 5 85 e6 39 3f f2 40 22 85 62 44 d2 44 42 49 b2 49 22 4a 5 61 82 80 3 aa 4 0 31 2a 4a 9a 23 0 aa 0 5 9 f9 b7 1 11 4e c6 91 69 26 ca aa 84 13 85 49 e2 6 ce 22 cc 4a c8 2e 84 32 89 cd 35 11 65 13 5 c5 e7 e9 3d 1d 45 49 28 26 85 5 37 13 75 f4 f 61 20 13 55 84 40 13 75 f5 f bd 28 13 55 4 41 13 75 f5 f 95 28 13 55 84 1 bd 20 81 44 63 cf 84 0 13 85 49 e2 5d 35 62 44 f2 40 
buf_ptr: 436
IOb-Console: exiting...

The second loop iteration reads a value of 436 ( 0x00 00 01 ab), so the cpu read an integer value starting from positon 4 instead of position 5.

Proposed solution

The ideal solution would be a cpu that supports this type of operations.

The darkRV cpu was also tested and did not execute the program correctly.

A compromise could be adding the -Wcast-align=strict flag to the riscv toolchain compilation. At least the developer can be warned to potential misalignments problems in the program.

To fix the example, one could implement the following:

/* read 1 byte at a time from memory
* write bytes into an integer
*/
int read_int(char *buf){
    int val = 0;
    val = (int) buf[3];
    val = val << 4;
    val += (int) buf[2];
    val = val << 4;
    val += (int) buf[1];
    val = val << 4;
    val += (int) buf[0];
    return val;
}

int main() {
/* ... */
   for(i=0; i<2; i++) {
        /* original code: causes CPU trap! */
        msg_len = *( (int*) (buffer + buf_ptr));
        /* CPU trap fix */
        msg_len = read_int( buffer + buf_ptr);
    }
    /* ... */
}

doc review

need to update lib and review the two docs

Vivado.log critical errors related to the Ethernet and the "clk" constrains

Hello,

Issue Description:

There are a few critical warnings which I believe could be solved relatively easily.

A lot of the critical warnings present on the vivado.log file are related to the Ethernet constrains. This happens when the Ethernet is unused. The constraints are in the file iob_soc_fpga_wrapper_dev.sdc which is always included.

Another alarming warning is:

CRITICAL WARNING: [Constraints 18-1055] Clock 'clk' completely overrides clock 'c0_sys_clk_clk_p', which is referenced by one or more other constraints. Any constraints that refer to the overridden clock will be ignored.

This is caused by the inclusion of the iob_soc_fpga_wrapper.sdc file even when the DDR is in use. On the Kintex UltraScale that makes the create_clock -name "clk" -period $clk_period [get_ports "$clk_port"] override the DDR clock constrains that are automatically created.

Solution proposal:

Create a separate file for the Ethernet constrains. The constraints in no_ddr.sdc and in ddr.sdc ln.264 should also be removed.

Only add create_clock -name "clk" -period $clk_period [get_ports "$clk_port"] if USE_EXTMEM is not defined.

asic support

The asic branch has partial support for Cadence tools

To complete it update and merge the branch

Modelsim support

If you want to support the Modelsim simulator update this branch with master and add the support

Problems in compilation of iob-soc in yosys

Hi,
Kindly, check
boot_ctr.v int_mem.v iob_dp_ram.v system.v system.vh sram.v are only src and header files copied by the VSRC and VHDR by the make debug target kindly check why all other src and header are not there
this the real issue that VSRC and VHDR are not having all the src and header when they are used in Makefile
regards

Guidance on replacing Picorv32 Core with another

Hi,

I am currently working on a custom RISC-V core and came across this project, and I was wondering if there exists/ are any plans for guidance on how to swap out the existing CPU with a different one?

nix

finish nix environment and edit README accordingly or give up the idea

Console should drive the testbench in addition to the board

cpu_tasks.v can be drastically simplified as it does not need to emulate console

It was discussed that maybe this can be implemented with filesystem FIFOs (special fifos) to transfer bytes from console to the testbench via file IO operations.

Use new iob native interface

iob native interface has been greatly improved but iob-soc still uses the old version

what needs to be rewritten

CPU wrappers

merge.v and split.v and delete the intercon.vh portion that now exists in iob-lib/hardware/include/iob-lib

iob-soc instruction, data, and peripheral buses

Use the new iob-lib/scripts/if_gen.py to generate iob ports, portmaps and wires and tb wires

run on xilinx zynq

if I want to run this project on ZCU102, what should I do to modify the folder vivado/AES-KU040-DB-G?

make sram does not work

In branch asic

make sram

needs $OPENRAM_HOME/myconfig.py which is not present

This is a user created file: it should not be placed in $OPENRAM_HOME/

How to solve

  1. write a python script and place it in the iob-mem repo -- not iob-soc

this script should create the openram config file . for example

python3 mkopenram_config.py TYPE WORDS WIDTH

then it creates openram_config.py

In the Makefile modify the recipe to read this file instead of what you have there

: openram_config.py
python3 $(OPENRAM_COMPILER)/openram.py $&lt;

openram.py:
$(MEM_DIR)/software/python/mkopenram_config.py $(SRAM_ADDR_W) $(DATA_W)

Or something like that

SP605 support

Branch sp605 has partial support for this Xilinx board

If you need it update and merge the branch

Bigger bin files transfer blocks the console

When transfering bin files bigger than the one generated by the Hello World, the console blocks because it waits for the bootloader response. This is because the bootloader seems to block while receiving the program and writing it to mem. Both program sizes are correct, but the for loop stops while retrieving the program sent through the UART.
Maybe there is some data loss along the transfer that the write() function doesn't detect

fpga-build target fails

How to reproduce:

  • on a clean iob-soc clone run:
make fpga-build

Error:

make[1]: *** No rule to make target `../../../../software/bootloader/boot.bin', needed by `boot.hex'.  Stop.

Problem:

make fpga-build
  1. runs build target in fpga.mk, which requires $(FPGA_OBJ).
  2. $(FPGA_OBJ) requires boot.hex (target in hardware.mk).
  3. boot.hex requires $(BOOT_DIR)/boot.bin, for which there is no target. The boot.bin file is only generated when the sw target is required (for example in the case of make fpga-run).

Proposed solution

Create a target for $(BOOT_DIR)/boot.bin
(optional) use boot.bin as requisite for the sw target:

[hardware.mk file]
boot.hex: $(BOOT_DIR)/boot.bin                                                  
    $(PYTHON_DIR)/makehex.py $(BOOT_DIR)/boot.bin $(BOOTROM_ADDR_W) > boot.hex  

$(BOOT_DIR)/boot.bin:
    make -C $(BOOT_DIR) boot.elf FREQ=$(FREQ) BAUD=$(BAUD) 

# make embedded sw software                                                     
sw: $(BOOT_DIR)/boot.bin                                                                             
    make -C $(FIRM_DIR) firmware.elf FREQ=$(FREQ) BAUD=$(BAUD)
    make -C $(BOOT_DIR) boot.elf FREQ=$(FREQ) BAUD=$(BAUD)                  
    make -C $(CONSOLE_DIR) INIT_MEM=$(INIT_MEM) 

QuestaSim: Missing connection warning messages.

Simulating with QuestaSim gives the following warnings:

# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2685) [TFMPC] - Too few port connections for 'system_axi_interconnect'.  Expected 88, found 81.
# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2718) [TFMPC] - Missing connection for port 'm_axi_aruser'.
# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2718) [TFMPC] - Missing connection for port 'm_axi_arregion'.
# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2718) [TFMPC] - Missing connection for port 'm_axi_wuser'.
# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2718) [TFMPC] - Missing connection for port 'm_axi_awuser'.
# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2718) [TFMPC] - Missing connection for port 'm_axi_awregion'.
# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2718) [TFMPC] - Missing connection for port 's_axi_ruser'.
# ** Warning: ./src/iob_soc_sim_wrapper.v(207): (vopt-2718) [TFMPC] - Missing connection for port 's_axi_buser'.

Nevertheless, the simulation executes successfully.

CPU trap issue

A CPU trap issue occurs when the backend data width is set to 64 instead of 32

finish python-setup branch

Priority HIGH

we need to finish python and merge into iob-soc master soon

iob-soc-tester depends critically on this

improve .gitignore

preferred style :
hardware/simulation/xmsim/*
!hardware/simulation/xmsim/Makefile
!hardware/simulation/xmsim/run_xmsim.sh
!hardware/simulation/xmsim/test.expected

Verilog simulation error

make sim-run SIMULATOR=xcelium RUN_EXTMEM=1 VCD=0 INIT_MEM=0

Last message:

Open failed on file "cnsl2soc". No such file or directory

tb shoudl write test log

This:

TEST_LOG=">> test.log"

will no longer be done

tb should decide what to output to test.log and what to output to screen ($display)

Repeated source files in VSRC lead to an error

When including the peripherals' hardware.mk, repeated source files can be added to VSRC. Currently, there is no way to remove duplicate files, leading to an error:
Module [MODULE_NAME] was already declared here: ...

Make has a function that may be useful to solve this issue:
VSRC:=$(filter-out (FILE_TO_REMOVE),$(VSRC)

Verilator testbench

-- does not issue reset
-- boot signal is always zero as a consequence
-- not sure how this appears to work

Python2 deprecated

Python2 is no longer distributed in more recent OS's, so installing the toolchain pre-requisites gives out an error E: Unable to locate package python2. In the more recent toolchain versions, python2 has been removed from the pre-requisites installation command. Solution: update Readme file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.