chipsalliance / dromajo

RISC-V RV64GC emulator designed for RTL co-simulation
Apache License 2.0
213 stars 63 forks source link

Add support to check mmio address sets for cosim #12

Closed ss2783 closed 4 years ago

ss2783 commented 4 years ago

This is required as mmio address space can be disjoint, should be represented by an address set and not a range alone.

NOTE: I am not changing the existing checks for mmio range as other users might be affected. The mmio address set can only be specified via a config file.

Here is an example config file:

  {
    version:1,
    machine:"riscv64",
    memory_size:1024,
    bios:"program.bin",
    memory_base_addr:0x80000000,
    mmio_addrset:[
      {start:0x2000000,size:0x10000},
      {start:0xc000000,size:0x4000000}
    ]
  }
renau commented 4 years ago

Looks good and reasonable. In the future, we should try to read the device tree (https://elinux.org/Device_Tree_Reference)