Skip to content

Should --list-files riscv.sail_project be empty? #1209

@enathang

Description

@enathang

Hello. New here, trying to wrap my head around the current state of sail and sail-riscv.

Issue
I'm following https://alasdair.github.io/#_modular_sail_specifications which has been a great tutorial so far. However, when I run sail --list-files model/riscv.sail_project I get a blank line. This is unexpected to me, because the riscv.sail_project file seems to contain a lot of files, ie

...
riscv {
  requires riscv_core, riscv_exceptions, pmp, V_core, Smcntrpmf

  files
    riscv_sys_reservation.sail,
    riscv_sys_control.sail,
    riscv_platform.sail,
    riscv_mem.sail,
    riscv_inst_retire.sail,
    riscv_vmem_pte.sail,
    riscv_vmem_ptw.sail,
    riscv_vmem_tlb.sail,
    riscv_vmem.sail,
    riscv_vmem_utils.sail,
    riscv_insts_begin.sail,
}
...

A couple hypotheses on what could be happening:

  1. the guide mentions optional, default, and conditional modules, which might influence the inclusion or exclusion of files. However, I see none of those types of modules used in the sail_project file
  2. The project still needs to be built (through make or cmake, not sure) to actually generate the full concatenated file. However, I've ran ./build_simulators.sh, which succeeds, but cannot find anything useful in the build/ directory.
  3. I'm using sail installed through opam, which probably doesn't contain any bugfixes for the past couple weeks (I assume it lags behind source slightly). So if this was a known issue, it could already be resolved, but I don't see any closed tickets on it.

I suspect the solution is quite banal, such as "oh you just have to run x before this", but I've tried to do my due diligence on this and still have not found a solution/explanation. So any help is much appreciated!

Local details

$ sail -v
Sail 0.19.1 (sail @ opam-v2.4.1 0.19.1)

Latest commit of local riscv-sail repo: 28c80a32cda06bf25bcfc764b1e8e3797f70724a (Aug 13th).

Motivation for asking
Specifically, I'm asking this because I'm trying to get the AST output of the riscv model, but it's giving me a mostly empty AST, which I attribute (correctly or not) to the other sail files not being linked in.
Command and output:
sail --ddump-tc-ast model/riscv.sail_project

val internal_pick = monadic {_: "internal_pick"}: forall ('a : Type).
  list('a) -> 'a

val undefined_bool = monadic {_: "undefined_bool"}: unit -> bool

val undefined_bit = monadic {_: "undefined_bit"}: unit -> bit

val undefined_int = monadic {_: "undefined_int"}: unit -> int

val undefined_nat = monadic {_: "undefined_nat"}: unit -> nat

val undefined_real = monadic {_: "undefined_real"}: unit -> real

val undefined_string = monadic {_: "undefined_string"}: unit -> string

val undefined_list = monadic {_: "undefined_list"}: forall ('a : Type).
  'a -> list('a)

val undefined_range = monadic {_: "undefined_range"}: forall ('n : Int) ('m : Int).
  (int('n), int('m)) -> range('n, 'm)

val undefined_vector = monadic {_: "undefined_vector"}: forall ('n : Int) ('a : Type).
  (int('n), 'a) -> vector('n, 'a)

val undefined_bitvector = monadic {_: "undefined_bitvector"}: forall ('n : Int).
  int('n) -> bitvector('n)

val undefined_unit = monadic {_: "undefined_unit"}: unit -> unit

$[global]
val initialize_registers : unit -> unit

$[complete]
$[global]
function initialize_registers () = ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions