Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invisible message about the start of the simulation #13

Open
kseniadobrovolskaia opened this issue Apr 4, 2024 · 0 comments
Open

Invisible message about the start of the simulation #13

kseniadobrovolskaia opened this issue Apr 4, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kseniadobrovolskaia
Copy link

Hello!

I think the message about starting the simulation "#===Simulation Start===" is too short. The simulation trace is often long lines, so I think it's better for this log to be longer. For example, "=====================Simulation Start=====================".
This will allow for a clearer separation of the snippy output at generation time from the model output at run time. Now it is difficult to find the moment when the simulation begins, since it merges with the trace.

This can be reproduced with my model which can be downloaded from here.

Snippy command line:

./llvm-snippy layout.yaml

Where layout.yaml looks like:

options:
  march: riscv32
  num-instrs: 5
  dump-mf: on
  model-plugin: libSnippyRVdash.so
  reserved-regs-list: [ra, gp]

sections:
  - name:      text
    VMA:       0x1000
    SIZE:      0x10000
    LMA:       0x1000
    ACCESS:    rx
  - name:      data
    VMA:       0x11000
    SIZE:      0x10000
    LMA:       0x11000
    ACCESS:    rw

histogram:
    - [ADDI, 1.0]
    - [SW, 1.0]

Library libSnippyRVdash.so must be located in the directory with the snippy, or you must specify the absolute path to it in the layout.yaml.

The output of the program is as follows:

warning: no instructions seed specified, using auto-generated one: 1712240062867359989
# :
# Machine code for function SnippyFunction: NoPHIs, NoVRegs

bb.0:
  $x18 = LUI 17, pcsections <0x5558d04c92d8>
  $x18 = ADDI $x18, -694, pcsections <0x5558d04c92d8>
  SW $x7, $x18, 758
  $x29 = ADDI $x27, 842
  $x20 = ADDI $x8, 1617
  $x2 = LUI 31, pcsections <0x5558d04c92d8>
  $x2 = ADDI $x2, 442, pcsections <0x5558d04c92d8>
  SW $x31, $x2, -1158
  $x13 = ADDI $x29, -264
  EBREAK pre-instr-symbol <mcsymbol __snippy_exit> pcsections <0x5558d04c92d8>

# End machine code for function SnippyFunction.

ld.lld: warning: cannot find entry symbol _start; not setting start address
====================rvdash start====================
NOTE: adjusting MSTATUS: 0x0->0
#===Simulation Start===
lui X18, 0x11
X18 <- 0x11000
addi X18, X18, 0xfffffd4a
X18 <- 0x10d4a
sw X7, 0x2e6(X18)

Changed memory bytes [0x11030, 0x11034].
New bytes:
11101100 01001000 10100011 10101101

addi X29, X27, 0x34a
X29 <- 0xaa58c580
addi X20, X8, 0x651
X20 <- 0x7022560f
lui X2, 0x1f
X2 <- 0x1f000
addi X2, X2, 0x1ba
X2 <- 0x1f1ba
sw X31, 0x36a(X2)

Changed memory bytes [0x1f524, 0x1f528].
New bytes:
11011101 01001001 11100111 10111000

addi X13, X29, 0xfffffef8
X13 <- 0xaa58c478
ebreak
remark: Snippet generator generated relocatable image: please, use linker with provided script to generate final image
===================rvdash complete==================

Here, the size of the message "#===Simulation Start===" is much smaller than the size of the trace and the snippy output. I think they should be separated better.

@kv-sc kv-sc added enhancement New feature or request good first issue Good for newcomers labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants