Project

General

Profile

Bug #9467

Не работает корректно excludes в версии ревизий

Added by Alexander Protsenko over 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
High
Category:
Configuration
Target version:
Start date:
01/30/2019
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
2.5.1-beta-200127

Description

revisions.xml

<revisions>
 <revision name="MEM_SV32"/>
 <revision name="MEM_SV64">
  <includes name="MEM_SV39"/>
  <includes name="MEM_SV48"/>
 </revision>

 <revision name="RV32I">
  <includes name="MEM_SV32"/>
 </revision>
 <revision name="RV32C"/>
 <revision name="RV32FC"/>
 <revision name="RV64C"/>
 <revision name="RV64I">
  <includes name="RV32I"/>
  <excludes name="MEM_SV32"/>
  <includes name="MEM_SV64"/>
 </revision>
 <revision name="RV32M">
  <includes name="RV32I"/>
 </revision>
 <revision name="RV64M">
  <includes name="RV32M"/>
  <includes name="RV64I"/>
 </revision>
 <revision name="RV32A"/>
 <revision name="RV64A">
  <includes name="RV32A"/>
  <includes name="RV64I"/>
 </revision>
 <revision name="RV32F"/>
 <revision name="RV64F">
  <includes name="RV32F"/>
  <includes name="RV64I"/>
 </revision>
 <revision name="RV32D"/>
 <revision name="RV32DC">
  <includes name="RV32D"/>
 </revision>
 <revision name="RV64D">
  <includes name="RV32D"/>
  <includes name="RV64I"/>
 </revision>
 <revision name="RV32V"/>
 <revision name="RV32"/>
 <revision name="RV32FULL">
  <includes name="RV32I"/>
  <includes name="RV32M"/>
  <includes name="RV32A"/>
  <includes name="RV32F"/>
  <includes name="RV32C"/>
  <includes name="RV32FC"/>
  <includes name="RV32V"/>
  <includes name="RV32"/>
 </revision>
 <revision name="RV64C">
  <includes name="RV32C"/>
  <includes name="RV32FC"/>
  <includes name="RV32DC"/>
 </revision>
 <revision name="RV64"/>
 <revision name="RV64FULL">
  <includes name="RV64I"/>
  <includes name="RV64M"/>
  <includes name="RV64A"/>
  <includes name="RV64F"/>
  <includes name="RV32D"/>
  <includes name="RV64D"/>
  <includes name="RV64C"/>
  <includes name="RV32DC"/>
  <includes name="RV32V"/>
  <includes name="RV64"/>
  <excludes name="MEM_SV32"/>
 </revision>
</revisions>

Сборка:
specRevision=RV64FULL

Шаблон instruction_lw_sw_sv32.rb:

  def run
    if is_rev('MEM_SV32') then
      # Only for Sv32, (RV32)
      # csrwi satp, 0x80000002 # MODE = 1, PPN = 0x2
      trace "CSR satp = 0x%x", satp
      li t0, 0x800bed22
      trace "Register t0 = 0x%x", t0
      csrw satp, t0
      trace "CSR satp = 0x%x", satp

      li s0, 0x00010000 # Address
      prepare t0, 0xFFFFFFFFDEADBEEF # Value being loaded/stored

      trace "Register s0 = 0x%x", s0
      lw t1, s0, 0x0
      trace "Register t1 = 0x%x", t1
      sw t0, s0, 0x0
      trace "Register t0 = 0x%x", t0
      lw t1, s0, 0x0
      trace "Register t1 = 0x%x", t1
      nop
    end
  end

Симуляция:

1:
CSR satp = 0x0
0x00000000800000fc li t0, 0x800bed22
Register t0 = 0x800bed22
0x000000008000011c csrw satp, t0
CSR satp = 0x800bed22
0x0000000080000120 li s0, 0x10000
0x0000000080000128 li t0, 0xffffffffdeadbeef
Register s0 = 0x10000
0x0000000080000130 lw t1, 0(s0)
Mmu.PreTranslateAddress: satp.mode=0 (off)
Register t1 = 0x0
0x0000000080000134 sw t0, 0(s0)
Mmu.PreTranslateAddress: satp.mode=0 (off)
Register t0 = 0xffffffffdeadbeef
0x0000000080000138 lw t1, 0(s0)
Mmu.PreTranslateAddress: satp.mode=0 (off)
Register t1 = 0xffffffffdeadbeef
0x000000008000013c nop

Должно быть:


Работает корректно при:

 <revision name="RV64FULL">
  <includes name="RV64I"/>
  <includes name="RV64M"/>
  <includes name="RV64A"/>
  <includes name="RV64F"/>
  <includes name="RV32D"/>
  <includes name="RV64D"/>
  <includes name="RV64C"/>
  <includes name="RV32DC"/>
  <includes name="RV32V"/>
  <includes name="RV64"/>
  <excludes name="MEM_SV32"/>
 </revision>

History

#1

Updated by Alexander Kamkin 10 months ago

  • Target version set to 2.5
  • Priority changed from Normal to High
#2

Updated by Alexander Kamkin 9 months ago

  • Status changed from New to Resolved

Exclude работает адекватно, но не так, как ты ожидаешь.

Изменил порядок применения include и exclude: сначала собираются оба множества (includeRevisions и excludeRevisions), потом из includeRevisions вычитается excludeRevisions.

Раньше порядок применения include и exclude совпадал с порядком их появления в файле.

Первый вариант мне представляется более естественным.

#3

Updated by Alexander Kamkin 9 months ago

Оставляем первый вариант, но пишем документацию.

#4

Updated by Alexander Kamkin 9 months ago

  • Published in build set to 2.5.1-beta-200127
  • Status changed from Resolved to Closed
  • Category set to Configuration

Also available in: Atom PDF